diff --git a/Mage.Client/src/main/java/mage/client/dialog/ShowCardsDialog.java b/Mage.Client/src/main/java/mage/client/dialog/ShowCardsDialog.java index 433aecd21c..3257c665cd 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/ShowCardsDialog.java +++ b/Mage.Client/src/main/java/mage/client/dialog/ShowCardsDialog.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. + */ /* * ShowCardsDialog.java * * Created on 3-Feb-2010, 8:59:11 PM */ - package mage.client.dialog; import java.awt.Component; @@ -41,7 +40,6 @@ import java.awt.event.MouseListener; import java.io.Serializable; import java.util.Map; import java.util.UUID; -import javax.swing.ImageIcon; import javax.swing.JLayeredPane; import javax.swing.SwingUtilities; import mage.cards.CardDimensions; @@ -54,29 +52,25 @@ import mage.client.util.gui.GuiDisplayUtil; import mage.view.CardsView; import mage.view.SimpleCardsView; import org.mage.card.arcane.CardPanel; -import org.mage.plugins.card.utils.impl.ImageManagerImpl; /** * @author BetaSteward_at_googlemail.com */ public class ShowCardsDialog extends MageDialog implements MouseListener { - - // remember if this dialog was already auto positioned, so don't do it after the first time private boolean positioned; - /** * Creates new form ShowCardsDialog */ public ShowCardsDialog() { this.positioned = false; - + this.setDefaultCloseOperation(DISPOSE_ON_CLOSE); initComponents(); this.setModal(false); - + } public void cleanUp() { @@ -96,18 +90,18 @@ public class ShowCardsDialog extends MageDialog implements MouseListener { public void loadCards(String name, CardsView showCards, BigCard bigCard, CardDimensions dimension, UUID gameId, boolean modal) { loadCards(name, showCards, bigCard, dimension, gameId, modal, null); } - + public void loadCards(String name, CardsView showCards, BigCard bigCard, CardDimensions dimension, UUID gameId, boolean modal, Map options) { this.title = name; this.setTitelBarToolTip(name); cardArea.loadCards(showCards, bigCard, dimension, gameId, this); if (options != null) { if (options.containsKey("chosen")) { - java.util.List chosenCards = (java.util.List)options.get("chosen"); + java.util.List chosenCards = (java.util.List) options.get("chosen"); cardArea.selectCards(chosenCards); } if (options.containsKey("choosable")) { - java.util.List choosableCards = (java.util.List)options.get("choosable"); + java.util.List choosableCards = (java.util.List) options.get("choosable"); cardArea.markCards(choosableCards); } } @@ -115,7 +109,7 @@ public class ShowCardsDialog extends MageDialog implements MouseListener { if (getParent() != MageFrame.getDesktop() /*|| this.isClosed*/) { MageFrame.getDesktop().add(this, JLayeredPane.DEFAULT_LAYER); } - pack(); + pack(); this.revalidate(); this.repaint(); @@ -156,7 +150,9 @@ public class ShowCardsDialog extends MageDialog implements MouseListener { @Override public void mouseClicked(MouseEvent e) { - this.hideDialog(); + if (e.getSource() instanceof CardPanel) { + this.hideDialog(); + } } @Override diff --git a/Mage.Client/src/main/java/mage/client/draft/DraftPanel.java b/Mage.Client/src/main/java/mage/client/draft/DraftPanel.java index 99645ecaed..5752dbe8ec 100644 --- a/Mage.Client/src/main/java/mage/client/draft/DraftPanel.java +++ b/Mage.Client/src/main/java/mage/client/draft/DraftPanel.java @@ -31,7 +31,6 @@ * * Created on Jan 7, 2011, 2:15:48 PM */ - package mage.client.draft; import java.awt.Component; @@ -123,14 +122,16 @@ public class DraftPanel extends javax.swing.JPanel { private static final CardsView emptyView = new CardsView(); - /** Creates new form DraftPanel */ + /** + * Creates new form DraftPanel + */ public DraftPanel() { initComponents(); draftBooster.setOpaque(false); draftPicks.setSortSetting(SortSettingDraft.getInstance()); draftPicks.setOpaque(false); - + popupMenuPickedArea = new JPopupMenu(); addPopupMenuPickArea(); this.add(popupMenuPickedArea); @@ -142,18 +143,17 @@ public class DraftPanel extends javax.swing.JPanel { draftLeftPane.setOpaque(false); countdown = new Timer(1000, - new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - if (--timeout > 0) { - setTimeout(timeout); - } - else { - setTimeout(0); - countdown.stop(); + new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + if (--timeout > 0) { + setTimeout(timeout); + } else { + setTimeout(0); + countdown.stop(); + } } } - } ); } @@ -192,13 +192,13 @@ public class DraftPanel extends javax.swing.JPanel { } } - public void updateDraft(DraftView draftView) { - if (draftView.getSets().size() != 3){ + public void updateDraft(DraftView draftView) { + if (draftView.getSets().size() != 3) { // Random draft this.txtPack1.setText("Random Boosters"); this.txtPack2.setText("Random Boosters"); this.txtPack3.setText("Random Boosters"); - }else{ + } else { this.txtPack1.setText(draftView.getSets().get(0)); this.txtPack2.setText(draftView.getSets().get(1)); this.txtPack3.setText(draftView.getSets().get(2)); @@ -215,13 +215,13 @@ public class DraftPanel extends javax.swing.JPanel { int left = draftView.getPlayers().size() - right; int height = left * 18; lblTableImage.setSize(new Dimension(lblTableImage.getWidth(), height)); - Image tableImage = ImageHelper.getImageFromResources(draftView.getBoosterNum() == 2 ? "/draft/table_left.png":"/draft/table_right.png"); + Image tableImage = ImageHelper.getImageFromResources(draftView.getBoosterNum() == 2 ? "/draft/table_left.png" : "/draft/table_right.png"); BufferedImage resizedTable = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(tableImage, BufferedImage.TYPE_INT_ARGB), lblTableImage.getWidth()); lblTableImage.setIcon(new ImageIcon(resizedTable)); - + int count = 0; int numberPlayers = draftView.getPlayers().size(); - for(String playerName: draftView.getPlayers()) { + for (String playerName : draftView.getPlayers()) { count++; setPlayerNameToLabel(playerName, count, numberPlayers); } @@ -232,13 +232,13 @@ public class DraftPanel extends javax.swing.JPanel { int right = players / 2; int left = players - right; if (index <= left) { - // left side down (1 - 8) + // left side down (1 - 8) tablePosition = index; } else { // right side up (16 - 9) tablePosition = 9 + right - (index - left); } - switch(tablePosition) { + switch (tablePosition) { case 1: lblPlayer01.setText(name); break; @@ -296,46 +296,46 @@ public class DraftPanel extends javax.swing.JPanel { loadCardsToPickedCardsArea(draftPickView.getPicks()); this.draftPicks.clearCardEventListeners(); - this.draftPicks.addCardEventListener(new Listener () { - @Override - public void event(Event event) { - if (event.getEventName().equals("show-popup-menu")) { - if (event.getSource() != null) { - // Popup Menu Card - cardIdPopupMenu = ((SimpleCardView)event.getSource()).getId(); - popupMenuCardPanel.show(event.getComponent(), event.getxPos(), event.getyPos()); - } else { - // Popup Menu area - popupMenuPickedArea.show(event.getComponent(), event.getxPos(), event.getyPos()); - } + this.draftPicks.addCardEventListener(new Listener() { + @Override + public void event(Event event) { + if (event.getEventName().equals("show-popup-menu")) { + if (event.getSource() != null) { + // Popup Menu Card + cardIdPopupMenu = ((SimpleCardView) event.getSource()).getId(); + popupMenuCardPanel.show(event.getComponent(), event.getxPos(), event.getyPos()); + } else { + // Popup Menu area + popupMenuPickedArea.show(event.getComponent(), event.getxPos(), event.getyPos()); } } } + } ); // lower area that shows the booster draftBooster.loadBooster(CardsViewUtil.convertSimple(draftPickView.getBooster()), bigCard); this.draftBooster.clearCardEventListeners(); this.draftBooster.addCardEventListener( - new Listener () { - @Override - public void event(Event event) { - if (event.getEventName().equals("pick-a-card")) { - SimpleCardView source = (SimpleCardView) event.getSource(); - DraftPickView view = session.sendCardPick(draftId, source.getId(), cardsHidden); - if (view != null) { - loadCardsToPickedCardsArea(view.getPicks()); - draftBooster.loadBooster(emptyView, bigCard); - Plugins.getInstance().getActionCallback().hidePopup(); - setMessage("Waiting for other players"); + new Listener() { + @Override + public void event(Event event) { + if (event.getEventName().equals("pick-a-card")) { + SimpleCardView source = (SimpleCardView) event.getSource(); + DraftPickView view = session.sendCardPick(draftId, source.getId(), cardsHidden); + if (view != null) { + loadCardsToPickedCardsArea(view.getPicks()); + draftBooster.loadBooster(emptyView, bigCard); + Plugins.getInstance().getActionCallback().hidePopup(); + setMessage("Waiting for other players"); + } + } + if (event.getEventName().equals("mark-a-card")) { + SimpleCardView source = (SimpleCardView) event.getSource(); + session.sendCardMark(draftId, source.getId()); } } - if (event.getEventName().equals("mark-a-card")) { - SimpleCardView source = (SimpleCardView) event.getSource(); - session.sendCardMark(draftId, source.getId()); - } } - } ); setMessage("Pick a card"); if (!MageFrame.getInstance().isActive()) { @@ -352,7 +352,7 @@ public class DraftPanel extends javax.swing.JPanel { private void loadCardsToPickedCardsArea(SimpleCardsView pickedCards) { this.pickedCards = pickedCards; - for (Map.Entry entry: pickedCards.entrySet()) { + for (Map.Entry entry : pickedCards.entrySet()) { if (!cardsHidden.contains(entry.getKey())) { pickedCardsShown.put(entry.getKey(), entry.getValue()); } @@ -360,22 +360,22 @@ public class DraftPanel extends javax.swing.JPanel { draftPicks.loadCards(CardsViewUtil.convertSimple(pickedCardsShown), bigCard, null); } - private void setTimeout(int s){ - int minute = s/60; - int second = s - (minute*60); + private void setTimeout(int s) { + int minute = s / 60; + int second = s - (minute * 60); String text; - if(minute < 10){ + if (minute < 10) { text = "0" + Integer.toString(minute) + ":"; - }else{ + } else { text = Integer.toString(minute) + ":"; } - if(second < 10){ + if (second < 10) { text = text + "0" + Integer.toString(second); - }else{ + } else { text = text + Integer.toString(second); } this.txtTimeRemaining.setText(text); - if (s==6 && !draftBooster.isEmptyGrid()) { + if (s == 6 && !draftBooster.isEmptyGrid()) { AudioManager.playOnCountdown1(); } } @@ -386,7 +386,7 @@ public class DraftPanel extends javax.swing.JPanel { c = c.getParent(); } if (c != null) { - ((DraftPane)c).removeDraft(); + ((DraftPane) c).removeDraft(); } } @@ -420,7 +420,6 @@ public class DraftPanel extends javax.swing.JPanel { }); // popupMenuPickedArea.addSeparator(); - } private void addPopupMenuCardPanel() { @@ -439,7 +438,6 @@ public class DraftPanel extends javax.swing.JPanel { }); // popupMenuCardPanel.addSeparator(); - } private void hideThisCard(UUID card) { @@ -472,7 +470,7 @@ public class DraftPanel extends javax.swing.JPanel { } if (currentBooster != null) { String lastPick = getCardName(getLastPick(pickView.getPicks().values())); - if (lastPick != null) { + if (lastPick != null && currentBooster.length > 1) { logPick(lastPick); } currentBooster = null; @@ -490,7 +488,7 @@ public class DraftPanel extends javax.swing.JPanel { private void setCurrentBoosterForLog(SimpleCardsView booster) { LinkedList cards = new LinkedList<>(); - for (SimpleCardView simple: booster.values()) { + for (SimpleCardView simple : booster.values()) { String cardName = getCardName(simple); if (cardName != null) { cards.add(cardName); @@ -515,7 +513,7 @@ public class DraftPanel extends javax.swing.JPanel { private Path pathToDraftLog() { File saveDir = new File("gamelogs"); - if(!saveDir.exists()) { + if (!saveDir.exists()) { saveDir.mkdirs(); } return new File(saveDir, logFilename).toPath(); @@ -545,11 +543,10 @@ public class DraftPanel extends javax.swing.JPanel { return cardInfo != null ? cardInfo.getName() : null; } - - /** 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 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 4ad6037ecc..9b6554de8f 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 @@ -36,7 +36,7 @@ public class GathererSets implements Iterable { private static final String[] withMythics = {"M10", "M11", "M12", "M13", "M14", "M15", "ORI", "DDF", "DDG", "DDH", "DDI", "DDJ", "DDK", "DDL", "DDM", "DDN", - "DD3", "DD3B", "DDO", + "DD3", "DD3B", "DDO", "DDP", "FVD", "FVE", "FVL", "FVR", "V12", "V13", "V14", "V15", "ALA", "CON", "ARB", 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 bec0386a46..4c4ff30e05 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 @@ -103,6 +103,7 @@ public class MagicCardsImageSource implements CardImageSource { put("DDM", "duel-decks-jace-vs-vraska"); put("DDN", "duel-decks-speed-vs-cunning"); put("DDO", "duel-decks-elspeth-vs-kiora"); + put("DDP", "duel-decks-zendikar-vs-eldrazi"); } private static final long serialVersionUID = 1L; }; diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/WizardCardsImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/WizardCardsImageSource.java index 08a6a7287d..3e1ed8c95b 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/WizardCardsImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/WizardCardsImageSource.java @@ -123,6 +123,7 @@ public class WizardCardsImageSource implements CardImageSource { setsAliases.put("DDM", "Duel Decks: Jace vs. Vraska"); setsAliases.put("DDN", "Duel Decks: Speed vs. Cunning"); setsAliases.put("DDO", "Duel Decks: Elspeth vs. Kiora"); + setsAliases.put("DDP", "Duel Decks: Zendikar vs. Eldrazi"); setsAliases.put("DGM", "Dragon's Maze"); setsAliases.put("DIS", "Dissension"); setsAliases.put("DKA", "Dark Ascension"); diff --git a/Mage.Client/src/main/resources/card-pictures-tok.txt b/Mage.Client/src/main/resources/card-pictures-tok.txt index 9cf60742b9..5af245dd30 100644 --- a/Mage.Client/src/main/resources/card-pictures-tok.txt +++ b/Mage.Client/src/main/resources/card-pictures-tok.txt @@ -1,3 +1,9 @@ +#Generate|TOK:DDP|Eldrazi Spawn 1| +#Generate|TOK:DDP|Eldrazi Spawn 2| +#Generate|TOK:DDP|Eldrazi Spawn 3| +#Generate|TOK:DDP|Hellion| +#Generate|TOK:DDP|Plant| + #Generate|TOK:MM2|Eldrazi Spawn 1| #Generate|TOK:MM2|Eldrazi Spawn 2| #Generate|TOK:MM2|Eldrazi Spawn 3| diff --git a/Mage.Client/src/main/resources/image.url.properties b/Mage.Client/src/main/resources/image.url.properties index fb9c408f3a..625d27d3ba 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,MM2,V15,BFZ +ignore.urls=TOK,MM2,V15,BFZ,DDP # sets ordered by release time (newest goes first) -token.lookup.order=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=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/utils/MageVersion.java b/Mage.Common/src/mage/utils/MageVersion.java index 805d71e91b..79ff05b978 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 = 3; - public final static String MAGE_VERSION_MINOR_PATCH = "v0"; + public final static String MAGE_VERSION_MINOR_PATCH = "v2"; public final static String MAGE_VERSION_INFO = ""; private final int major; diff --git a/Mage.Common/src/mage/view/CardsView.java b/Mage.Common/src/mage/view/CardsView.java index 2b72e78a1c..4a7ee78da5 100644 --- a/Mage.Common/src/mage/view/CardsView.java +++ b/Mage.Common/src/mage/view/CardsView.java @@ -152,6 +152,9 @@ public class CardsView extends LinkedHashMap { for (UUID uuid : abilityTargets) { MageObject mageObject = game.getObject(uuid); if (mageObject != null) { + if ((mageObject instanceof Card) && ((Card) mageObject).isFaceDown(game)) { + continue; + } names.add(GameLog.getColoredObjectIdNameForTooltip(mageObject)); } } diff --git a/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/SimulatedPlayer2.java b/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/SimulatedPlayer2.java index 419a33a0b5..fce50c8ff2 100644 --- a/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/SimulatedPlayer2.java +++ b/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/SimulatedPlayer2.java @@ -53,6 +53,7 @@ import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.game.stack.StackAbility; import mage.players.Player; +import mage.players.net.UserData; import mage.target.Target; import org.apache.log4j.Logger; @@ -75,6 +76,7 @@ public class SimulatedPlayer2 extends ComputerPlayer { pass.setControllerId(playerId); this.isSimulatedPlayer = isSimulatedPlayer; this.suggested = suggested; + this.userData = UserData.getDefaultUserDataView(); } public SimulatedPlayer2(final SimulatedPlayer2 player) { diff --git a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java index 89d7ab3763..f0cda34d2a 100644 --- a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java @@ -74,6 +74,7 @@ import mage.abilities.mana.ManaAbility; import mage.abilities.mana.ManaOptions; import mage.cards.Card; import mage.cards.Cards; +import mage.cards.CardsImpl; import mage.cards.decks.Deck; import mage.cards.repository.CardCriteria; import mage.cards.repository.CardInfo; @@ -161,7 +162,7 @@ public class ComputerPlayer extends PlayerImpl implements Player { private transient final static Logger log = Logger.getLogger(ComputerPlayer.class); protected int PASSIVITY_PENALTY = 5; // Penalty value for doing nothing if some actions are availble - protected boolean ALLOW_INTERRUPT = true; // change this for test / debugging purposes to false to switch off interrupts while debugging + protected boolean ALLOW_INTERRUPT = true; // change this for test / debugging purposes to false to switch off interrupts while debugging private transient Map unplayable = new TreeMap<>(); private transient List playableNonInstant = new ArrayList<>(); @@ -522,8 +523,11 @@ public class ComputerPlayer extends PlayerImpl implements Player { } if (target instanceof TargetDiscard || target instanceof TargetCardInHand) { if (outcome.isGood()) { - ArrayList cardsInHand = new ArrayList<>(hand.getCards(game)); - while (!target.isChosen() && !cardsInHand.isEmpty() && target.getMaxNumberOfTargets() > target.getTargets().size()) { + Cards cards = new CardsImpl(target.possibleTargets(source.getSourceId(), getId(), game)); + ArrayList cardsInHand = new ArrayList<>(cards.getCards(game)); + while (!target.isChosen() + && target.possibleTargets(source.getSourceId(), getId(), game).size() > 0 + && target.getMaxNumberOfTargets() > target.getTargets().size()) { Card card = pickBestCard(cardsInHand, null, target, source, game); if (card != null) { if (target.canTarget(getId(), card.getId(), source, game)) { @@ -684,17 +688,6 @@ public class ComputerPlayer extends PlayerImpl implements Player { } return target.isChosen(); } - if (target instanceof TargetCardInHand) { - List cards = new ArrayList<>(); - cards.addAll(this.hand.getCards(game)); - while (!target.isChosen() && !cards.isEmpty()) { - Card pick = pickTarget(cards, outcome, target, source, game); - if (pick != null) { - target.addTarget(pick.getId(), source, game); - } - } - return target.isChosen(); - } if (target instanceof TargetSpell) { if (game.getStack().size() > 0) { Iterator it = game.getStack().iterator(); @@ -709,6 +702,7 @@ public class ComputerPlayer extends PlayerImpl implements Player { return false; } if (target instanceof TargetSpellOrPermanent) { + // TODO: Also check if a spell should be selected List targets; boolean outcomeTargets = true; if (outcome.isGood()) { @@ -720,10 +714,9 @@ public class ComputerPlayer extends PlayerImpl implements Player { targets = threats(null, source == null ? null : source.getSourceId(), ((TargetSpellOrPermanent) target).getPermanentFilter(), game, target.getTargets()); Collections.reverse(targets); outcomeTargets = false; - //targets = game.getBattlefield().getActivePermanents(((TargetPermanent)target).getFilter(), playerId, game); } for (Permanent permanent : targets) { - if (((TargetPermanent) target).canTarget(abilityControllerId, permanent.getId(), source, game)) { + if (((TargetSpellOrPermanent) target).canTarget(abilityControllerId, permanent.getId(), source, game)) { target.addTarget(permanent.getId(), source, game); if (!outcomeTargets || target.getMaxNumberOfTargets() <= target.getTargets().size()) { return true; 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 2ed5be13a9..c96384e4dc 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 @@ -629,21 +629,23 @@ public class HumanPlayer extends PlayerImpl { if (object != null) { Zone zone = game.getState().getZone(object.getId()); if (zone != null) { - if (object instanceof Card && ((Card) object).isFaceDown(game)) { - revealFaceDownCard((Card) object, game); + if (object instanceof Card + && ((Card) object).isFaceDown(game) + && lookAtFaceDownCard((Card) object, game)) { result = true; - } - Player actingPlayer = null; - if (game.getPriorityPlayerId().equals(playerId)) { - actingPlayer = this; - } else if (getPlayersUnderYourControl().contains(game.getPriorityPlayerId())) { - actingPlayer = game.getPlayer(game.getPriorityPlayerId()); - } - if (actingPlayer != null) { - LinkedHashMap useableAbilities = actingPlayer.getUseableActivatedAbilities(object, zone, game); - if (useableAbilities != null && useableAbilities.size() > 0) { - activateAbility(useableAbilities, object, game); - result = true; + } else { + Player actingPlayer = null; + if (game.getPriorityPlayerId().equals(playerId)) { + actingPlayer = this; + } else if (getPlayersUnderYourControl().contains(game.getPriorityPlayerId())) { + actingPlayer = game.getPlayer(game.getPriorityPlayerId()); + } + if (actingPlayer != null) { + LinkedHashMap useableAbilities = actingPlayer.getUseableActivatedAbilities(object, zone, game); + if (useableAbilities != null && useableAbilities.size() > 0) { + activateAbility(useableAbilities, object, game); + result = true; + } } } } diff --git a/Mage.Sets/src/mage/sets/ZendikarVsEldrazi.java b/Mage.Sets/src/mage/sets/ZendikarVsEldrazi.java new file mode 100644 index 0000000000..4a0d7003f7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ZendikarVsEldrazi.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; + +import java.util.GregorianCalendar; +import mage.cards.ExpansionSet; +import mage.constants.SetType; + +/** + * + * @author fireshoes + */ + +public class ZendikarVsEldrazi extends ExpansionSet { + private static final ZendikarVsEldrazi fINSTANCE = new ZendikarVsEldrazi(); + + public static ZendikarVsEldrazi getInstance() { + return fINSTANCE; + } + + private ZendikarVsEldrazi() { + super("Duel Decks: Zendikar vs. Eldrazi", "DDP", "mage.sets.zendikarvseldrazi", new GregorianCalendar(2015, 8, 28).getTime(), SetType.SUPPLEMENTAL); + this.blockName = "Duel Decks"; + this.hasBasicLands = false; + } +} diff --git a/Mage.Sets/src/mage/sets/alarareborn/SlaveOfBolas.java b/Mage.Sets/src/mage/sets/alarareborn/SlaveOfBolas.java index 414e9e9cee..da0c98d4ea 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/SlaveOfBolas.java +++ b/Mage.Sets/src/mage/sets/alarareborn/SlaveOfBolas.java @@ -43,6 +43,7 @@ import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Rarity; import mage.game.Game; +import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; import mage.target.targetpointer.FixedTarget; @@ -56,10 +57,6 @@ public class SlaveOfBolas extends CardImpl { super(ownerId, 136, "Slave of Bolas", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{U/R}{B}"); this.expansionSetCode = "ARB"; - - - - // Gain control of target creature. Untap that creature. It gains haste until end of turn. Sacrifice it at the beginning of the next end step. this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn)); this.getSpellAbility().addEffect(new UntapTargetEffect()); @@ -96,13 +93,17 @@ class SlaveOfBolasEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice this"); - sacrificeEffect.setTargetPointer(new FixedTarget(source.getFirstTarget())); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); - return true; + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent != null) { + SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice this", source.getControllerId()); + sacrificeEffect.setTargetPointer(new FixedTarget(permanent, game)); + DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(game), game); + game.addDelayedTriggeredAbility(delayedAbility); + return true; + } + return false; } } diff --git a/Mage.Sets/src/mage/sets/alliances/AgentOfStromgald1.java b/Mage.Sets/src/mage/sets/alliances/AgentOfStromgald1.java new file mode 100644 index 0000000000..5abea54055 --- /dev/null +++ b/Mage.Sets/src/mage/sets/alliances/AgentOfStromgald1.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.alliances; + +import java.util.UUID; +import mage.MageInt; +import mage.Mana; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class AgentOfStromgald1 extends CardImpl { + + public AgentOfStromgald1(UUID ownerId) { + super(ownerId, 94, "Agent of Stromgald", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{R}"); + this.expansionSetCode = "ALL"; + this.subtype.add("Human"); + this.subtype.add("Knight"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {R}: Add {B} to your mana pool. + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana, new ManaCostsImpl("{R}"))); + } + + public AgentOfStromgald1(final AgentOfStromgald1 card) { + super(card); + } + + @Override + public AgentOfStromgald1 copy() { + return new AgentOfStromgald1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/alliances/AgentOfStromgald2.java b/Mage.Sets/src/mage/sets/alliances/AgentOfStromgald2.java new file mode 100644 index 0000000000..2c2d51c323 --- /dev/null +++ b/Mage.Sets/src/mage/sets/alliances/AgentOfStromgald2.java @@ -0,0 +1,55 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.alliances; + +import java.util.UUID; +import mage.MageInt; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class AgentOfStromgald2 extends AgentOfStromgald1 { + + public AgentOfStromgald2(UUID ownerId) { + super(ownerId); + this.cardNumber = 95; + } + + public AgentOfStromgald2(final AgentOfStromgald2 card) { + super(card); + } + + @Override + public AgentOfStromgald2 copy() { + return new AgentOfStromgald2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/alliances/LordOfTresserhorn.java b/Mage.Sets/src/mage/sets/alliances/LordOfTresserhorn.java index 615bff3951..12dc40a896 100644 --- a/Mage.Sets/src/mage/sets/alliances/LordOfTresserhorn.java +++ b/Mage.Sets/src/mage/sets/alliances/LordOfTresserhorn.java @@ -37,16 +37,13 @@ import mage.abilities.effects.Effect; import mage.abilities.effects.common.DrawCardTargetEffect; import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.abilities.effects.common.RegenerateSourceEffect; -import mage.abilities.effects.common.SacrificeTargetEffect; +import mage.abilities.effects.common.SacrificeControllerEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; -import mage.target.Target; -import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetOpponent; -import mage.target.targetpointer.SecondTargetPointer; /** * @@ -65,15 +62,13 @@ public class LordOfTresserhorn extends CardImpl { // When Lord of Tresserhorn enters the battlefield, you lose 2 life, you sacrifice two creatures, and target opponent draws two cards. Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeSourceControllerEffect(2), false); - ability.addEffect(new SacrificeTargetEffect(", you sacrifice two creatures")); - Target target = new TargetControlledCreaturePermanent(2,2, new FilterControlledCreaturePermanent(), true); - ability.addTarget(target); + ability.addEffect(new SacrificeControllerEffect(new FilterControlledCreaturePermanent("creatures"), 2, "you")); Effect effect = new DrawCardTargetEffect(2); effect.setText(", and target opponent draws two cards"); - effect.setTargetPointer(new SecondTargetPointer()); ability.addEffect(effect); ability.addTarget(new TargetOpponent()); this.addAbility(ability); + // {B}: Regenerate Lord of Tresserhorn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{B}"))); } diff --git a/Mage.Sets/src/mage/sets/alliances/PhyrexianWarBeast1.java b/Mage.Sets/src/mage/sets/alliances/PhyrexianWarBeast1.java index 5dad7465e1..e91607c20c 100644 --- a/Mage.Sets/src/mage/sets/alliances/PhyrexianWarBeast1.java +++ b/Mage.Sets/src/mage/sets/alliances/PhyrexianWarBeast1.java @@ -33,7 +33,7 @@ import mage.abilities.Ability; import mage.abilities.common.LeavesBattlefieldTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DamageControllerEffect; -import mage.abilities.effects.common.SacrificeTargetEffect; +import mage.abilities.effects.common.SacrificeControllerEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; @@ -54,10 +54,8 @@ public class PhyrexianWarBeast1 extends CardImpl { this.toughness = new MageInt(4); // When Phyrexian War Beast leaves the battlefield, sacrifice a land and Phyrexian War Beast deals 1 damage to you. - Effect effect = new SacrificeTargetEffect(); - effect.setText("sacrifice a land"); - Ability ability = new LeavesBattlefieldTriggeredAbility(effect, false); - effect = new DamageControllerEffect(1); + Ability ability = new LeavesBattlefieldTriggeredAbility(new SacrificeControllerEffect(new FilterControlledLandPermanent(), 1, ""), false); + Effect effect = new DamageControllerEffect(1); effect.setText("and {this} deals 1 damage to you"); ability.addEffect(effect); ability.addTarget(new TargetControlledPermanent(new FilterControlledLandPermanent())); diff --git a/Mage.Sets/src/mage/sets/antiquities/PowerArtifact.java b/Mage.Sets/src/mage/sets/antiquities/PowerArtifact.java index 64ac7fd00b..b36596b5cb 100644 --- a/Mage.Sets/src/mage/sets/antiquities/PowerArtifact.java +++ b/Mage.Sets/src/mage/sets/antiquities/PowerArtifact.java @@ -8,6 +8,7 @@ package mage.sets.antiquities; 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.AttachEffect; import mage.abilities.effects.common.cost.CostModificationEffectImpl; @@ -32,48 +33,46 @@ import mage.util.CardUtil; * @author nick.myers */ public class PowerArtifact extends CardImpl { - + public PowerArtifact(UUID ownerId) { super(ownerId, 55, "Power Artifact", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{U}{U}"); this.expansionSetCode = "ATQ"; this.subtype.add("Aura"); - + // Enchant artifact TargetPermanent auraTarget = new TargetArtifactPermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - - // The activation cost of target artifact is reduced by {2}. If this would reduce target - // artifact's activation cost below {1}, target artifact's activation cost becomes {1}. - // Power Artifact has no effect on artifacts that have no activation cost or whose activation - // cost is {0}. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PowerArtifactCostModificationEffect())); + + // Enchanted artifact's activated abilities cost less to activate. + // This effect can't reduce the amount of mana an ability costs to activate to less than one mana. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PowerArtifactCostModificationEffect())); } - + public PowerArtifact(final PowerArtifact card) { super(card); } - + @Override public PowerArtifact copy() { return new PowerArtifact(this); - } + } } class PowerArtifactCostModificationEffect extends CostModificationEffectImpl { - + PowerArtifactCostModificationEffect() { super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST); staticText = "The activation cost of target artifact is reduced by {2}. If this would reduce target artifact's activation cost below {1}, target artifact's activation cost becomes {1}. Power artifact has no effect on artifacts that have no activation cost or whose activation cost is {0}."; - + } - + PowerArtifactCostModificationEffect(PowerArtifactCostModificationEffect effect) { super(effect); } - + @Override public boolean apply(Game game, Ability source, Ability abilityToModify) { Player controller = game.getPlayer(abilityToModify.getControllerId()); @@ -90,21 +89,22 @@ class PowerArtifactCostModificationEffect extends CostModificationEffectImpl { } return true; } - + @Override public boolean applies(Ability abilityToModify, Ability source, Game game) { Permanent artifact = game.getPermanent(abilityToModify.getSourceId()); if (artifact != null && artifact.getAttachments().contains(source.getSourceId())) { - if (abilityToModify.getAbilityType().equals(AbilityType.ACTIVATED)) { + if (abilityToModify.getAbilityType().equals(AbilityType.ACTIVATED) + || (abilityToModify.getAbilityType().equals(AbilityType.MANA) && (abilityToModify instanceof ActivatedAbility))) { return true; } } return false; } - - @Override + + @Override public PowerArtifactCostModificationEffect copy() { return new PowerArtifactCostModificationEffect(this); } - + } diff --git a/Mage.Sets/src/mage/sets/arabiannights/JununEfreet.java b/Mage.Sets/src/mage/sets/arabiannights/JununEfreet.java new file mode 100644 index 0000000000..58ca657c48 --- /dev/null +++ b/Mage.Sets/src/mage/sets/arabiannights/JununEfreet.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.arabiannights; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class JununEfreet extends mage.sets.fourthedition.JununEfreet { + + public JununEfreet(UUID ownerId) { + super(ownerId); + this.cardNumber = 8; + this.expansionSetCode = "ARN"; + this.rarity = Rarity.RARE; + } + + public JununEfreet(final JununEfreet card) { + super(card); + } + + @Override + public JununEfreet copy() { + return new JununEfreet(this); + } +} diff --git a/Mage.Sets/src/mage/sets/archenemy/BatteringCraghorn.java b/Mage.Sets/src/mage/sets/archenemy/BatteringCraghorn.java new file mode 100644 index 0000000000..af9b1c2303 --- /dev/null +++ b/Mage.Sets/src/mage/sets/archenemy/BatteringCraghorn.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.archenemy; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class BatteringCraghorn extends CardImpl { + + public BatteringCraghorn(UUID ownerId) { + super(ownerId, 30, "Battering Craghorn", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + this.expansionSetCode = "ARC"; + this.subtype.add("Goat"); + this.subtype.add("Beast"); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + // Morph {1}{R}{R} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{1}{R}{R}"))); + } + + public BatteringCraghorn(final BatteringCraghorn card) { + super(card); + } + + @Override + public BatteringCraghorn copy() { + return new BatteringCraghorn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/archenemy/SpinIntoMyth.java b/Mage.Sets/src/mage/sets/archenemy/SpinIntoMyth.java index a06b14131b..2d0e7b1cc4 100644 --- a/Mage.Sets/src/mage/sets/archenemy/SpinIntoMyth.java +++ b/Mage.Sets/src/mage/sets/archenemy/SpinIntoMyth.java @@ -50,7 +50,7 @@ public class SpinIntoMyth extends CardImpl { this.getSpellAbility().addEffect(new PutOnLibraryTargetEffect(true)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); Effect effect = new FatesealEffect(2); - effect.setText("then fateseal 2. (To fateseal 2, look at the top two cards of an opponent's library, then put any number of them on the bottom of that player's library and the rest on top in any order.)"); + effect.setText(", then fateseal 2. (To fateseal 2, look at the top two cards of an opponent's library, then put any number of them on the bottom of that player's library and the rest on top in any order.)"); this.getSpellAbility().addEffect(effect); } diff --git a/Mage.Sets/src/mage/sets/avacynrestored/ReforgeTheSoul.java b/Mage.Sets/src/mage/sets/avacynrestored/ReforgeTheSoul.java index 7047040a5f..90ac73de41 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/ReforgeTheSoul.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/ReforgeTheSoul.java @@ -28,17 +28,14 @@ package mage.sets.avacynrestored; import java.util.UUID; -import mage.abilities.Ability; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawCardAllEffect; +import mage.abilities.effects.common.discard.DiscardHandAllEffect; import mage.abilities.keyword.MiracleAbility; -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; /** * @@ -50,9 +47,11 @@ public class ReforgeTheSoul extends CardImpl { super(ownerId, 151, "Reforge the Soul", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{R}{R}"); this.expansionSetCode = "AVR"; - // Each player discards his or her hand, then draws seven cards. - this.getSpellAbility().addEffect(new ReforgeTheSoulEffect()); + this.getSpellAbility().addEffect(new DiscardHandAllEffect()); + Effect effect = new DrawCardAllEffect(7); + effect.setText(", then draws seven cards"); + this.getSpellAbility().addEffect(effect); // Miracle {1}{R} this.addAbility(new MiracleAbility(this, new ManaCostsImpl("{1}{R}"))); @@ -67,39 +66,3 @@ public class ReforgeTheSoul extends CardImpl { return new ReforgeTheSoul(this); } } - -class ReforgeTheSoulEffect extends OneShotEffect { - - public ReforgeTheSoulEffect() { - super(Outcome.DrawCard); - this.staticText = "Each player discards his or her hand, then draws seven cards"; - } - - public ReforgeTheSoulEffect(final ReforgeTheSoulEffect effect) { - super(effect); - } - - @Override - public ReforgeTheSoulEffect copy() { - return new ReforgeTheSoulEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - for (UUID playerId : controller.getInRange()) { - Player player = game.getPlayer(playerId); - if (player != null) { - for (Card card : player.getHand().getCards(game)) { - player.discard(card, source, game); - } - - player.drawCards(7, game); - } - } - return true; - } - return false; - } -} diff --git a/Mage.Sets/src/mage/sets/avacynrestored/ThatcherRevolt.java b/Mage.Sets/src/mage/sets/avacynrestored/ThatcherRevolt.java index 141d60e828..c2fc5802c1 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/ThatcherRevolt.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/ThatcherRevolt.java @@ -28,9 +28,6 @@ package mage.sets.avacynrestored; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; import mage.MageInt; import mage.ObjectColor; import mage.abilities.Ability; @@ -40,7 +37,11 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.SacrificeTargetEffect; import mage.abilities.keyword.HasteAbility; 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.game.permanent.token.Token; import mage.target.targetpointer.FixedTarget; @@ -54,7 +55,6 @@ public class ThatcherRevolt extends CardImpl { super(ownerId, 158, "Thatcher Revolt", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{R}"); this.expansionSetCode = "AVR"; - // Put three 1/1 red Human creature tokens with haste onto the battlefield. Sacrifice those tokens at the beginning of the next end step. this.getSpellAbility().addEffect(new ThatcherRevoltEffect()); } @@ -90,14 +90,16 @@ class ThatcherRevoltEffect extends OneShotEffect { for (int i = 0; i < 3; i++) { RedHumanToken token = new RedHumanToken(); token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); - - SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice this token"); - sacrificeEffect.setTargetPointer(new FixedTarget(token.getLastAddedToken())); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); + Permanent permanent = game.getPermanent(token.getLastAddedToken()); + if (permanent != null) { + SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice this token", source.getControllerId()); + sacrificeEffect.setTargetPointer(new FixedTarget(permanent, game)); + DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(game), game); + game.addDelayedTriggeredAbility(delayedAbility); + } } return true; } diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/RetreatToKazandu.java b/Mage.Sets/src/mage/sets/battleforzendikar/RetreatToKazandu.java new file mode 100644 index 0000000000..9e6a22241c --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/RetreatToKazandu.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 RetreatToKazandu extends mage.sets.zendikarvseldrazi.RetreatToKazandu { + + public RetreatToKazandu(UUID ownerId) { + super(ownerId); + this.cardNumber = 999; + this.expansionSetCode = "BFZ"; + } + + public RetreatToKazandu(final RetreatToKazandu card) { + super(card); + } + + @Override + public RetreatToKazandu copy() { + return new RetreatToKazandu(this); + } +} diff --git a/Mage.Sets/src/mage/sets/battleforzendikar/VeteranWarleader.java b/Mage.Sets/src/mage/sets/battleforzendikar/VeteranWarleader.java new file mode 100644 index 0000000000..d3c4b53ea7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/battleforzendikar/VeteranWarleader.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 VeteranWarleader extends mage.sets.zendikarvseldrazi.VeteranWarleader { + + public VeteranWarleader(UUID ownerId) { + super(ownerId); + this.cardNumber = 999; + this.expansionSetCode = "BFZ"; + } + + public VeteranWarleader(final VeteranWarleader card) { + super(card); + } + + @Override + public VeteranWarleader copy() { + return new VeteranWarleader(this); + } +} diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/SwayOfTheStars.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/SwayOfTheStars.java index 5641bb5968..4764132a42 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/SwayOfTheStars.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/SwayOfTheStars.java @@ -28,14 +28,18 @@ package mage.sets.betrayersofkamigawa; import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DrawCardAllEffect; +import mage.abilities.effects.common.SetPlayerLifeAllEffect; +import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; +import mage.filter.FilterPermanent; +import mage.filter.predicate.other.OwnerIdPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; @@ -50,9 +54,12 @@ public class SwayOfTheStars extends CardImpl { super(ownerId, 54, "Sway of the Stars", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{8}{U}{U}"); this.expansionSetCode = "BOK"; - // Each player shuffles his or her hand, graveyard, and permanents he or she owns into his or her library, then draws seven cards. Each player's life total becomes 7. this.getSpellAbility().addEffect(new SwayOfTheStarsEffect()); + Effect effect = new DrawCardAllEffect(7); + effect.setText(", then draws seven cards"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addEffect(new SetPlayerLifeAllEffect(7)); } @@ -66,7 +73,6 @@ public class SwayOfTheStars extends CardImpl { } } - class SwayOfTheStarsEffect extends OneShotEffect { public SwayOfTheStarsEffect() { @@ -80,24 +86,19 @@ class SwayOfTheStarsEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player sourcePlayer = game.getPlayer(source.getControllerId()); + Player controller = game.getPlayer(source.getControllerId()); - for (Permanent permanent : game.getBattlefield().getActivePermanents(source.getControllerId(), game)) { - permanent.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); - } - - for (UUID playerId: sourcePlayer.getInRange()) { + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { - for (Card card: player.getHand().getCards(game)) { - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); - } - for (Card card: player.getGraveyard().getCards(game)) { - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); - } + player.moveCards(player.getHand(), Zone.HAND, Zone.LIBRARY, source, game); + player.moveCards(player.getGraveyard(), Zone.GRAVEYARD, Zone.LIBRARY, source, game); + FilterPermanent filter = new FilterPermanent(); + filter.add(new OwnerIdPredicate(playerId)); + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, controller.getId(), source.getSourceId(), game)) { + permanent.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); + } player.shuffleLibrary(game); - player.drawCards(7, game); - player.setLife(7, game); } } return true; @@ -108,4 +109,4 @@ class SwayOfTheStarsEffect extends OneShotEffect { return new SwayOfTheStarsEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/bornofthegods/AstralCornucopia.java b/Mage.Sets/src/mage/sets/bornofthegods/AstralCornucopia.java index 72046e837c..def4ee17b9 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/AstralCornucopia.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/AstralCornucopia.java @@ -77,6 +77,7 @@ public class AstralCornucopia extends CardImpl { } class AstralCornucopiaEffect extends OneShotEffect { + public AstralCornucopiaEffect() { super(Outcome.Benefit); } @@ -90,9 +91,8 @@ class AstralCornucopiaEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { - // delete to prevent using it again if put into battlefield from other effect - setValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY, null); + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { int amount = ((SpellAbility) obj).getManaCostsToPay().getX(); if (amount > 0) { permanent.addCounters(CounterType.CHARGE.createInstance(amount), game); @@ -130,7 +130,7 @@ class AstralCornucopiaManaAbility extends ManaAbility { if (sourcePermanent != null) { int counters = sourcePermanent.getCounters().getCount(CounterType.CHARGE.getName()); if (counters > 0) { - netMana.add(new Mana(0,0,0,0,0,0,counters)); + netMana.add(new Mana(0, 0, 0, 0, 0, 0, counters)); } } return netMana; diff --git a/Mage.Sets/src/mage/sets/bornofthegods/EverflameEidolon.java b/Mage.Sets/src/mage/sets/bornofthegods/EverflameEidolon.java index 3239aff414..dc091c0b57 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/EverflameEidolon.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/EverflameEidolon.java @@ -29,19 +29,22 @@ package mage.sets.bornofthegods; import java.util.UUID; import mage.MageInt; +import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.condition.common.SourceHasSubtypeCondition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.continuous.BoostEnchantedEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.BestowAbility; 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; /** * @@ -60,12 +63,7 @@ public class EverflameEidolon extends CardImpl { // Bestow {2}{R} this.addAbility(new BestowAbility(this, "{2}{R}")); // {R}: Everflame Eidolon gets +1/+0 until end of turn. If it's an Aura, enchanted creature gets +1/+0 until end of turn instead. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( - new BoostEnchantedEffect(1, 0, Duration.EndOfTurn), - new BoostSourceEffect(1, 0, Duration.EndOfTurn), - new SourceHasSubtypeCondition("Aura"), - "{this} gets +1/+0 until end of turn. If it's an Aura, enchanted creature gets +1/+0 until end of turn instead"), - new ManaCostsImpl("{R}"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new EverflameEidolonEffect(), new ManaCostsImpl("{R}"))); // Enchanted creature gets +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1, Duration.WhileOnBattlefield))); } @@ -79,3 +77,34 @@ public class EverflameEidolon extends CardImpl { return new EverflameEidolon(this); } } + +class EverflameEidolonEffect extends OneShotEffect { + + public EverflameEidolonEffect() { + super(Outcome.BoostCreature); + this.staticText = "{this} gets +1/+0 until end of turn. If it's an Aura, enchanted creature gets +1/+0 until end of turn instead"; + } + + public EverflameEidolonEffect(final EverflameEidolonEffect effect) { + super(effect); + } + + @Override + public EverflameEidolonEffect copy() { + return new EverflameEidolonEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent sourceObject = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (sourceObject != null) { + if (sourceObject.getSubtype().contains("Aura")) { + new BoostEnchantedEffect(1, 0, Duration.EndOfTurn).apply(game, source); + } else { + game.addEffect(new BoostSourceEffect(1, 0, Duration.EndOfTurn), source); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/JunkyoBell.java b/Mage.Sets/src/mage/sets/championsofkamigawa/JunkyoBell.java index 7e1c9efce0..da08e4cd46 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/JunkyoBell.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/JunkyoBell.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.championsofkamigawa; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Rarity; import mage.abilities.Ability; import mage.abilities.DelayedTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; @@ -41,8 +37,10 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.SacrificeTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect; 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.filter.common.FilterControlledCreaturePermanent; import mage.game.Game; @@ -58,8 +56,8 @@ public class JunkyoBell extends CardImpl { public JunkyoBell(UUID ownerId) { super(ownerId, 258, "Junkyo Bell", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}"); this.expansionSetCode = "CHK"; - - // At the beginning of your upkeep, you may have target creature you control get +X/+X until end of turn, + + // At the beginning of your upkeep, you may have target creature you control get +X/+X until end of turn, // where X is the number of creatures you control. If you do, sacrifice that creature at the beginning of the next end step. PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()); Ability ability = new BeginningOfUpkeepTriggeredAbility(new BoostTargetEffect(amount, amount, Duration.EndOfTurn), TargetController.YOU, true); @@ -77,37 +75,36 @@ public class JunkyoBell extends CardImpl { return new JunkyoBell(this); } - -private class JunkyoBellSacrificeEffect extends OneShotEffect { + private class JunkyoBellSacrificeEffect extends OneShotEffect { - public JunkyoBellSacrificeEffect() { - super(Outcome.Sacrifice); - this.staticText = "If you do, sacrifice that creature at the beginning of the next end step"; - } - - public JunkyoBellSacrificeEffect(final JunkyoBellSacrificeEffect effect) { - super(effect); - } - - @Override - public JunkyoBellSacrificeEffect copy() { - return new JunkyoBellSacrificeEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent creature = game.getPermanent(source.getFirstTarget()); - if (creature != null) { - SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice boosted " + creature.getName()); - sacrificeEffect.setTargetPointer(new FixedTarget(source.getFirstTarget())); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); - return true; + public JunkyoBellSacrificeEffect() { + super(Outcome.Sacrifice); + this.staticText = "If you do, sacrifice that creature at the beginning of the next end step"; + } + + public JunkyoBellSacrificeEffect(final JunkyoBellSacrificeEffect effect) { + super(effect); + } + + @Override + public JunkyoBellSacrificeEffect copy() { + return new JunkyoBellSacrificeEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent creature = game.getPermanent(source.getFirstTarget()); + if (creature != null) { + SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice boosted " + creature.getName(), source.getControllerId()); + sacrificeEffect.setTargetPointer(new FixedTarget(creature, game)); + DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(game), game); + game.addDelayedTriggeredAbility(delayedAbility); + return true; + } + return false; } - return false; } - } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/KikiJikiMirrorBreaker.java b/Mage.Sets/src/mage/sets/championsofkamigawa/KikiJikiMirrorBreaker.java index 3d8eac8a7c..2cf5cc1ea2 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/KikiJikiMirrorBreaker.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/KikiJikiMirrorBreaker.java @@ -28,10 +28,6 @@ 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.DelayedTriggeredAbility; @@ -42,7 +38,10 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.SacrificeTargetEffect; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; +import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SupertypePredicate; @@ -124,8 +123,7 @@ class KikiJikiMirrorBreakerEffect extends OneShotEffect { token.addAbility(HasteAbility.getInstance()); token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); - SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect(); - sacrificeEffect.setText("Sacrifice the token at the beginning of the next end step"); + SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("Sacrifice the token at the beginning of the next end step", source.getControllerId()); sacrificeEffect.setTargetPointer(new FixedTarget(token.getLastAddedToken())); DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect); delayedAbility.setSourceId(source.getSourceId()); diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/OniPossession.java b/Mage.Sets/src/mage/sets/championsofkamigawa/OniPossession.java index bc1c23d49e..44fd1be0eb 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/OniPossession.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/OniPossession.java @@ -30,22 +30,26 @@ package mage.sets.championsofkamigawa; import java.util.ArrayList; import java.util.List; import java.util.UUID; - -import mage.constants.*; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.AttachEffect; -import mage.abilities.effects.common.SacrificeTargetEffect; +import mage.abilities.effects.common.SacrificeControllerEffect; import mage.abilities.effects.common.continuous.BoostEnchantedEffect; import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.effects.common.continuous.SetCardSubtypeAttachedEffect; import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.TrampleAbility; 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.TargetController; +import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.target.TargetPermanent; -import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetCreaturePermanent; /** @@ -54,7 +58,8 @@ import mage.target.common.TargetCreaturePermanent; */ public class OniPossession extends CardImpl { - private static final List setSubtypes = new ArrayList(); + private static final List setSubtypes = new ArrayList<>(); + static { setSubtypes.add("Demon"); setSubtypes.add("Spirit"); @@ -67,13 +72,14 @@ public class OniPossession extends CardImpl { // 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); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + // At the beginning of your upkeep, sacrifice a creature. - Ability ability2 = new BeginningOfUpkeepTriggeredAbility(new SacrificeTargetEffect("sacrifice a creature"), TargetController.YOU, false); - ability2.addTarget(new TargetControlledCreaturePermanent(1,1, new FilterControlledCreaturePermanent(),false)); + Ability ability2 = new BeginningOfUpkeepTriggeredAbility( + new SacrificeControllerEffect(new FilterControlledCreaturePermanent(), 1, ""), TargetController.YOU, false); this.addAbility(ability2); // Enchanted creature gets +3/+3 and has trample. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(3, 3, Duration.WhileOnBattlefield))); diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/OrochiHatchery.java b/Mage.Sets/src/mage/sets/championsofkamigawa/OrochiHatchery.java index 242e3557c1..56a0e0acb1 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/OrochiHatchery.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/OrochiHatchery.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,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. @@ -28,10 +28,6 @@ package mage.sets.championsofkamigawa; 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.SpellAbility; import mage.abilities.common.EntersBattlefieldAbility; @@ -43,6 +39,10 @@ import mage.abilities.effects.EntersBattlefieldEffect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateTokenEffect; 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; @@ -61,7 +61,7 @@ public class OrochiHatchery extends CardImpl { this.addAbility(new EntersBattlefieldAbility(new OrochiHatcheryEffect(), "with X charge counters on it")); // {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)); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SnakeToken(), new CountersCount(CounterType.CHARGE)), new GenericManaCost(5)); ability.addCost(new TapSourceCost()); this.addAbility(ability); } @@ -78,6 +78,7 @@ public class OrochiHatchery extends CardImpl { } class OrochiHatcheryEffect extends OneShotEffect { + public OrochiHatcheryEffect() { super(Outcome.Benefit); } @@ -91,9 +92,8 @@ class OrochiHatcheryEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { - // delete to prevent using it again if put into battlefield from other effect - setValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY, null); + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) {; int amount = ((SpellAbility) obj).getManaCostsToPay().getX(); if (amount > 0) { permanent.addCounters(CounterType.CHARGE.createInstance(amount), game); @@ -107,4 +107,4 @@ class OrochiHatcheryEffect extends OneShotEffect { public OrochiHatcheryEffect copy() { return new OrochiHatcheryEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/ThroughTheBreach.java b/Mage.Sets/src/mage/sets/championsofkamigawa/ThroughTheBreach.java index 86980d0f77..bf4e4d5139 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/ThroughTheBreach.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/ThroughTheBreach.java @@ -63,7 +63,6 @@ public class ThroughTheBreach extends CardImpl { this.expansionSetCode = "CHK"; this.subtype.add("Arcane"); - // 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. this.getSpellAbility().addEffect(new ThroughTheBreachEffect()); // Splice onto Arcane {2}{R}{R} @@ -81,7 +80,7 @@ public class ThroughTheBreach extends CardImpl { } class ThroughTheBreachEffect extends OneShotEffect { - + private static final String choiceText = "Put a creature card from your hand onto the battlefield?"; public ThroughTheBreachEffect() { @@ -111,10 +110,10 @@ class ThroughTheBreachEffect extends OneShotEffect { Permanent permanent = game.getPermanent(card.getId()); if (permanent != null) { ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.Custom); - effect.setTargetPointer(new FixedTarget(permanent.getId())); + effect.setTargetPointer(new FixedTarget(permanent, game)); game.addEffect(effect, source); - SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice " + card.getName()); - sacrificeEffect.setTargetPointer(new FixedTarget(card.getId())); + SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice " + card.getName(), source.getControllerId()); + sacrificeEffect.setTargetPointer(new FixedTarget(permanent, game)); DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect); delayedAbility.setSourceId(source.getSourceId()); delayedAbility.setControllerId(source.getControllerId()); diff --git a/Mage.Sets/src/mage/sets/coldsnap/LovisaColdeyes.java b/Mage.Sets/src/mage/sets/coldsnap/LovisaColdeyes.java new file mode 100644 index 0000000000..ebdff5a908 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/LovisaColdeyes.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.sets.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +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.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author LoneFox + */ +public class LovisaColdeyes extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you control that's a Barbarian, a Warrior, or a Berserker"); + + static { + filter.add(Predicates.or(new SubtypePredicate("Barbarian"), new SubtypePredicate("Warrior"), new SubtypePredicate("Berserker"))); + } + + public LovisaColdeyes(UUID ownerId) { + super(ownerId, 90, "Lovisa Coldeyes", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); + this.expansionSetCode = "CSP"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Each creature you control that's a Barbarian, a Warrior, or a Berserker gets +2/+2 and has haste. + Effect effect = new BoostControlledEffect(2, 2, Duration.WhileOnBattlefield, filter, false); + effect.setText("Each creature you control that's a Barbarian, a Warrior, or a Berserker gets +2/+2"); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); + effect = new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, filter, false); + effect.setText("and has haste"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public LovisaColdeyes(final LovisaColdeyes card) { + super(card); + } + + @Override + public LovisaColdeyes copy() { + return new LovisaColdeyes(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/MysticMelting.java b/Mage.Sets/src/mage/sets/coldsnap/MysticMelting.java new file mode 100644 index 0000000000..df32d4ef61 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/MysticMelting.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.coldsnap; + +import java.util.UUID; +import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.target.TargetPermanent; + +/** + * + * @author fireshoes + */ +public class MysticMelting extends CardImpl { + + public MysticMelting(UUID ownerId) { + super(ownerId, 114, "Mystic Melting", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{3}{G}"); + this.expansionSetCode = "CSP"; + + // Destroy target artifact or enchantment. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent())); + + // Draw a card at the beginning of the next turn's upkeep. + this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect( + new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1)), false)); + } + + public MysticMelting(final MysticMelting card) { + super(card); + } + + @Override + public MysticMelting copy() { + return new MysticMelting(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/PhobianPhantasm.java b/Mage.Sets/src/mage/sets/coldsnap/PhobianPhantasm.java new file mode 100644 index 0000000000..f70ed99055 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/PhobianPhantasm.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.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.abilities.keyword.FearAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class PhobianPhantasm extends CardImpl { + + public PhobianPhantasm(UUID ownerId) { + super(ownerId, 66, "Phobian Phantasm", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); + this.expansionSetCode = "CSP"; + this.subtype.add("Illusion"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying; fear + this.addAbility(FlyingAbility.getInstance()); + this.addAbility(FearAbility.getInstance()); + // Cumulative upkeep {B} + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{B}"))); + } + + public PhobianPhantasm(final PhobianPhantasm card) { + super(card); + } + + @Override + public PhobianPhantasm copy() { + return new PhobianPhantasm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/RonomHulk.java b/Mage.Sets/src/mage/sets/coldsnap/RonomHulk.java new file mode 100644 index 0000000000..3ccf0bb3e2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/RonomHulk.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.coldsnap; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.SupertypePredicate; + +/** + * + * @author LoneFox + */ +public class RonomHulk extends CardImpl { + + private static final FilterCard filter = new FilterCard("snow"); + + static { + filter.add(new SupertypePredicate("Snow")); + } + + public RonomHulk(UUID ownerId) { + super(ownerId, 119, "Ronom Hulk", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{G}"); + this.expansionSetCode = "CSP"; + this.subtype.add("Beast"); + this.power = new MageInt(5); + this.toughness = new MageInt(6); + + // Protection from snow + this.addAbility(new ProtectionAbility(filter)); + // Cumulative upkeep {1} + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{1}"))); + } + + public RonomHulk(final RonomHulk card) { + super(card); + } + + @Override + public RonomHulk copy() { + return new RonomHulk(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/SteamSpitter.java b/Mage.Sets/src/mage/sets/coldsnap/SteamSpitter.java new file mode 100644 index 0000000000..bc75f97216 --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/SteamSpitter.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.coldsnap; + +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.ReachAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class SteamSpitter extends CardImpl { + + public SteamSpitter(UUID ownerId) { + super(ownerId, 124, "Steam Spitter", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{G}"); + this.expansionSetCode = "CSP"; + this.subtype.add("Spider"); + this.power = new MageInt(1); + this.toughness = new MageInt(5); + + // Reach + this.addAbility(ReachAbility.getInstance()); + // {R}: Steam Spitter gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}"))); + } + + public SteamSpitter(final SteamSpitter card) { + super(card); + } + + @Override + public SteamSpitter copy() { + return new SteamSpitter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/coldsnap/UrsineFylgja.java b/Mage.Sets/src/mage/sets/coldsnap/UrsineFylgja.java new file mode 100644 index 0000000000..98a464f1cb --- /dev/null +++ b/Mage.Sets/src/mage/sets/coldsnap/UrsineFylgja.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.coldsnap; + +import java.util.UUID; +import mage.MageInt; +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.Effect; +import mage.abilities.effects.common.PreventDamageToSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author LoneFox + */ +public class UrsineFylgja extends CardImpl { + + public UrsineFylgja(UUID ownerId) { + super(ownerId, 22, "Ursine Fylgja", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{W}"); + this.expansionSetCode = "CSP"; + this.subtype.add("Spirit"); + this.subtype.add("Bear"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Ursine Fylgja enters the battlefield with four healing counters on it. + Effect effect = new AddCountersSourceEffect(CounterType.HEALING.createInstance(4)); + effect.setText("with four healing counters on it."); + this.addAbility(new EntersBattlefieldAbility(effect)); + // Remove a healing counter from Ursine Fylgja: Prevent the next 1 damage that would be dealt to Ursine Fylgja this turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToSourceEffect(Duration.EndOfTurn, 1), + new RemoveCountersSourceCost(CounterType.HEALING.createInstance(1)))); + // {2}{W}: Put a healing counter on Ursine Fylgja. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.HEALING.createInstance(1)), + new ManaCostsImpl("{2}{W}"))); + } + + public UrsineFylgja(final UrsineFylgja card) { + super(card); + } + + @Override + public UrsineFylgja copy() { + return new UrsineFylgja(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander/ScatteringStroke.java b/Mage.Sets/src/mage/sets/commander/ScatteringStroke.java index 7512eb1a80..ec8b95d2c5 100644 --- a/Mage.Sets/src/mage/sets/commander/ScatteringStroke.java +++ b/Mage.Sets/src/mage/sets/commander/ScatteringStroke.java @@ -1,112 +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.commander; - -import java.util.UUID; -import mage.Mana; -import mage.abilities.Ability; -import mage.abilities.common.delayed.AtTheBeginOMainPhaseDelayedTriggeredAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.AddManaToManaPoolSourceControllerEffect; -import mage.abilities.effects.common.AddManaToManaPoolTargetControllerEffect; -import mage.abilities.effects.common.ClashEffect; -import mage.cards.CardImpl; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.TargetController; -import mage.game.Game; -import mage.game.stack.Spell; -import mage.players.Player; -import mage.target.TargetSpell; -import mage.target.targetpointer.FixedTarget; - -/** - * - * @author LevelX2 - */ -public class ScatteringStroke extends CardImpl { - - public ScatteringStroke(UUID ownerId) { - super(ownerId, 60, "Scattering Stroke", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{U}{U}"); - this.expansionSetCode = "CMD"; - - - // Counter target spell. Clash with an opponent. If you win, at the beginning of your next main phase, you may add {X} to your mana pool, where X is that spell's converted mana cost. - this.getSpellAbility().addEffect(new ScatteringStrokeEffect()); - this.getSpellAbility().addTarget(new TargetSpell()); - } - - public ScatteringStroke(final ScatteringStroke card) { - super(card); - } - - @Override - public ScatteringStroke copy() { - return new ScatteringStroke(this); - } -} - - -class ScatteringStrokeEffect extends OneShotEffect { - - public ScatteringStrokeEffect() { - super(Outcome.Benefit); - this.staticText = "Counter target spell. Clash with an opponent. If you win, at the beginning of your next main phase, you may add {X} to your mana pool, where X is that spell's converted mana cost"; - } - - public ScatteringStrokeEffect(final ScatteringStrokeEffect effect) { - super(effect); - } - - @Override - public ScatteringStrokeEffect copy() { - return new ScatteringStrokeEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Spell spell = (Spell) game.getStack().getStackObject(getTargetPointer().getFirst(game, source)); - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null && spell != null) { - game.getStack().counter(spell.getId(), source.getSourceId(), game); - if (ClashEffect.getInstance().apply(game, source)) { - Effect effect = new AddManaToManaPoolSourceControllerEffect(new Mana(0,0,0,0,0,spell.getConvertedManaCost(),0)); - AtTheBeginOMainPhaseDelayedTriggeredAbility delayedAbility = - new AtTheBeginOMainPhaseDelayedTriggeredAbility(effect, true, TargetController.YOU, AtTheBeginOMainPhaseDelayedTriggeredAbility.PhaseSelection.NEXT_MAIN); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); - } - return true; - } - return false; - } +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.commander; + +import java.util.UUID; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.common.delayed.AtTheBeginOMainPhaseDelayedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.AddManaToManaPoolSourceControllerEffect; +import mage.abilities.effects.common.ClashEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.players.Player; +import mage.target.TargetSpell; + +/** + * + * @author LevelX2 + */ +public class ScatteringStroke extends CardImpl { + + public ScatteringStroke(UUID ownerId) { + super(ownerId, 60, "Scattering Stroke", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{U}{U}"); + this.expansionSetCode = "CMD"; + + + // Counter target spell. Clash with an opponent. If you win, at the beginning of your next main phase, you may add {X} to your mana pool, where X is that spell's converted mana cost. + this.getSpellAbility().addEffect(new ScatteringStrokeEffect()); + this.getSpellAbility().addTarget(new TargetSpell()); + } + + public ScatteringStroke(final ScatteringStroke card) { + super(card); + } + + @Override + public ScatteringStroke copy() { + return new ScatteringStroke(this); + } +} + + +class ScatteringStrokeEffect extends OneShotEffect { + + public ScatteringStrokeEffect() { + super(Outcome.Benefit); + this.staticText = "Counter target spell. Clash with an opponent. If you win, at the beginning of your next main phase, you may add {X} to your mana pool, where X is that spell's converted mana cost"; + } + + public ScatteringStrokeEffect(final ScatteringStrokeEffect effect) { + super(effect); + } + + @Override + public ScatteringStrokeEffect copy() { + return new ScatteringStrokeEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Spell spell = (Spell) game.getStack().getStackObject(getTargetPointer().getFirst(game, source)); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null && spell != null) { + game.getStack().counter(spell.getId(), source.getSourceId(), game); + if (ClashEffect.getInstance().apply(game, source)) { + Effect effect = new AddManaToManaPoolSourceControllerEffect(new Mana(0,0,0,0,0,spell.getConvertedManaCost(),0)); + AtTheBeginOMainPhaseDelayedTriggeredAbility delayedAbility = + new AtTheBeginOMainPhaseDelayedTriggeredAbility(effect, true, TargetController.YOU, AtTheBeginOMainPhaseDelayedTriggeredAbility.PhaseSelection.NEXT_MAIN); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(game), game); + game.addDelayedTriggeredAbility(delayedAbility); + } + return true; + } + return false; + } } \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/commander2013/CurseOfShallowGraves.java b/Mage.Sets/src/mage/sets/commander2013/CurseOfShallowGraves.java index fa2e34e982..d51655b3c7 100644 --- a/Mage.Sets/src/mage/sets/commander2013/CurseOfShallowGraves.java +++ b/Mage.Sets/src/mage/sets/commander2013/CurseOfShallowGraves.java @@ -28,9 +28,11 @@ package mage.sets.commander2013; import java.util.UUID; +import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.CreateTokenTargetEffect; import mage.abilities.keyword.EnchantAbility; @@ -44,6 +46,7 @@ import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.game.permanent.token.ZombieToken; +import mage.players.Player; import mage.target.TargetPlayer; import mage.target.targetpointer.FixedTarget; @@ -59,7 +62,6 @@ public class CurseOfShallowGraves extends CardImpl { this.subtype.add("Aura"); this.subtype.add("Curse"); - // Enchant player TargetPlayer auraTarget = new TargetPlayer(); this.getSpellAbility().addTarget(auraTarget); @@ -83,7 +85,7 @@ public class CurseOfShallowGraves extends CardImpl { class CurseOfShallowTriggeredAbility extends TriggeredAbilityImpl { public CurseOfShallowTriggeredAbility() { - super(Zone.BATTLEFIELD, new CreateTokenTargetEffect(new ZombieToken(), new StaticValue(1), true, false), true); + super(Zone.BATTLEFIELD, new CurseOfShallowEffect()); } public CurseOfShallowTriggeredAbility(Effect effect, boolean optional, String text) { @@ -105,7 +107,7 @@ class CurseOfShallowTriggeredAbility extends TriggeredAbilityImpl { if (enchantment != null && enchantment.getAttachedTo() != null && game.getCombat().getPlayerDefenders(game).contains(enchantment.getAttachedTo())) { - for (Effect effect: this.getEffects()) { + for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(game.getCombat().getAttackerId())); } return true; @@ -124,3 +126,31 @@ class CurseOfShallowTriggeredAbility extends TriggeredAbilityImpl { } } + +class CurseOfShallowEffect extends OneShotEffect { + + public CurseOfShallowEffect() { + super(Outcome.Benefit); + this.staticText = "that attacking player may put a 2/2 black Zombie creature token onto the battlefield tapped"; + } + + public CurseOfShallowEffect(final CurseOfShallowEffect effect) { + super(effect); + } + + @Override + public CurseOfShallowEffect copy() { + return new CurseOfShallowEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player attacker = game.getPlayer(this.getTargetPointer().getFirst(game, source)); + if (attacker != null && attacker.chooseUse(outcome, "Put a 2/2 black Zombie creature token onto the battlefield tapped?", source, game)) { + Effect effect = new CreateTokenTargetEffect(new ZombieToken(), new StaticValue(1), true, false); + effect.setTargetPointer(targetPointer); + return effect.apply(game, source); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/commander2013/IncendiaryCommand.java b/Mage.Sets/src/mage/sets/commander2013/IncendiaryCommand.java index 133206403f..15d7bd457f 100644 --- a/Mage.Sets/src/mage/sets/commander2013/IncendiaryCommand.java +++ b/Mage.Sets/src/mage/sets/commander2013/IncendiaryCommand.java @@ -27,6 +27,8 @@ */ package mage.sets.commander2013; +import java.util.HashMap; +import java.util.Map; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.Mode; @@ -54,8 +56,7 @@ public class IncendiaryCommand extends CardImpl { super(ownerId, 113, "Incendiary Command", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{R}{R}"); this.expansionSetCode = "C13"; - - // Choose two - + // Choose two - this.getSpellAbility().getModes().setMinModes(2); this.getSpellAbility().getModes().setMaxModes(2); // Incendiary Command deals 4 damage to target player; @@ -107,16 +108,23 @@ class IncendiaryCommandDrawEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - for (UUID playerId : controller.getInRange()) { + Map cardsToDraw = new HashMap<>(); + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { - int cards = player.getHand().size(); - if (cards > 0) { - player.discard(cards, source, game); - player.drawCards(cards, game); + int cardsInHand = player.getHand().size(); + player.discard(cardsInHand, false, source, game); + if (cardsInHand > 0) { + cardsToDraw.put(playerId, cardsInHand); } } } + for (UUID playerId : cardsToDraw.keySet()) { + Player player = game.getPlayer(playerId); + if (player != null) { + player.drawCards(cardsToDraw.get(playerId), game); + } + } return true; } return false; diff --git a/Mage.Sets/src/mage/sets/commander2014/FeldonOfTheThirdPath.java b/Mage.Sets/src/mage/sets/commander2014/FeldonOfTheThirdPath.java index ad667be3a2..a3c53ae6d7 100644 --- a/Mage.Sets/src/mage/sets/commander2014/FeldonOfTheThirdPath.java +++ b/Mage.Sets/src/mage/sets/commander2014/FeldonOfTheThirdPath.java @@ -46,6 +46,7 @@ import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; import mage.game.Game; +import mage.game.permanent.Permanent; import mage.game.permanent.token.EmptyToken; import mage.target.common.TargetCardInYourGraveyard; import mage.target.targetpointer.FixedTarget; @@ -113,15 +114,16 @@ class FeldonOfTheThirdPathEffect extends OneShotEffect { } token.addAbility(HasteAbility.getInstance()); token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); - - SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect(); - sacrificeEffect.setText("Sacrifice the token at the beginning of the next end step"); - sacrificeEffect.setTargetPointer(new FixedTarget(token.getLastAddedToken())); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); + Permanent permanent = game.getPermanent(token.getLastAddedToken()); + if (permanent != null) { + SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("Sacrifice the token at the beginning of the next end step", source.getControllerId()); + sacrificeEffect.setTargetPointer(new FixedTarget(permanent, game)); + DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(game), game); + game.addDelayedTriggeredAbility(delayedAbility); + } return true; } diff --git a/Mage.Sets/src/mage/sets/commander2014/LifebloodHydra.java b/Mage.Sets/src/mage/sets/commander2014/LifebloodHydra.java index dbe2f5c444..fe68627ce7 100644 --- a/Mage.Sets/src/mage/sets/commander2014/LifebloodHydra.java +++ b/Mage.Sets/src/mage/sets/commander2014/LifebloodHydra.java @@ -61,7 +61,7 @@ public class LifebloodHydra extends CardImpl { // Trample 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")); @@ -95,7 +95,8 @@ class LifebloodHydraComesIntoPlayEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null && !permanent.isFaceDown(game)) { Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { int amount = ((SpellAbility) obj).getManaCostsToPay().getX(); if (amount > 0) { permanent.addCounters(CounterType.P1P1.createInstance(amount), game); @@ -111,6 +112,7 @@ class LifebloodHydraComesIntoPlayEffect extends OneShotEffect { } } + class LifebloodHydraEffect extends OneShotEffect { public LifebloodHydraEffect() { diff --git a/Mage.Sets/src/mage/sets/commander2014/WakeTheDead.java b/Mage.Sets/src/mage/sets/commander2014/WakeTheDead.java index f196efa60c..fc1c258ea1 100644 --- a/Mage.Sets/src/mage/sets/commander2014/WakeTheDead.java +++ b/Mage.Sets/src/mage/sets/commander2014/WakeTheDead.java @@ -33,7 +33,6 @@ import mage.abilities.DelayedTriggeredAbility; import mage.abilities.SpellAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; -import mage.abilities.dynamicvalue.common.GetXValue; import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; @@ -64,7 +63,6 @@ public class WakeTheDead extends CardImpl { super(ownerId, 31, "Wake the Dead", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{X}{B}{B}"); this.expansionSetCode = "C14"; - // Cast Wake the Dead only during combat on an opponent's turn. Ability ability = new SimpleStaticAbility(Zone.ALL, new WakeTheDeadEffect()); ability.setRuleAtTheTop(true); @@ -72,7 +70,7 @@ public class WakeTheDead extends CardImpl { // Return X target creature cards from your graveyard to the battlefield. Sacrifice those creatures at the beginning of the next end step. this.getSpellAbility().addEffect(new WakeTheDeadReturnFromGraveyardToBattlefieldTargetEffect()); - this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0,Integer.MAX_VALUE, new FilterCreatureCard("creature cards from your graveyard"))); + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, Integer.MAX_VALUE, new FilterCreatureCard("creature cards from your graveyard"))); } @Override @@ -80,7 +78,7 @@ public class WakeTheDead extends CardImpl { if (ability instanceof SpellAbility) { int xValue = ability.getManaCostsToPay().getX(); ability.getTargets().clear(); - ability.addTarget(new TargetCardInYourGraveyard(xValue,xValue, new FilterCreatureCard("creature cards from your graveyard"))); + ability.addTarget(new TargetCardInYourGraveyard(xValue, xValue, new FilterCreatureCard("creature cards from your graveyard"))); } } @@ -159,8 +157,8 @@ class WakeTheDeadReturnFromGraveyardToBattlefieldTargetEffect extends OneShotEff Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { permanent.changeControllerId(source.getControllerId(), game); - Effect effect = new SacrificeTargetEffect("Sacrifice those creatures at the beginning of the next end step"); - effect.setTargetPointer(new FixedTarget(permanent.getId())); + Effect effect = new SacrificeTargetEffect("Sacrifice those creatures at the beginning of the next end step", source.getControllerId()); + effect.setTargetPointer(new FixedTarget(permanent, game)); DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect); delayedAbility.setSourceId(source.getSourceId()); delayedAbility.setControllerId(source.getControllerId()); diff --git a/Mage.Sets/src/mage/sets/conflux/ApocalypseHydra.java b/Mage.Sets/src/mage/sets/conflux/ApocalypseHydra.java index 87ecb7d24d..2996412edd 100644 --- a/Mage.Sets/src/mage/sets/conflux/ApocalypseHydra.java +++ b/Mage.Sets/src/mage/sets/conflux/ApocalypseHydra.java @@ -27,8 +27,7 @@ */ package mage.sets.conflux; -import mage.constants.CardType; -import mage.constants.Rarity; +import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.SpellAbility; @@ -40,15 +39,15 @@ import mage.abilities.effects.EntersBattlefieldEffect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DamageTargetEffect; 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.target.common.TargetCreatureOrPlayer; -import java.util.UUID; - /** * * @author Loki @@ -83,6 +82,7 @@ public class ApocalypseHydra extends CardImpl { } class ApocalypseHydraEffect extends OneShotEffect { + ApocalypseHydraEffect() { super(Outcome.BoostCreature); staticText = "with X +1/+1 counters on it. If X is 5 or more, it enters the battlefield with an additional X +1/+1 counters on it"; @@ -97,10 +97,9 @@ class ApocalypseHydraEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { - // 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)obj).getManaCostsToPay().getX(); + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { + int amount = ((SpellAbility) obj).getManaCostsToPay().getX(); if (amount > 0) { if (amount < 5) { permanent.addCounters(CounterType.P1P1.createInstance(amount), game); diff --git a/Mage.Sets/src/mage/sets/conspiracy/AcademyElite.java b/Mage.Sets/src/mage/sets/conspiracy/AcademyElite.java index 4889f2165e..9a249cfa5b 100644 --- a/Mage.Sets/src/mage/sets/conspiracy/AcademyElite.java +++ b/Mage.Sets/src/mage/sets/conspiracy/AcademyElite.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.conspiracy; import java.util.UUID; @@ -49,14 +48,13 @@ import mage.counters.CounterType; import mage.filter.common.FilterInstantOrSorceryCard; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.target.common.TargetCreatureOrPlayer; /** * * @author andyfries */ - public class AcademyElite extends CardImpl { + public AcademyElite(UUID ownerId) { super(ownerId, 20, "Academy Elite", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{U}"); this.expansionSetCode = "CNS"; @@ -76,7 +74,6 @@ public class AcademyElite extends CardImpl { this.addAbility(ability); } - public AcademyElite(final AcademyElite card) { super(card); } @@ -104,7 +101,8 @@ class AcademyEliteEffect1 extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { CardsInAllGraveyardsCount instantsAndSorceries = new CardsInAllGraveyardsCount(new FilterInstantOrSorceryCard("instant or sorcery cards")); int instantsAndSorceriesCount = instantsAndSorceries.calculate(game, source, this); if (instantsAndSorceriesCount > 0) { @@ -120,4 +118,3 @@ class AcademyEliteEffect1 extends OneShotEffect { return new AcademyEliteEffect1(this); } } - diff --git a/Mage.Sets/src/mage/sets/conspiracy/GrenzoDungeonWarden.java b/Mage.Sets/src/mage/sets/conspiracy/GrenzoDungeonWarden.java index 4b253a0666..5195b3ef39 100644 --- a/Mage.Sets/src/mage/sets/conspiracy/GrenzoDungeonWarden.java +++ b/Mage.Sets/src/mage/sets/conspiracy/GrenzoDungeonWarden.java @@ -64,7 +64,7 @@ public class GrenzoDungeonWarden extends CardImpl { // Grenzo, Dungeon Warden enters the battlefield with X +1/+1 counters on it. this.addAbility(new EntersBattlefieldAbility(new GrenzoDungeonWardenEtBEffect())); - + // {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))); } @@ -95,9 +95,8 @@ class GrenzoDungeonWardenEtBEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { Object obj = getValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { - // delete to prevent using it again if put into battlefield from other effect - setValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY, null); + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { int amount = ((Ability) obj).getManaCostsToPay().getX(); if (amount > 0) { permanent.addCounters(CounterType.P1P1.createInstance(amount), game); @@ -114,21 +113,21 @@ class GrenzoDungeonWardenEtBEffect extends OneShotEffect { } class GrenzoDungeonWardenEffect extends OneShotEffect { - + GrenzoDungeonWardenEffect() { super(Outcome.Benefit); this.staticText = "Put the bottom card of your library into your graveyard. If it's a creature card with power less than or equal to {this}'s power, put it onto the battlefield"; } - + GrenzoDungeonWardenEffect(final GrenzoDungeonWardenEffect effect) { super(effect); } - + @Override public GrenzoDungeonWardenEffect copy() { return new GrenzoDungeonWardenEffect(this); } - + @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); diff --git a/Mage.Sets/src/mage/sets/darksteel/HoverguardObserver.java b/Mage.Sets/src/mage/sets/darksteel/HoverguardObserver.java new file mode 100644 index 0000000000..a4f4936ee3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/darksteel/HoverguardObserver.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.darksteel; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.CanBlockOnlyFlyingAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class HoverguardObserver extends CardImpl { + + public HoverguardObserver(UUID ownerId) { + super(ownerId, 22, "Hoverguard Observer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); + this.expansionSetCode = "DST"; + this.subtype.add("Drone"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Hoverguard Observer can block only creatures with flying. + this.addAbility(new CanBlockOnlyFlyingAbility()); + } + + public HoverguardObserver(final HoverguardObserver card) { + super(card); + } + + @Override + public HoverguardObserver copy() { + return new HoverguardObserver(this); + } +} diff --git a/Mage.Sets/src/mage/sets/dissension/VesperGhoul.java b/Mage.Sets/src/mage/sets/dissension/VesperGhoul.java new file mode 100644 index 0000000000..1d22a7fe10 --- /dev/null +++ b/Mage.Sets/src/mage/sets/dissension/VesperGhoul.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.dissension; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.AddManaOfAnyColorEffect; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class VesperGhoul extends CardImpl { + + public VesperGhoul(UUID ownerId) { + super(ownerId, 57, "Vesper Ghoul", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "DIS"; + this.subtype.add("Zombie"); + this.subtype.add("Druid"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}, Pay 1 life: Add one mana of any color to your mana pool. + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(), new TapSourceCost()); + ability.addCost(new PayLifeCost(1)); + this.addAbility(ability); + } + + public VesperGhoul(final VesperGhoul card) { + super(card); + } + + @Override + public VesperGhoul copy() { + return new VesperGhoul(this); + } +} diff --git a/Mage.Sets/src/mage/sets/dragonsmaze/SavagebornHydra.java b/Mage.Sets/src/mage/sets/dragonsmaze/SavagebornHydra.java index 18a885b82d..294084fe22 100644 --- a/Mage.Sets/src/mage/sets/dragonsmaze/SavagebornHydra.java +++ b/Mage.Sets/src/mage/sets/dragonsmaze/SavagebornHydra.java @@ -28,10 +28,6 @@ package mage.sets.dragonsmaze; 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.SpellAbility; @@ -42,7 +38,10 @@ import mage.abilities.effects.OneShotEffect; 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; @@ -63,10 +62,10 @@ public class SavagebornHydra extends CardImpl { // Double strike this.addAbility(DoubleStrikeAbility.getInstance()); - + // Savageborn Hydra enters the battlefield with X +1/+1 counters on it. this.addAbility(new EntersBattlefieldAbility(new SavageBornHydraEffect(), true)); - + // {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}"))); } @@ -97,10 +96,11 @@ class SavageBornHydraEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { Object obj = getValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).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)obj).getManaCostsToPay().getX(); + int amount = ((SpellAbility) obj).getManaCostsToPay().getX(); if (amount > 0) { permanent.addCounters(CounterType.P1P1.createInstance(amount), game); } @@ -113,4 +113,4 @@ class SavageBornHydraEffect extends OneShotEffect { public SavageBornHydraEffect copy() { return new SavageBornHydraEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/dragonsmaze/UbulSarGatekeepers.java b/Mage.Sets/src/mage/sets/dragonsmaze/UbulSarGatekeepers.java index 16ff85ae35..3bc76090b0 100644 --- a/Mage.Sets/src/mage/sets/dragonsmaze/UbulSarGatekeepers.java +++ b/Mage.Sets/src/mage/sets/dragonsmaze/UbulSarGatekeepers.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.dragonsmaze; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.constants.TargetController; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; -import mage.counters.CounterType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -51,18 +50,17 @@ import mage.target.common.TargetCreaturePermanent; * * @author LevelX2 */ - - public class UbulSarGatekeepers extends CardImpl { private static final FilterControlledPermanent filter = new FilterControlledPermanent(); private static final FilterCreaturePermanent targetFilter = new FilterCreaturePermanent("creature an opponent controls"); + static { filter.add(new SubtypePredicate("Gate")); targetFilter.add(new ControllerPredicate(TargetController.OPPONENT)); } - public UbulSarGatekeepers (UUID ownerId) { + public UbulSarGatekeepers(UUID ownerId) { super(ownerId, 30, "Ubul Sar Gatekeepers", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); this.expansionSetCode = "DGM"; this.subtype.add("Zombie"); @@ -73,7 +71,7 @@ public class UbulSarGatekeepers extends CardImpl { // Whenever Ubul Sar Gatekeepers enters the battlefield, if you control two or more Gates, target creature an opponent controls gets -2/-2 until end of turn. Ability ability = new ConditionalTriggeredAbility( - new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.M1M1.createInstance(2))), + new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(-2, -2, Duration.EndOfTurn)), new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 1), "Whenever {this} enters the battlefield, if you control two or more Gates, target creature an opponent controls gets -2/-2 until end of turn."); Target target = new TargetCreaturePermanent(targetFilter); @@ -81,7 +79,7 @@ public class UbulSarGatekeepers extends CardImpl { this.addAbility(ability); } - public UbulSarGatekeepers (final UbulSarGatekeepers card) { + public UbulSarGatekeepers(final UbulSarGatekeepers card) { super(card); } diff --git a/Mage.Sets/src/mage/sets/eventide/AshlingTheExtinguisher.java b/Mage.Sets/src/mage/sets/eventide/AshlingTheExtinguisher.java index 3b525f2212..e8fbba42e5 100644 --- a/Mage.Sets/src/mage/sets/eventide/AshlingTheExtinguisher.java +++ b/Mage.Sets/src/mage/sets/eventide/AshlingTheExtinguisher.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.eventide; import java.util.UUID; @@ -51,19 +50,20 @@ import mage.target.common.TargetCreaturePermanent; */ public class AshlingTheExtinguisher extends CardImpl { - public AshlingTheExtinguisher (UUID ownerId) { + public AshlingTheExtinguisher(UUID ownerId) { super(ownerId, 33, "Ashling, the Extinguisher", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); this.expansionSetCode = "EVE"; this.supertype.add("Legendary"); this.subtype.add("Elemental"); this.subtype.add("Shaman"); + // Whenever Ashling, the Extinguisher deals combat damage to a player, choose target creature that player controls. He or she sacrifices that creature. this.power = new MageInt(4); this.toughness = new MageInt(4); this.addAbility(new AshlingTheExtinguisherTriggeredAbility()); } - public AshlingTheExtinguisher (final AshlingTheExtinguisher card) { + public AshlingTheExtinguisher(final AshlingTheExtinguisher card) { super(card); } @@ -75,6 +75,7 @@ public class AshlingTheExtinguisher extends CardImpl { } class AshlingTheExtinguisherTriggeredAbility extends TriggeredAbilityImpl { + public AshlingTheExtinguisherTriggeredAbility() { super(Zone.BATTLEFIELD, new SacrificeTargetEffect()); this.addTarget(new TargetCreaturePermanent()); @@ -115,4 +116,4 @@ class AshlingTheExtinguisherTriggeredAbility extends TriggeredAbilityImpl { public String getRule() { return "Whenever {this} deals combat damage to a player, choose target creature that player controls. He or she sacrifices that creature."; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/eventide/GroundlingPouncer.java b/Mage.Sets/src/mage/sets/eventide/GroundlingPouncer.java index 1d7e0ead21..79141ba5cc 100644 --- a/Mage.Sets/src/mage/sets/eventide/GroundlingPouncer.java +++ b/Mage.Sets/src/mage/sets/eventide/GroundlingPouncer.java @@ -60,7 +60,7 @@ import mage.watchers.Watcher; * */ public class GroundlingPouncer extends CardImpl { - + private String rule = "{this} gets +1/+3 and gains flying until end of turn. Activate this ability only once each turn and only if an opponent controls a creature with flying."; public GroundlingPouncer(UUID ownerId) { @@ -118,7 +118,7 @@ class GroundingPouncerCondition implements Condition { class ActivatedAbilityUsedThisTurnWatcher extends Watcher { - public Set activatedThisTurn = new HashSet(); + public Set activatedThisTurn = new HashSet<>(); public ActivatedAbilityUsedThisTurnWatcher() { super("ActivatedAbilityUsedThisTurn", WatcherScope.GAME); @@ -156,4 +156,4 @@ class ActivatedAbilityUsedThisTurnWatcher extends Watcher { super.reset(); this.activatedThisTurn.clear(); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/exodus/SchoolOfPiranha.java b/Mage.Sets/src/mage/sets/exodus/SchoolOfPiranha.java new file mode 100644 index 0000000000..230b0fd581 --- /dev/null +++ b/Mage.Sets/src/mage/sets/exodus/SchoolOfPiranha.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.exodus; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; + +/** + * + * @author LoneFox + */ +public class SchoolOfPiranha extends CardImpl { + + public SchoolOfPiranha(UUID ownerId) { + super(ownerId, 45, "School of Piranha", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "EXO"; + this.subtype.add("Fish"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // At the beginning of your upkeep, sacrifice School of Piranha unless you pay {1}{U}. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ManaCostsImpl("{1}{U}")), TargetController.YOU, false)); + } + + public SchoolOfPiranha(final SchoolOfPiranha card) { + super(card); + } + + @Override + public SchoolOfPiranha copy() { + return new SchoolOfPiranha(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fallenempires/ElvishFarmer.java b/Mage.Sets/src/mage/sets/fallenempires/ElvishFarmer.java new file mode 100644 index 0000000000..6433c34c22 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/ElvishFarmer.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.fallenempires; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class ElvishFarmer extends mage.sets.masterseditionii.ElvishFarmer { + + public ElvishFarmer(UUID ownerId) { + super(ownerId); + this.cardNumber = 71; + this.expansionSetCode = "FEM"; + } + + public ElvishFarmer(final ElvishFarmer card) { + super(card); + } + + @Override + public ElvishFarmer copy() { + return new ElvishFarmer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fallenempires/ElvishScout1.java b/Mage.Sets/src/mage/sets/fallenempires/ElvishScout1.java new file mode 100644 index 0000000000..c8e09605ef --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/ElvishScout1.java @@ -0,0 +1,91 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.fallenempires; + +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.Effect; +import mage.abilities.effects.common.PreventDamageByTargetEffect; +import mage.abilities.effects.common.PreventDamageToTargetEffect; +import mage.abilities.effects.common.UntapTargetEffect; +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.permanent.AttackingPredicate; +import mage.filter.predicate.permanent.AttackingPredicate; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class ElvishScout1 extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("attacking creature you control"); + + static { + filter.add(new AttackingPredicate()); + } + + public ElvishScout1(UUID ownerId) { + super(ownerId, 75, "Elvish Scout", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "FEM"; + this.subtype.add("Elf"); + this.subtype.add("Scout"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {G}, {tap}: Untap target attacking creature you control. Prevent all combat damage that would be dealt to and dealt by it this turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new ManaCostsImpl("{G}")); + ability.addCost(new TapSourceCost()); + Effect effect = new PreventDamageByTargetEffect(Duration.EndOfTurn, true); + effect.setText("Prevent all combat damage that would be dealt to"); + ability.addEffect(effect); + effect = new PreventDamageToTargetEffect(Duration.EndOfTurn, Integer.MAX_VALUE, true); + effect.setText("and dealt by it this turn"); + ability.addEffect(effect); + ability.addTarget(new TargetControlledCreaturePermanent(filter)); + this.addAbility(ability); + } + + public ElvishScout1(final ElvishScout1 card) { + super(card); + } + + @Override + public ElvishScout1 copy() { + return new ElvishScout1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fallenempires/ElvishScout2.java b/Mage.Sets/src/mage/sets/fallenempires/ElvishScout2.java new file mode 100644 index 0000000000..4f127a27cc --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/ElvishScout2.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.fallenempires; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class ElvishScout2 extends ElvishScout1 { + + public ElvishScout2(UUID ownerId) { + super(ownerId); + this.cardNumber = 76; + } + + public ElvishScout2(final ElvishScout2 card) { + super(card); + } + + @Override + public ElvishScout2 copy() { + return new ElvishScout2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fallenempires/ElvishScout3.java b/Mage.Sets/src/mage/sets/fallenempires/ElvishScout3.java new file mode 100644 index 0000000000..061983d0f8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/ElvishScout3.java @@ -0,0 +1,55 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.fallenempires; + +import java.util.UUID; +import mage.MageInt; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ElvishScout3 extends ElvishScout1 { + + public ElvishScout3(UUID ownerId) { + super(ownerId); + this.cardNumber = 77; + } + + public ElvishScout3(final ElvishScout3 card) { + super(card); + } + + @Override + public ElvishScout3 copy() { + return new ElvishScout3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fatereforged/DarkDeal.java b/Mage.Sets/src/mage/sets/fatereforged/DarkDeal.java index ae2ee332e9..d953057094 100644 --- a/Mage.Sets/src/mage/sets/fatereforged/DarkDeal.java +++ b/Mage.Sets/src/mage/sets/fatereforged/DarkDeal.java @@ -27,6 +27,8 @@ */ package mage.sets.fatereforged; +import java.util.LinkedHashMap; +import java.util.Map; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; @@ -81,16 +83,23 @@ class DarkDealEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - for (UUID playerId : controller.getInRange()) { + Map cardsToDraw = new LinkedHashMap<>(); + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { int cardsInHand = player.getHand().size(); player.discard(cardsInHand, false, source, game); if (cardsInHand > 1) { - player.drawCards(cardsInHand - 1, game); + cardsToDraw.put(playerId, cardsInHand - 1); } } } + for (UUID playerId : cardsToDraw.keySet()) { + Player player = game.getPlayer(playerId); + if (player != null) { + player.drawCards(cardsToDraw.get(playerId), game); + } + } return true; } return false; diff --git a/Mage.Sets/src/mage/sets/fatereforged/OutpostSiege.java b/Mage.Sets/src/mage/sets/fatereforged/OutpostSiege.java index f49e7e15cc..a2598cdb69 100644 --- a/Mage.Sets/src/mage/sets/fatereforged/OutpostSiege.java +++ b/Mage.Sets/src/mage/sets/fatereforged/OutpostSiege.java @@ -50,6 +50,7 @@ import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.game.Game; +import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetCreatureOrPlayer; import mage.target.targetpointer.FixedTarget; @@ -68,8 +69,8 @@ public class OutpostSiege extends CardImpl { this.expansionSetCode = "FRF"; // As Outpost Siege enters the battlefield, choose Khans or Dragons. - this.addAbility(new EntersBattlefieldAbility(new ChooseModeEffect("Khans or Dragons?","Khans", "Dragons"),null, true, - "As {this} enters the battlefield, choose Khans or Dragons.","")); + this.addAbility(new EntersBattlefieldAbility(new ChooseModeEffect("Khans or Dragons?", "Khans", "Dragons"), null, true, + "As {this} enters the battlefield, choose Khans or Dragons.", "")); // * Khans - At the beginning of your upkeep, exile the top card of your library. Until end of turn, you may play that card. this.addAbility(new ConditionalTriggeredAbility( @@ -80,10 +81,10 @@ public class OutpostSiege extends CardImpl { // * Dragons - Whenever a creature you control leaves the battlefield, Outpost Siege deals 1 damage to target creature or player. Ability ability2 = new ConditionalTriggeredAbility( new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, null, new DamageTargetEffect(1), - new FilterControlledCreaturePermanent(), "", false), + new FilterControlledCreaturePermanent(), "", false), new ModeChoiceSourceCondition("Dragons"), ruleTrigger2); - ability2.addTarget(new TargetCreatureOrPlayer()); + ability2.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability2); } @@ -117,13 +118,15 @@ class OutpostSiegeExileEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { + Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (controller != null && sourcePermanent != null) { Card card = controller.getLibrary().getFromTop(game); if (card != null) { - controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.LIBRARY, true); + String exileName = sourcePermanent.getIdName() + " (If a source would deal damage to a Sliver, prevent 1 of that damage.)"))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(absorb, + Duration.WhileOnBattlefield, filter, "All Sliver creatures have absorb 1. (If a source would deal damage to a Sliver, prevent 1 of that damage.)"))); } public LymphSliver(final LymphSliver card) { @@ -73,7 +74,7 @@ public class LymphSliver extends CardImpl { class SliverAbsorbEffect extends PreventionEffectImpl { public SliverAbsorbEffect() { super(Duration.WhileOnBattlefield, 1, false, false); - this.staticText = "If a source would deal damage to a Sliver, prevent 1 of that damage"; + this.staticText = "Absorb 1 (If a source would deal damage to this creature, prevent 1 of that damage.)"; } public SliverAbsorbEffect(SliverAbsorbEffect effect) { @@ -84,4 +85,4 @@ class SliverAbsorbEffect extends PreventionEffectImpl { public SliverAbsorbEffect copy() { return new SliverAbsorbEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/futuresight/MaelstromDjinn.java b/Mage.Sets/src/mage/sets/futuresight/MaelstromDjinn.java new file mode 100644 index 0000000000..be6656f440 --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/MaelstromDjinn.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.futuresight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.MorphAbility; +import mage.abilities.keyword.VanishingSacrificeAbility; +import mage.abilities.keyword.VanishingUpkeepAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.counters.CounterType; + +/** + * + * @author LoneFox + */ +public class MaelstromDjinn extends CardImpl { + + public MaelstromDjinn(UUID ownerId) { + super(ownerId, 39, "Maelstrom Djinn", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{7}{U}"); + this.expansionSetCode = "FUT"; + this.subtype.add("Djinn"); + this.power = new MageInt(5); + this.toughness = new MageInt(6); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Morph {2}{U} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{U}"))); + // When Maelstrom Djinn is turned face up, put two time counters on it and it gains vanishing. + Ability ability = new TurnedFaceUpSourceTriggeredAbility(new AddCountersSourceEffect(CounterType.TIME.createInstance(2))); + Effect effect = new GainAbilitySourceEffect(new VanishingUpkeepAbility(0), Duration.WhileOnBattlefield); + effect.setText("and it gains vanishing"); + ability.addEffect(effect); + effect = new GainAbilitySourceEffect(new VanishingSacrificeAbility(), Duration.WhileOnBattlefield); + effect.setText(""); + ability.addEffect(effect); + this.addAbility(ability); + } + + public MaelstromDjinn(final MaelstromDjinn card) { + super(card); + } + + @Override + public MaelstromDjinn copy() { + return new MaelstromDjinn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/futuresight/RavagingRiftwurm.java b/Mage.Sets/src/mage/sets/futuresight/RavagingRiftwurm.java new file mode 100644 index 0000000000..30c9a66fcf --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/RavagingRiftwurm.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.futuresight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.condition.common.KickedCondition; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.KickerAbility; +import mage.abilities.keyword.VanishingSacrificeAbility; +import mage.abilities.keyword.VanishingUpkeepAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; + +/** + * + * @author LoneFox + */ +public class RavagingRiftwurm extends CardImpl { + + public RavagingRiftwurm(UUID ownerId) { + super(ownerId, 135, "Ravaging Riftwurm", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); + this.expansionSetCode = "FUT"; + this.subtype.add("Wurm"); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // Kicker {4} + this.addAbility(new KickerAbility("{4}")); + // Vanishing 2 + Ability ability = new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.TIME.createInstance(2))); + ability.setRuleVisible(false); + this.addAbility(ability); + this.addAbility(new VanishingUpkeepAbility(2)); + this.addAbility(new VanishingSacrificeAbility()); + // If Ravaging Riftwurm was kicked, it enters the battlefield with three additional time counters on it. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.TIME.createInstance(3)), + KickedCondition.getInstance(), true, "If {this} was kicked, it enters the battlefield with three additional time counters on it.", "")); + } + + public RavagingRiftwurm(final RavagingRiftwurm card) { + super(card); + } + + @Override + public RavagingRiftwurm copy() { + return new RavagingRiftwurm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/futuresight/SecondWind.java b/Mage.Sets/src/mage/sets/futuresight/SecondWind.java new file mode 100644 index 0000000000..136df324f5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/SecondWind.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.futuresight; + +import java.util.UUID; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.TapEnchantedEffect; +import mage.abilities.effects.common.UntapEnchantedEffect; +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 fireshoes + */ +public class SecondWind extends CardImpl { + + public SecondWind(UUID ownerId) { + super(ownerId, 57, "Second Wind", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); + this.expansionSetCode = "FUT"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Untap)); + this.addAbility(new EnchantAbility(auraTarget.getTargetName())); + + // {tap}: Tap enchanted creature. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapEnchantedEffect(), new TapSourceCost())); + + // {tap}: Untap enchanted creature. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapEnchantedEffect(), new TapSourceCost())); + } + + public SecondWind(final SecondWind card) { + super(card); + } + + @Override + public SecondWind copy() { + return new SecondWind(this); + } +} diff --git a/Mage.Sets/src/mage/sets/futuresight/SliverLegion.java b/Mage.Sets/src/mage/sets/futuresight/SliverLegion.java index 853b5983b1..094ec9968d 100644 --- a/Mage.Sets/src/mage/sets/futuresight/SliverLegion.java +++ b/Mage.Sets/src/mage/sets/futuresight/SliverLegion.java @@ -47,9 +47,9 @@ import mage.filter.predicate.permanent.AnotherPredicate; */ public class SliverLegion extends CardImpl { - + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Sliver", "All Sliver creatures"); - private static final FilterPermanent countfilter = new FilterPermanent("Sliver","each other sliver"); + private static final FilterPermanent countfilter = new FilterPermanent("Sliver", " for each other Sliver on the battlefield"); static { countfilter.add(new AnotherPredicate()); diff --git a/Mage.Sets/src/mage/sets/futuresight/Sliversmith.java b/Mage.Sets/src/mage/sets/futuresight/Sliversmith.java index 3de55d8d33..e1c4178054 100644 --- a/Mage.Sets/src/mage/sets/futuresight/Sliversmith.java +++ b/Mage.Sets/src/mage/sets/futuresight/Sliversmith.java @@ -43,7 +43,7 @@ import mage.game.permanent.token.Token; /** * - * @author anonymous + * @author Luna Skyrise */ public class Sliversmith extends CardImpl { @@ -55,7 +55,7 @@ public class Sliversmith extends CardImpl { this.toughness = new MageInt(1); // {1}, {tap}, Discard a card: Put a 1/1 colorless Sliver artifact creature token named Metallic Sliver onto the battlefield. - Ability ability = new SimpleActivatedAbility(Zone.HAND, new CreateTokenEffect(new MetallicSliverToken()), new ManaCostsImpl("{1}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SliversmithToken()), new ManaCostsImpl("{1}")); ability.addCost(new TapSourceCost()); ability.addCost(new DiscardCardCost()); this.addAbility(ability); @@ -71,10 +71,10 @@ public class Sliversmith extends CardImpl { } } -class MetallicSliverToken extends Token { +class SliversmithToken extends Token { - MetallicSliverToken() { - super("Metallic Sliver", "a 1/1 colorless Sliver creature token"); + SliversmithToken() { + super("Metallic Sliver", "a 1/1 colorless Sliver creature token named Metallic Sliver"); cardType.add(CardType.CREATURE); cardType.add(CardType.ARTIFACT); subtype.add("Sliver"); diff --git a/Mage.Sets/src/mage/sets/futuresight/UtopiaMycon.java b/Mage.Sets/src/mage/sets/futuresight/UtopiaMycon.java new file mode 100644 index 0000000000..45f3a6749a --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/UtopiaMycon.java @@ -0,0 +1,91 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those 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.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.mana.AnyColorManaAbility; +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.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.SaprolingToken; +import mage.target.TargetPermanent; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class UtopiaMycon extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Saproling"); + + static { + filter.add(new SubtypePredicate("Saproling")); + } + + public UtopiaMycon(UUID ownerId) { + super(ownerId, 140, "Utopia Mycon", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "FUT"; + this.subtype.add("Fungus"); + this.power = new MageInt(0); + this.toughness = new MageInt(2); + + // At the beginning of your upkeep, put a spore counter on Utopia Mycon. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.SPORE.createInstance()), TargetController.YOU, false)); + + // Remove three spore counters from Utopia Mycon: Put a 1/1 green Saproling creature token onto the battlefield. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SaprolingToken()), new RemoveCountersSourceCost(CounterType.SPORE.createInstance(3)))); + + // Sacrifice a Saproling: Add one mana of any color to your mana pool. + Ability ability = new AnyColorManaAbility(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1, filter, false))); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + public UtopiaMycon(final UtopiaMycon card) { + super(card); + } + + @Override + public UtopiaMycon copy() { + return new UtopiaMycon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/futuresight/WhipSpineDrake.java b/Mage.Sets/src/mage/sets/futuresight/WhipSpineDrake.java new file mode 100644 index 0000000000..40d25ca080 --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/WhipSpineDrake.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.futuresight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class WhipSpineDrake extends CardImpl { + + public WhipSpineDrake(UUID ownerId) { + super(ownerId, 62, "Whip-Spine Drake", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); + this.expansionSetCode = "FUT"; + this.subtype.add("Drake"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Morph {2}{W} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{W}"))); + } + + public WhipSpineDrake(final WhipSpineDrake card) { + super(card); + } + + @Override + public WhipSpineDrake copy() { + return new WhipSpineDrake(this); + } +} diff --git a/Mage.Sets/src/mage/sets/gatecrash/BaneAlleyBroker.java b/Mage.Sets/src/mage/sets/gatecrash/BaneAlleyBroker.java index 0443afca8a..864368f97c 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/BaneAlleyBroker.java +++ b/Mage.Sets/src/mage/sets/gatecrash/BaneAlleyBroker.java @@ -30,12 +30,6 @@ package mage.sets.gatecrash; import java.util.HashSet; import java.util.Set; import java.util.UUID; -import mage.constants.AsThoughEffectType; -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.MageObject; import mage.abilities.Ability; @@ -48,8 +42,12 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.Card; import mage.cards.CardImpl; -import mage.cards.Cards; -import mage.cards.CardsImpl; +import mage.constants.AsThoughEffectType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.filter.FilterCard; import mage.game.ExileZone; import mage.game.Game; @@ -62,29 +60,31 @@ import mage.util.CardUtil; /** * Gatecrash FAQ (01.2013) * - * If Bane Alley Broker's first ability resolves when you have no cards in your hand, - * you'll draw a card and then exile it. You won't have the opportunity to cast that - * card (or do anything else with it) before exiling it. + * If Bane Alley Broker's first ability resolves when you have no cards in your + * hand, you'll draw a card and then exile it. You won't have the opportunity to + * cast that card (or do anything else with it) before exiling it. * - * Due to a recent rules change, once you are allowed to look at a face-down card in - * exile, you are allowed to look at that card as long as it's exiled. If you no longer - * control Bane Alley Broker when its last ability resolves, you can continue to look - * at the relevant cards in exile to choose one to return. + * Due to a recent rules change, once you are allowed to look at a face-down + * card in exile, you are allowed to look at that card as long as it's exiled. + * If you no longer control Bane Alley Broker when its last ability resolves, + * you can continue to look at the relevant cards in exile to choose one to + * return. * - * Bane Alley Broker's second and third abilities apply to cards exiled with that - * specific Bane Alley Broker, not any other creature named Bane Alley Broker. - * You should keep cards exiled by different Bane Alley Brokers separate. + * Bane Alley Broker's second and third abilities apply to cards exiled with + * that specific Bane Alley Broker, not any other creature named Bane Alley + * Broker. You should keep cards exiled by different Bane Alley Brokers + * separate. * * If Bane Alley Broker leaves the battlefield, the cards exiled with it will be * exiled indefinitely. If it later returns to the battlefield, it will be a new - * object with no connection to the cards exiled with it in its previous existence. - * You won't be able to use the "new" Bane Alley Broker to return cards exiled with - * the "old" one. + * object with no connection to the cards exiled with it in its previous + * existence. You won't be able to use the "new" Bane Alley Broker to return + * cards exiled with the "old" one. * - * Even if not all players can look at the exiled cards, each card's owner is still - * known. It is advisable to keep cards owned by different players in distinct piles - * in case another player gains control of Bane Alley Broker and exiles one or more - * cards with it. + * Even if not all players can look at the exiled cards, each card's owner is + * still known. It is advisable to keep cards owned by different players in + * distinct piles in case another player gains control of Bane Alley Broker and + * exiles one or more cards with it. * * @author LevelX2 */ @@ -99,9 +99,9 @@ public class BaneAlleyBroker extends CardImpl { this.power = new MageInt(0); this.toughness = new MageInt(3); - // {tap}: Draw a card, then exile a card from your hand face down. + // {tap}: Draw a card, then exile a card from your hand face down. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BaneAlleyBrokerDrawExileEffect(), new TapSourceCost())); - + // You may look at cards exiled with Bane Alley Broker. this.addAbility(new SimpleStaticAbility(Zone.ALL, new BaneAlleyBrokerLookAtCardEffect())); @@ -126,44 +126,44 @@ public class BaneAlleyBroker extends CardImpl { class BaneAlleyBrokerDrawExileEffect extends OneShotEffect { public BaneAlleyBrokerDrawExileEffect() { - super(Outcome.DrawCard); - staticText = "Draw a card, then exile a card from your hand face down"; + super(Outcome.DrawCard); + staticText = "Draw a card, then exile a card from your hand face down"; } public BaneAlleyBrokerDrawExileEffect(final BaneAlleyBrokerDrawExileEffect effect) { - super(effect); + super(effect); } @Override public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - controller.drawCards(1, game); - Target target = new TargetCardInHand(new FilterCard("card to exile")); - if (controller.chooseTarget(outcome, target, source, game)) { - Card card = game.getCard(target.getFirstTarget()); - MageObject sourceObject = game.getObject(source.getSourceId()); - if (card != null && sourceObject != null) { - if (card.moveToExile(CardUtil.getCardExileZoneId(game, source), new StringBuilder(sourceObject.getName()).toString(), source.getSourceId(), game)) { - card.setFaceDown(true, game); - return true; - } - } - } - } - return false; + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + controller.drawCards(1, game); + Target target = new TargetCardInHand(new FilterCard("card to exile")); + if (controller.chooseTarget(outcome, target, source, game)) { + Card card = game.getCard(target.getFirstTarget()); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (card != null && sourceObject != null) { + if (card.moveToExile(CardUtil.getCardExileZoneId(game, source), new StringBuilder(sourceObject.getName()).toString(), source.getSourceId(), game)) { + card.setFaceDown(true, game); + return true; + } + } + } + } + return false; } @Override public BaneAlleyBrokerDrawExileEffect copy() { - return new BaneAlleyBrokerDrawExileEffect(this); + return new BaneAlleyBrokerDrawExileEffect(this); } } class TargetCardInBaneAlleyBrokerExile extends TargetCard { public TargetCardInBaneAlleyBrokerExile(UUID CardId) { - super(1, 1, Zone.EXILED, new FilterCard("card exiled with Bane Alley Broker")); + super(1, 1, Zone.EXILED, new FilterCard("card exiled with Bane Alley Broker")); } public TargetCardInBaneAlleyBrokerExile(final TargetCardInBaneAlleyBrokerExile target) { @@ -223,7 +223,7 @@ class TargetCardInBaneAlleyBrokerExile extends TargetCard { class BaneAlleyBrokerLookAtCardEffect extends AsThoughEffectImpl { public BaneAlleyBrokerLookAtCardEffect() { - super(AsThoughEffectType.REVEAL_FACE_DOWN, Duration.EndOfGame, Outcome.Benefit); + super(AsThoughEffectType.LOOK_AT_FACE_DOWN, Duration.EndOfGame, Outcome.Benefit); staticText = "You may look at cards exiled with {this}"; } @@ -252,13 +252,7 @@ class BaneAlleyBrokerLookAtCardEffect extends AsThoughEffectImpl { } UUID exileId = CardUtil.getCardExileZoneId(game, source); ExileZone exile = game.getExile().getExileZone(exileId); - if (exile != null && exile.contains(objectId)) { - Cards cards = new CardsImpl(card); - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - controller.lookAtCards("Exiled with " + sourceObject.getName(), cards, game); - } - } + return exile != null && exile.contains(objectId); } } return false; diff --git a/Mage.Sets/src/mage/sets/gatecrash/NimbusSwimmer.java b/Mage.Sets/src/mage/sets/gatecrash/NimbusSwimmer.java index 804d39b125..a47c15bc88 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/NimbusSwimmer.java +++ b/Mage.Sets/src/mage/sets/gatecrash/NimbusSwimmer.java @@ -28,9 +28,6 @@ package mage.sets.gatecrash; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Rarity; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.SpellAbility; @@ -38,7 +35,9 @@ import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.effects.OneShotEffect; 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; @@ -89,10 +88,9 @@ class NimbusSwimmerEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { Object obj = getValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { - // 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)obj).getManaCostsToPay().getX(); + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { + int amount = ((SpellAbility) obj).getManaCostsToPay().getX(); if (amount > 0) { permanent.addCounters(CounterType.P1P1.createInstance(amount), game); } diff --git a/Mage.Sets/src/mage/sets/guildpact/BurningTreeShaman.java b/Mage.Sets/src/mage/sets/guildpact/BurningTreeShaman.java index dded38dbd8..16d2340db1 100644 --- a/Mage.Sets/src/mage/sets/guildpact/BurningTreeShaman.java +++ b/Mage.Sets/src/mage/sets/guildpact/BurningTreeShaman.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.guildpact; import java.util.UUID; @@ -49,19 +48,18 @@ import mage.target.TargetPlayer; */ public class BurningTreeShaman extends CardImpl { - public BurningTreeShaman (UUID ownerId) { + public BurningTreeShaman(UUID ownerId) { super(ownerId, 105, "Burning-Tree Shaman", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{R}{G}"); this.expansionSetCode = "GPT"; this.subtype.add("Centaur"); this.subtype.add("Shaman"); - this.power = new MageInt(3); this.toughness = new MageInt(4); this.addAbility(new BurningTreeShamanTriggeredAbility()); } - public BurningTreeShaman (final BurningTreeShaman card) { + public BurningTreeShaman(final BurningTreeShaman card) { super(card); } @@ -72,6 +70,7 @@ public class BurningTreeShaman extends CardImpl { } class BurningTreeShamanTriggeredAbility extends TriggeredAbilityImpl { + BurningTreeShamanTriggeredAbility() { super(Zone.BATTLEFIELD, new DamageTargetEffect(1)); this.addTarget(new TargetPlayer()); @@ -94,7 +93,7 @@ class BurningTreeShamanTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { StackAbility stackAbility = (StackAbility) game.getStack().getStackObject(event.getSourceId()); - if (stackAbility.getAbilityType() == AbilityType.ACTIVATED) { + if (stackAbility != null && stackAbility.getAbilityType() == AbilityType.ACTIVATED) { this.getTargets().get(0).add(event.getPlayerId(), game); return true; } @@ -105,4 +104,4 @@ class BurningTreeShamanTriggeredAbility extends TriggeredAbilityImpl { public String getRule() { return "Whenever a player activates an ability that isn't a mana ability, {this} deals 1 damage to that player."; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/guildpact/Schismotivate.java b/Mage.Sets/src/mage/sets/guildpact/Schismotivate.java new file mode 100644 index 0000000000..4a1b7ac9ec --- /dev/null +++ b/Mage.Sets/src/mage/sets/guildpact/Schismotivate.java @@ -0,0 +1,97 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.guildpact; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.cards.CardImpl; +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.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class Schismotivate extends CardImpl { + + public Schismotivate(UUID ownerId) { + super(ownerId, 129, "Schismotivate", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{U}{R}"); + this.expansionSetCode = "GPT"; + + // Target creature gets +4/+0 until end of turn. Another target creature gets -4/-0 until end of turn. + this.getSpellAbility().addEffect(new SchismotivateEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(2)); + } + + public Schismotivate(final Schismotivate card) { + super(card); + } + + @Override + public Schismotivate copy() { + return new Schismotivate(this); + } +} + +class SchismotivateEffect extends ContinuousEffectImpl { + + public SchismotivateEffect() { + super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature); + this.staticText = "Target creature gets +4/+0 until end of turn. Another target creature gets -4/-0 until end of turn"; + } + + public SchismotivateEffect(final SchismotivateEffect effect) { + super(effect); + } + + @Override + public SchismotivateEffect copy() { + return new SchismotivateEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent != null) { + permanent.addPower(4); + } + permanent = game.getPermanent(source.getTargets().get(0).getTargets().get(1)); + if (permanent != null) { + permanent.addPower(-4); + } + return true; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/guildpact/Stratozeppelid.java b/Mage.Sets/src/mage/sets/guildpact/Stratozeppelid.java new file mode 100644 index 0000000000..7c860d29bb --- /dev/null +++ b/Mage.Sets/src/mage/sets/guildpact/Stratozeppelid.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.guildpact; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.CanBlockOnlyFlyingAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class Stratozeppelid extends CardImpl { + + public Stratozeppelid(UUID ownerId) { + super(ownerId, 36, "Stratozeppelid", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "GPT"; + this.subtype.add("Beast"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Stratozeppelid can block only creatures with flying. + this.addAbility(new CanBlockOnlyFlyingAbility()); + } + + public Stratozeppelid(final Stratozeppelid card) { + super(card); + } + + @Override + public Stratozeppelid copy() { + return new Stratozeppelid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/DeathSpeakers.java b/Mage.Sets/src/mage/sets/homelands/DeathSpeakers.java new file mode 100644 index 0000000000..4d5cb00eb1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/DeathSpeakers.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.homelands; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author LoneFox + */ +public class DeathSpeakers extends CardImpl { + + private static final FilterCard filter = new FilterCard("black"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLACK)); + } + + public DeathSpeakers(UUID ownerId) { + super(ownerId, 109, "Death Speakers", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{W}"); + this.expansionSetCode = "HML"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Protection from black + this.addAbility(new ProtectionAbility(filter)); + } + + public DeathSpeakers(final DeathSpeakers card) { + super(card); + } + + @Override + public DeathSpeakers copy() { + return new DeathSpeakers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/HungryMist1.java b/Mage.Sets/src/mage/sets/homelands/HungryMist1.java new file mode 100644 index 0000000000..30f25a102e --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/HungryMist1.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 LoneFox + */ +public class HungryMist1 extends mage.sets.fifthedition.HungryMist { + + public HungryMist1(UUID ownerId) { + super(ownerId); + this.cardNumber = 60; + this.expansionSetCode = "HML"; + } + + public HungryMist1(final HungryMist1 card) { + super(card); + } + + @Override + public HungryMist1 copy() { + return new HungryMist1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/HungryMist2.java b/Mage.Sets/src/mage/sets/homelands/HungryMist2.java new file mode 100644 index 0000000000..05db8e6008 --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/HungryMist2.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 LoneFox + */ +public class HungryMist2 extends mage.sets.fifthedition.HungryMist { + + public HungryMist2(UUID ownerId) { + super(ownerId); + this.cardNumber = 61; + this.expansionSetCode = "HML"; + } + + public HungryMist2(final HungryMist2 card) { + super(card); + } + + @Override + public HungryMist2 copy() { + return new HungryMist2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/Narwhal.java b/Mage.Sets/src/mage/sets/homelands/Narwhal.java new file mode 100644 index 0000000000..0d1e5e3ffc --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/Narwhal.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.homelands; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author LoneFox + */ +public class Narwhal extends CardImpl { + + private static final FilterCard filter = new FilterCard("red"); + + static { + filter.add(new ColorPredicate(ObjectColor.RED)); + } + + public Narwhal(UUID ownerId) { + super(ownerId, 44, "Narwhal", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); + this.expansionSetCode = "HML"; + this.subtype.add("Whale"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + // protection from red + this.addAbility(new ProtectionAbility(filter)); + } + + public Narwhal(final Narwhal card) { + super(card); + } + + @Override + public Narwhal copy() { + return new Narwhal(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/Roots.java b/Mage.Sets/src/mage/sets/homelands/Roots.java new file mode 100644 index 0000000000..def1203907 --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/Roots.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.homelands; + +import java.util.UUID; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DontUntapInControllersUntapStepEnchantedEffect; +import mage.abilities.effects.common.TapEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.FlyingAbility; +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.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class Roots extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature without flying"); + + static { + filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); + } + + public Roots(UUID ownerId) { + super(ownerId, 68, "Roots", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}"); + this.expansionSetCode = "HML"; + this.subtype.add("Aura"); + + // Enchant creature without flying + TargetPermanent auraTarget = new TargetCreaturePermanent(filter); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); + this.addAbility(new EnchantAbility(auraTarget.getTargetName())); + + // When Roots enters the battlefield, tap enchanted creature. + this.addAbility(new EntersBattlefieldTriggeredAbility(new TapEnchantedEffect())); + + // Enchanted creature doesn't untap during its controller's untap step. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepEnchantedEffect())); + } + + public Roots(final Roots card) { + super(card); + } + + @Override + public Roots copy() { + return new Roots(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/SeaSprite.java b/Mage.Sets/src/mage/sets/homelands/SeaSprite.java new file mode 100644 index 0000000000..e69411816f --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/SeaSprite.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.homelands; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author LoneFox + */ +public class SeaSprite extends CardImpl { + + private static final FilterCard filter = new FilterCard("red"); + + static { + filter.add(new ColorPredicate(ObjectColor.RED)); + } + + public SeaSprite(UUID ownerId) { + super(ownerId, 48, "Sea Sprite", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "HML"; + this.subtype.add("Faerie"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // protection from red + this.addAbility(new ProtectionAbility(filter)); + } + + public SeaSprite(final SeaSprite card) { + super(card); + } + + @Override + public SeaSprite copy() { + return new SeaSprite(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/BattleFrenzy.java b/Mage.Sets/src/mage/sets/iceage/BattleFrenzy.java new file mode 100644 index 0000000000..68353e8508 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/BattleFrenzy.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.iceage; + +import java.util.UUID; +import mage.ObjectColor; +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.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author LoneFox + */ +public class BattleFrenzy extends CardImpl { + + private static final FilterCreaturePermanent filter1 = new FilterCreaturePermanent("green creatures"); + private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("nongreen creatures"); + + static { + filter1.add(new ColorPredicate(ObjectColor.GREEN)); + filter2.add(Predicates.not(new ColorPredicate(ObjectColor.GREEN))); + } + + + public BattleFrenzy(UUID ownerId) { + super(ownerId, 175, "Battle Frenzy", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{R}"); + this.expansionSetCode = "ICE"; + + // Green creatures you control get +1/+1 until end of turn. + this.getSpellAbility().addEffect(new BoostControlledEffect(1, 1, Duration.EndOfTurn, filter1)); + // Nongreen creatures you control get +1/+0 until end of turn. + this.getSpellAbility().addEffect(new BoostControlledEffect(1, 0, Duration.EndOfTurn, filter2)); + } + + public BattleFrenzy(final BattleFrenzy card) { + super(card); + } + + @Override + public BattleFrenzy copy() { + return new BattleFrenzy(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/Enervate.java b/Mage.Sets/src/mage/sets/iceage/Enervate.java new file mode 100644 index 0000000000..fa18468d1e --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/Enervate.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 fireshoes + */ +public class Enervate extends mage.sets.masterseditionii.Enervate { + + public Enervate(UUID ownerId) { + super(ownerId); + this.cardNumber = 67; + this.expansionSetCode = "ICE"; + } + + public Enervate(final Enervate card) { + super(card); + } + + @Override + public Enervate copy() { + return new Enervate(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/FlowOfMaggots.java b/Mage.Sets/src/mage/sets/iceage/FlowOfMaggots.java new file mode 100644 index 0000000000..a2141496d7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/FlowOfMaggots.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.iceage; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleEvasionAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +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.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author LoneFox + */ +public class FlowOfMaggots extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Wall creatures"); + + static { + filter.add(Predicates.not(new SubtypePredicate("Wall"))); + } + + public FlowOfMaggots(UUID ownerId) { + super(ownerId, 13, "Flow of Maggots", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "ICE"; + this.subtype.add("Insect"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Cumulative upkeep {1} + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{1}"))); + // Flow of Maggots can't be blocked by non-Wall creatures. + this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield))); + } + + public FlowOfMaggots(final FlowOfMaggots card) { + super(card); + } + + @Override + public FlowOfMaggots copy() { + return new FlowOfMaggots(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/IllusionaryForces.java b/Mage.Sets/src/mage/sets/iceage/IllusionaryForces.java new file mode 100644 index 0000000000..fe4bba2144 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/IllusionaryForces.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.iceage; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class IllusionaryForces extends mage.sets.mastersedition.IllusionaryForces { + + public IllusionaryForces(UUID ownerId) { + super(ownerId); + this.cardNumber = 75; + this.expansionSetCode = "ICE"; + this.rarity = Rarity.COMMON; + } + + public IllusionaryForces(final IllusionaryForces card) { + super(card); + } + + @Override + public IllusionaryForces copy() { + return new IllusionaryForces(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/IllusionaryWall.java b/Mage.Sets/src/mage/sets/iceage/IllusionaryWall.java new file mode 100644 index 0000000000..8ae6347dec --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/IllusionaryWall.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 LoneFox + */ +public class IllusionaryWall extends mage.sets.mastersedition.IllusionaryWall { + + public IllusionaryWall(UUID ownerId) { + super(ownerId); + this.cardNumber = 78; + this.expansionSetCode = "ICE"; + } + + public IllusionaryWall(final IllusionaryWall card) { + super(card); + } + + @Override + public IllusionaryWall copy() { + return new IllusionaryWall(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/MindRavel.java b/Mage.Sets/src/mage/sets/iceage/MindRavel.java new file mode 100644 index 0000000000..2495044d09 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/MindRavel.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 fireshoes + */ +public class MindRavel extends mage.sets.fifthedition.MindRavel { + + public MindRavel(UUID ownerId) { + super(ownerId); + this.cardNumber = 35; + this.expansionSetCode = "ICE"; + } + + public MindRavel(final MindRavel card) { + super(card); + } + + @Override + public MindRavel copy() { + return new MindRavel(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/Necropotence.java b/Mage.Sets/src/mage/sets/iceage/Necropotence.java index 0b1bb6d547..40d11e6a20 100644 --- a/Mage.Sets/src/mage/sets/iceage/Necropotence.java +++ b/Mage.Sets/src/mage/sets/iceage/Necropotence.java @@ -143,10 +143,10 @@ class NecropotenceEffect extends OneShotEffect { Card card = controller.getLibrary().removeFromTop(game); if (controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.LIBRARY, false)) { card.setFaceDown(true, game); - Effect returnToHandeffect = new ReturnToHandTargetEffect(false); - returnToHandeffect.setText("put that face down card into your hand"); - returnToHandeffect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game))); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(returnToHandeffect, TargetController.YOU); + Effect returnToHandEffect = new ReturnToHandTargetEffect(false); + returnToHandEffect.setText("put that face down card into your hand"); + returnToHandEffect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game))); + DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(returnToHandEffect, TargetController.YOU); delayedAbility.setSourceId(source.getSourceId()); delayedAbility.setControllerId(source.getControllerId()); delayedAbility.setSourceObject(source.getSourceObject(game), game); diff --git a/Mage.Sets/src/mage/sets/iceage/Stonehands.java b/Mage.Sets/src/mage/sets/iceage/Stonehands.java new file mode 100644 index 0000000000..f95b429eb5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/Stonehands.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.iceage; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ColoredManaCost; +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.ColoredManaSymbol; +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 fireshoes + */ +public class Stonehands extends CardImpl { + + public Stonehands(UUID ownerId) { + super(ownerId, 219, "Stonehands", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); + this.expansionSetCode = "ICE"; + 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 +0/+2. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(0,2, Duration.WhileOnBattlefield))); + + // {R}: Enchanted creature gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 0, Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.R))); + } + + public Stonehands(final Stonehands card) { + super(card); + } + + @Override + public Stonehands copy() { + return new Stonehands(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/TouchOfDeath.java b/Mage.Sets/src/mage/sets/iceage/TouchOfDeath.java new file mode 100644 index 0000000000..a10fd45d37 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/TouchOfDeath.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.iceage; + +import java.util.UUID; +import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.DamageTargetEffect; +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.target.TargetPlayer; + +/** + * + * @author fireshoes + */ +public class TouchOfDeath extends CardImpl { + + public TouchOfDeath(UUID ownerId) { + super(ownerId, 55, "Touch of Death", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{B}"); + this.expansionSetCode = "ICE"; + + // Touch of Death deals 1 damage to target player. You gain 1 life. + this.getSpellAbility().addEffect(new DamageTargetEffect(1)); + this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addEffect(new GainLifeEffect(1)); + + // Draw a card at the beginning of the next turn's upkeep. + this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1)), false)); + } + + public TouchOfDeath(final TouchOfDeath card) { + super(card); + } + + @Override + public TouchOfDeath copy() { + return new TouchOfDeath(this); + } +} diff --git a/Mage.Sets/src/mage/sets/innistrad/MikaeusTheLunarch.java b/Mage.Sets/src/mage/sets/innistrad/MikaeusTheLunarch.java index fe50dc8401..b2e510508a 100644 --- a/Mage.Sets/src/mage/sets/innistrad/MikaeusTheLunarch.java +++ b/Mage.Sets/src/mage/sets/innistrad/MikaeusTheLunarch.java @@ -27,8 +27,7 @@ */ package mage.sets.innistrad; -import mage.constants.CardType; -import mage.constants.Rarity; +import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.SpellAbility; @@ -42,7 +41,9 @@ import mage.abilities.effects.OneShotEffect; 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; @@ -50,8 +51,6 @@ import mage.filter.predicate.permanent.AnotherPredicate; import mage.game.Game; import mage.game.permanent.Permanent; -import java.util.UUID; - /** * @author nantuko */ @@ -112,7 +111,8 @@ class MikaeusTheLunarchEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { int amount = ((SpellAbility) obj).getManaCostsToPay().getX(); if (amount > 0) { permanent.addCounters(CounterType.P1P1.createInstance(amount), game); diff --git a/Mage.Sets/src/mage/sets/invasion/DoOrDie.java b/Mage.Sets/src/mage/sets/invasion/DoOrDie.java new file mode 100644 index 0000000000..20689f03e0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/DoOrDie.java @@ -0,0 +1,132 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.invasion; + +import java.util.ArrayList; +import java.util.List; +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.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPlayer; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class DoOrDie extends CardImpl { + + public DoOrDie(UUID ownerId) { + super(ownerId, 102, "Do or Die", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{1}{B}"); + this.expansionSetCode = "INV"; + + // Separate all creatures target player controls into two piles. Destroy all creatures in the pile of that player's choice. They can't be regenerated. + this.getSpellAbility().addEffect(new DoOrDieEffect()); + this.getSpellAbility().addTarget(new TargetPlayer()); + } + + public DoOrDie(final DoOrDie card) { + super(card); + } + + @Override + public DoOrDie copy() { + return new DoOrDie(this); + } +} + +class DoOrDieEffect extends OneShotEffect { + + public DoOrDieEffect() { + super(Outcome.Sacrifice); + this.staticText = "Separate all creatures target player controls into two piles. Destroy all creatures in the pile of that player's choice. They can't be regenerated"; + } + + public DoOrDieEffect(final DoOrDieEffect effect) { + super(effect); + } + + @Override + public DoOrDieEffect copy() { + return new DoOrDieEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + Player targetPlayer = game.getPlayer(source.getFirstTarget()); + if (player != null && targetPlayer != null) { + int count = game.getBattlefield().countAll(new FilterCreaturePermanent(), targetPlayer.getId(), game); + TargetCreaturePermanent creatures = new TargetCreaturePermanent(0, count, new FilterCreaturePermanent("creatures to put in the first pile"), true); + List pile1 = new ArrayList<>(); + creatures.setRequired(false); + if (player.choose(Outcome.Neutral, creatures, source.getSourceId(), game)) { + List targets = creatures.getTargets(); + for (UUID targetId : targets) { + Permanent p = game.getPermanent(targetId); + if (p != null) { + pile1.add(p); + } + } + } + List pile2 = new ArrayList<>(); + for (Permanent p: game.getBattlefield().getAllActivePermanents(targetPlayer.getId())) { + if (!pile1.contains(p)) { + pile2.add(p); + } + } + + boolean choice = targetPlayer.choosePile(Outcome.DestroyPermanent, "Choose a pile to destroy.", pile1, pile2, game); + + if (choice) { + destroyPermanents(pile1, game, source); + } else { + destroyPermanents(pile2, game, source); + } + + return true; + } + return false; + } + + private void destroyPermanents(List pile, Game game, Ability source) { + for (Permanent permanent : pile) { + if (permanent != null) { + permanent.destroy(source.getSourceId(), game, true); + } + } + } +} diff --git a/Mage.Sets/src/mage/sets/invasion/Dredge.java b/Mage.Sets/src/mage/sets/invasion/Dredge.java index 9f9d27e9ce..9d0d8a0f14 100644 --- a/Mage.Sets/src/mage/sets/invasion/Dredge.java +++ b/Mage.Sets/src/mage/sets/invasion/Dredge.java @@ -30,14 +30,12 @@ package mage.sets.invasion; import java.util.UUID; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.SacrificeControllerEffect; -import mage.abilities.effects.common.SacrificeTargetEffect; 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; /** * @@ -46,18 +44,18 @@ import mage.target.TargetPermanent; public class Dredge extends CardImpl { private static final FilterPermanent filter = new FilterPermanent("a creature or land"); - + static { filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.LAND))); } - + public Dredge(UUID ownerId) { super(ownerId, 103, "Dredge", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{B}"); this.expansionSetCode = "INV"; // Sacrifice a creature or land. this.getSpellAbility().addEffect(new SacrificeControllerEffect(filter, 1, "")); - + // Draw a card. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); } diff --git a/Mage.Sets/src/mage/sets/jacevschandra/KeldonMegaliths.java b/Mage.Sets/src/mage/sets/jacevschandra/KeldonMegaliths.java index c1ffdf3b87..33133b6bbb 100644 --- a/Mage.Sets/src/mage/sets/jacevschandra/KeldonMegaliths.java +++ b/Mage.Sets/src/mage/sets/jacevschandra/KeldonMegaliths.java @@ -57,7 +57,7 @@ public class KeldonMegaliths extends CardImpl { this.addAbility(new RedManaAbility()); // Hellbent - {1}{R}, {tap}: Keldon Megaliths deals 1 damage to target creature or player. Activate this ability only if you have no cards in hand. Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl<>("{1}{R}"), HellbentCondition.getInstance(), - "Hellbent - {1}{R}, {tap}: {this} deals 1 damage to target creature or player. Activate this ability only if you have no cards in hand."); + "Hellbent — {1}{R}, {T}: {this} deals 1 damage to target creature or player. Activate this ability only if you have no cards in hand."); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/judgment/CabalTrainee.java b/Mage.Sets/src/mage/sets/judgment/CabalTrainee.java new file mode 100644 index 0000000000..fb0817a70c --- /dev/null +++ b/Mage.Sets/src/mage/sets/judgment/CabalTrainee.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.judgment; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +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 fireshoes + */ +public class CabalTrainee extends CardImpl { + + public CabalTrainee(UUID ownerId) { + super(ownerId, 63, "Cabal Trainee", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}"); + this.expansionSetCode = "JUD"; + this.subtype.add("Human"); + this.subtype.add("Minion"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Sacrifice Cabal Trainee: Target creature gets -2/-0 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-2, 0, Duration.EndOfTurn), new SacrificeSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public CabalTrainee(final CabalTrainee card) { + super(card); + } + + @Override + public CabalTrainee copy() { + return new CabalTrainee(this); + } +} diff --git a/Mage.Sets/src/mage/sets/judgment/JeskaWarriorAdept.java b/Mage.Sets/src/mage/sets/judgment/JeskaWarriorAdept.java new file mode 100644 index 0000000000..7d12fb0dd3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/judgment/JeskaWarriorAdept.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.judgment; + +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.DamageTargetEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LoneFox + */ +public class JeskaWarriorAdept extends CardImpl { + + public JeskaWarriorAdept(UUID ownerId) { + super(ownerId, 93, "Jeska, Warrior Adept", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + this.expansionSetCode = "JUD"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Barbarian"); + this.subtype.add("Warrior"); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + // Haste + this.addAbility(HasteAbility.getInstance()); + // {tap}: Jeska, Warrior Adept deals 1 damage to target creature or player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public JeskaWarriorAdept(final JeskaWarriorAdept card) { + super(card); + } + + @Override + public JeskaWarriorAdept copy() { + return new JeskaWarriorAdept(this); + } +} diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/BribersPurse.java b/Mage.Sets/src/mage/sets/khansoftarkir/BribersPurse.java index c52299b48d..ae267ccc25 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/BribersPurse.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/BribersPurse.java @@ -35,11 +35,9 @@ 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.Effect; import mage.abilities.effects.EntersBattlefieldEffect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.combat.CantAttackBlockTargetEffect; -import mage.abilities.effects.common.combat.CantAttackTargetEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; @@ -62,7 +60,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 BribersPurseEffect(), "{this} enters the battlefield with X gem counters on it")); // {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)); @@ -83,6 +81,7 @@ public class BribersPurse extends CardImpl { } class BribersPurseEffect extends OneShotEffect { + public BribersPurseEffect() { super(Outcome.Benefit); } @@ -96,7 +95,8 @@ class BribersPurseEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { int amount = ((SpellAbility) obj).getManaCostsToPay().getX(); if (amount > 0) { permanent.addCounters(new Counter("gem", amount), game); @@ -110,4 +110,4 @@ class BribersPurseEffect extends OneShotEffect { public BribersPurseEffect copy() { return new BribersPurseEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/HoodedHydra.java b/Mage.Sets/src/mage/sets/khansoftarkir/HoodedHydra.java index 227068991a..701624c57f 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/HoodedHydra.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/HoodedHydra.java @@ -70,13 +70,13 @@ public class HoodedHydra extends CardImpl { // 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")); - + // 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)); - + // Morph {3}{G}{G} this.addAbility(new MorphAbility(this, new ManaCostsImpl("{3}{G}{G}"))); - + // As Hooded Hydra is turned face up, put five +1/+1 counters on it. Effect effect = new AddCountersSourceEffect(CounterType.P1P1.createInstance(5)); effect.setText("put five +1/+1 counters on it"); @@ -112,7 +112,8 @@ class HoodedHydraEffect1 extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null && !permanent.isFaceDown(game)) { Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { int amount = ((SpellAbility) obj).getManaCostsToPay().getX(); if (amount > 0) { permanent.addCounters(CounterType.P1P1.createInstance(amount), game); diff --git a/Mage.Sets/src/mage/sets/khansoftarkir/VillainousWealth.java b/Mage.Sets/src/mage/sets/khansoftarkir/VillainousWealth.java index 919ade1253..4780c7e18a 100644 --- a/Mage.Sets/src/mage/sets/khansoftarkir/VillainousWealth.java +++ b/Mage.Sets/src/mage/sets/khansoftarkir/VillainousWealth.java @@ -103,7 +103,7 @@ class VillainousWealthEffect extends OneShotEffect { if (player != null) { Cards cardsToExile = new CardsImpl(); cardsToExile.addAll(player.getLibrary().getTopCards(game, source.getManaCostsToPay().getX())); - controller.moveCards(cardsToExile, null, Zone.EXILED, source, game, true); + controller.moveCards(cardsToExile, null, Zone.EXILED, source, game); if (controller.chooseUse(Outcome.PlayForFree, "Cast cards exiled with " + mageObject.getLogName() + " without paying its mana cost?", source, game)) { OuterLoop: while (cardsToExile.count(filter, game) > 0) { diff --git a/Mage.Sets/src/mage/sets/knightsvsdragons/Ghostfire.java b/Mage.Sets/src/mage/sets/knightsvsdragons/Ghostfire.java index d9afd38ba4..fbe9406fa1 100644 --- a/Mage.Sets/src/mage/sets/knightsvsdragons/Ghostfire.java +++ b/Mage.Sets/src/mage/sets/knightsvsdragons/Ghostfire.java @@ -28,8 +28,9 @@ package mage.sets.knightsvsdragons; import java.util.UUID; - +import mage.ObjectColor; import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.InfoEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; @@ -46,6 +47,9 @@ public class Ghostfire extends CardImpl { this.expansionSetCode = "DDG"; // Ghostfire is colorless. + this.color = new ObjectColor(); + this.getSpellAbility().addEffect(new InfoEffect("{this} is colorless")); + // Ghostfire deals 3 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); diff --git a/Mage.Sets/src/mage/sets/legends/HorrorOfHorrors.java b/Mage.Sets/src/mage/sets/legends/HorrorOfHorrors.java new file mode 100644 index 0000000000..99db10a806 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/HorrorOfHorrors.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.legends; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +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.FilterControlledPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class HorrorOfHorrors extends CardImpl { + + private static final FilterControlledPermanent filter1 = new FilterControlledPermanent("a Swamp"); + private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("black creature"); + + static { + filter1.add(new SubtypePredicate("Swamp")); + filter2.add(new ColorPredicate(ObjectColor.BLACK)); + } + + public HorrorOfHorrors(UUID ownerId) { + super(ownerId, 20, "Horror of Horrors", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}{B}"); + this.expansionSetCode = "LEG"; + + // Sacrifice a Swamp: Regenerate target black creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateTargetEffect(), + new SacrificeTargetCost(new TargetControlledPermanent(filter1))); + ability.addTarget(new TargetCreaturePermanent(filter2)); + this.addAbility(ability); + } + + public HorrorOfHorrors(final HorrorOfHorrors card) { + super(card); + } + + @Override + public HorrorOfHorrors copy() { + return new HorrorOfHorrors(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legends/PalladiaMors.java b/Mage.Sets/src/mage/sets/legends/PalladiaMors.java new file mode 100644 index 0000000000..80dd2a58f3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/PalladiaMors.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 LoneFox + */ +public class PalladiaMors extends mage.sets.masterseditioniii.PalladiaMors { + + public PalladiaMors(UUID ownerId) { + super(ownerId); + this.cardNumber = 287; + this.expansionSetCode = "LEG"; + } + + public PalladiaMors(final PalladiaMors card) { + super(card); + } + + @Override + public PalladiaMors copy() { + return new PalladiaMors(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legends/PrincessLucrezia.java b/Mage.Sets/src/mage/sets/legends/PrincessLucrezia.java new file mode 100644 index 0000000000..db585a0ed1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/PrincessLucrezia.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 LoneFox + */ +public class PrincessLucrezia extends mage.sets.masterseditioniii.PrincessLucrezia { + + public PrincessLucrezia(UUID ownerId) { + super(ownerId); + this.cardNumber = 289; + this.expansionSetCode = "LEG"; + } + + public PrincessLucrezia(final PrincessLucrezia card) { + super(card); + } + + @Override + public PrincessLucrezia copy() { + return new PrincessLucrezia(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legends/RivenTurnbull.java b/Mage.Sets/src/mage/sets/legends/RivenTurnbull.java new file mode 100644 index 0000000000..53077b746a --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/RivenTurnbull.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.legends; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.mana.BlackManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class RivenTurnbull extends CardImpl { + + public RivenTurnbull(UUID ownerId) { + super(ownerId, 294, "Riven Turnbull", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{5}{U}{B}"); + this.expansionSetCode = "LEG"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Advisor"); + this.power = new MageInt(5); + this.toughness = new MageInt(7); + + // {tap}: Add {B} to your mana pool. + this.addAbility(new BlackManaAbility()); + } + + public RivenTurnbull(final RivenTurnbull card) { + super(card); + } + + @Override + public RivenTurnbull copy() { + return new RivenTurnbull(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legends/SunastianFalconer.java b/Mage.Sets/src/mage/sets/legends/SunastianFalconer.java new file mode 100644 index 0000000000..3bd67e12fb --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/SunastianFalconer.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.legends; + +import java.util.UUID; +import mage.MageInt; +import mage.Mana; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class SunastianFalconer extends CardImpl { + + public SunastianFalconer(UUID ownerId) { + super(ownerId, 301, "Sunastian Falconer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}{G}"); + this.expansionSetCode = "LEG"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Shaman"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // {tap}: Add {2} to your mana pool. + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(2), new TapSourceCost())); + } + + public SunastianFalconer(final SunastianFalconer card) { + super(card); + } + + @Override + public SunastianFalconer copy() { + return new SunastianFalconer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legends/VaevictisAsmadi.java b/Mage.Sets/src/mage/sets/legends/VaevictisAsmadi.java new file mode 100644 index 0000000000..30f957b194 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/VaevictisAsmadi.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 LoneFox + */ +public class VaevictisAsmadi extends mage.sets.masterseditioniii.VaevictisAsmadi { + + public VaevictisAsmadi(UUID ownerId) { + super(ownerId); + this.cardNumber = 309; + this.expansionSetCode = "LEG"; + } + + public VaevictisAsmadi(final VaevictisAsmadi card) { + super(card); + } + + @Override + public VaevictisAsmadi copy() { + return new VaevictisAsmadi(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legends/WallOfLight.java b/Mage.Sets/src/mage/sets/legends/WallOfLight.java new file mode 100644 index 0000000000..e156d70221 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/WallOfLight.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.legends; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class WallOfLight extends mage.sets.masterseditioniii.WallOfLight { + + public WallOfLight(UUID ownerId) { + super(ownerId); + this.cardNumber = 212; + this.expansionSetCode = "LEG"; + this.rarity = Rarity.UNCOMMON; + } + + public WallOfLight(final WallOfLight card) { + super(card); + } + + @Override + public WallOfLight copy() { + return new WallOfLight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legions/BranchsnapLorian.java b/Mage.Sets/src/mage/sets/legions/BranchsnapLorian.java new file mode 100644 index 0000000000..c3083b95bc --- /dev/null +++ b/Mage.Sets/src/mage/sets/legions/BranchsnapLorian.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.legions; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.TrampleAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class BranchsnapLorian extends CardImpl { + + public BranchsnapLorian(UUID ownerId) { + super(ownerId, 118, "Branchsnap Lorian", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); + this.expansionSetCode = "LGN"; + this.subtype.add("Beast"); + this.power = new MageInt(4); + this.toughness = new MageInt(1); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + // Morph {G} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{G}"))); + } + + public BranchsnapLorian(final BranchsnapLorian card) { + super(card); + } + + @Override + public BranchsnapLorian copy() { + return new BranchsnapLorian(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legions/CrestedCraghorn.java b/Mage.Sets/src/mage/sets/legions/CrestedCraghorn.java new file mode 100644 index 0000000000..aed2e22cc9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legions/CrestedCraghorn.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.legions; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.ProvokeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class CrestedCraghorn extends CardImpl { + + public CrestedCraghorn(UUID ownerId) { + super(ownerId, 91, "Crested Craghorn", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{R}"); + this.expansionSetCode = "LGN"; + this.subtype.add("Goat"); + this.subtype.add("Beast"); + this.power = new MageInt(4); + this.toughness = new MageInt(1); + + // Haste + this.addAbility(HasteAbility.getInstance()); + // Provoke + this.addAbility(new ProvokeAbility()); + } + + public CrestedCraghorn(final CrestedCraghorn card) { + super(card); + } + + @Override + public CrestedCraghorn copy() { + return new CrestedCraghorn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legions/GoblinFirebug.java b/Mage.Sets/src/mage/sets/legions/GoblinFirebug.java index 907f6577eb..67a12a03a7 100644 --- a/Mage.Sets/src/mage/sets/legions/GoblinFirebug.java +++ b/Mage.Sets/src/mage/sets/legions/GoblinFirebug.java @@ -29,15 +29,12 @@ package mage.sets.legions; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.common.LeavesBattlefieldTriggeredAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.SacrificeTargetEffect; +import mage.abilities.effects.common.SacrificeControllerEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.filter.common.FilterControlledLandPermanent; -import mage.target.common.TargetControlledPermanent; +import mage.filter.common.FilterLandPermanent; /** * @@ -53,11 +50,7 @@ public class GoblinFirebug extends CardImpl { this.toughness = new MageInt(2); // When Goblin Firebug leaves the battlefield, sacrifice a land. - Effect effect = new SacrificeTargetEffect(); - effect.setText("sacrifice a land"); - Ability ability = new LeavesBattlefieldTriggeredAbility(effect, false); - ability.addTarget(new TargetControlledPermanent(new FilterControlledLandPermanent())); - this.addAbility(ability); + this.addAbility(new LeavesBattlefieldTriggeredAbility(new SacrificeControllerEffect(new FilterLandPermanent(), 1, ""), false)); } public GoblinFirebug(final GoblinFirebug card) { diff --git a/Mage.Sets/src/mage/sets/legions/RockshardElemental.java b/Mage.Sets/src/mage/sets/legions/RockshardElemental.java new file mode 100644 index 0000000000..18c71730a2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/legions/RockshardElemental.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.legions; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.DoubleStrikeAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class RockshardElemental extends CardImpl { + + public RockshardElemental(UUID ownerId) { + super(ownerId, 109, "Rockshard Elemental", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{R}{R}"); + this.expansionSetCode = "LGN"; + this.subtype.add("Elemental"); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Double strike + this.addAbility(DoubleStrikeAbility.getInstance()); + // Morph {4}{R}{R} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{4}{R}{R}"))); + } + + public RockshardElemental(final RockshardElemental card) { + super(card); + } + + @Override + public RockshardElemental copy() { + return new RockshardElemental(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legions/SootfeatherFlock.java b/Mage.Sets/src/mage/sets/legions/SootfeatherFlock.java new file mode 100644 index 0000000000..04fb010baa --- /dev/null +++ b/Mage.Sets/src/mage/sets/legions/SootfeatherFlock.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.legions; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class SootfeatherFlock extends CardImpl { + + public SootfeatherFlock(UUID ownerId) { + super(ownerId, 82, "Sootfeather Flock", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{B}"); + this.expansionSetCode = "LGN"; + this.subtype.add("Bird"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Morph {3}{B} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{3}{B}"))); + } + + public SootfeatherFlock(final SootfeatherFlock card) { + super(card); + } + + @Override + public SootfeatherFlock copy() { + return new SootfeatherFlock(this); + } +} diff --git a/Mage.Sets/src/mage/sets/limitedalpha/Timetwister.java b/Mage.Sets/src/mage/sets/limitedalpha/Timetwister.java index c35a2e31b6..b515aba3a5 100644 --- a/Mage.Sets/src/mage/sets/limitedalpha/Timetwister.java +++ b/Mage.Sets/src/mage/sets/limitedalpha/Timetwister.java @@ -29,8 +29,9 @@ package mage.sets.limitedalpha; import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; +import mage.abilities.effects.common.DrawCardAllEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Outcome; @@ -49,9 +50,11 @@ public class Timetwister extends CardImpl { super(ownerId, 85, "Timetwister", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{U}"); this.expansionSetCode = "LEA"; - // Each player shuffles his or her hand and graveyard into his or her library, then draws seven cards. this.getSpellAbility().addEffect(new TimetwisterEffect()); + Effect effect = new DrawCardAllEffect(7); + effect.setText(", then draws seven cards"); + this.getSpellAbility().addEffect(effect); } @@ -69,7 +72,7 @@ class TimetwisterEffect extends OneShotEffect { public TimetwisterEffect() { super(Outcome.Neutral); - staticText = "Each player shuffles his or her hand and graveyard into his or her library, then draws seven cards"; + staticText = "Each player shuffles his or her hand and graveyard into his or her library"; } public TimetwisterEffect(final TimetwisterEffect effect) { @@ -78,27 +81,14 @@ class TimetwisterEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player sourcePlayer = game.getPlayer(source.getControllerId()); - for (UUID playerId: sourcePlayer.getInRange()) { + for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { - for (Card card: player.getHand().getCards(game)) { - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); - } - for (Card card: player.getGraveyard().getCards(game)) { - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); - } + player.moveCards(player.getHand(), Zone.HAND, Zone.LIBRARY, source, game); + player.moveCards(player.getGraveyard(), Zone.GRAVEYARD, Zone.LIBRARY, source, game); player.shuffleLibrary(game); - } } - game.getState().handleSimultaneousEvent(game); // needed here so state based triggered effects - for (UUID playerId: sourcePlayer.getInRange()) { - Player player = game.getPlayer(playerId); - if (player != null) { - player.drawCards(7, game); - } - } return true; } diff --git a/Mage.Sets/src/mage/sets/limitedbeta/Deathgrip.java b/Mage.Sets/src/mage/sets/limitedbeta/Deathgrip.java index 7d7bb2a9ce..725a31bd53 100644 --- a/Mage.Sets/src/mage/sets/limitedbeta/Deathgrip.java +++ b/Mage.Sets/src/mage/sets/limitedbeta/Deathgrip.java @@ -29,10 +29,14 @@ package mage.sets.limitedbeta; import java.util.UUID; import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.CounterTargetEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; +import mage.constants.Zone; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; import mage.target.TargetSpell; @@ -46,14 +50,15 @@ public class Deathgrip extends CardImpl { static{ filter.add(new ColorPredicate(ObjectColor.GREEN)); } - + public Deathgrip(UUID ownerId) { super(ownerId, 9, "Deathgrip", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{B}{B}"); this.expansionSetCode = "LEB"; // {B}{B}: Counter target green spell. - this.getSpellAbility().addEffect(new CounterTargetEffect()); - this.getSpellAbility().addTarget(new TargetSpell(filter)); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterTargetEffect(), new ManaCostsImpl("{B}{B}")); + ability.addTarget(new TargetSpell(filter)); + this.addAbility(ability); } public Deathgrip(final Deathgrip card) { diff --git a/Mage.Sets/src/mage/sets/lorwyn/BrokenAmbitions.java b/Mage.Sets/src/mage/sets/lorwyn/BrokenAmbitions.java new file mode 100644 index 0000000000..b4168bb613 --- /dev/null +++ b/Mage.Sets/src/mage/sets/lorwyn/BrokenAmbitions.java @@ -0,0 +1,133 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.lorwyn; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.costs.Cost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.costs.mana.ManaCost; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ClashEffect; +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.stack.Spell; +import mage.players.Player; +import mage.target.TargetSpell; + +/** + * + * @author fireshoes + */ +public class BrokenAmbitions extends CardImpl { + + public BrokenAmbitions(UUID ownerId) { + super(ownerId, 54, "Broken Ambitions", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{X}{U}"); + this.expansionSetCode = "LRW"; + + // Counter target spell unless its controller pays {X}. Clash with an opponent. If you win, that spell's controller puts the top four cards of his or her library into his or her graveyard. + this.getSpellAbility().addEffect(new BrokenAmbitionsEffect(new ManacostVariableValue())); + this.getSpellAbility().addTarget(new TargetSpell()); + } + + public BrokenAmbitions(final BrokenAmbitions card) { + super(card); + } + + @Override + public BrokenAmbitions copy() { + return new BrokenAmbitions(this); + } +} + +class BrokenAmbitionsEffect extends OneShotEffect { + + protected Cost cost; + protected DynamicValue genericMana; + + public BrokenAmbitionsEffect(Cost cost) { + super(Outcome.Benefit); + this.cost = cost; + this.staticText = "Counter target spell unless its controller pays {X}. Clash with an opponent. If you win, that spell's controller puts the top four cards of his or her library into his or her graveyard"; + } + + public BrokenAmbitionsEffect(DynamicValue genericMana) { + super(Outcome.Detriment); + this.genericMana = genericMana; + } + + public BrokenAmbitionsEffect(final BrokenAmbitionsEffect effect) { + super(effect); + if (effect.cost != null) { + this.cost = effect.cost.copy(); + } + if (effect.genericMana != null) { + this.genericMana = effect.genericMana.copy(); + } + } + + @Override + public BrokenAmbitionsEffect copy() { + return new BrokenAmbitionsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Spell spell = (Spell) game.getStack().getStackObject(getTargetPointer().getFirst(game, source)); + Player controller = game.getPlayer(spell.getControllerId()); + if (controller != null) { + Cost costToPay; + if (cost != null) { + costToPay = cost.copy(); + } else { + costToPay = new GenericManaCost(genericMana.calculate(game, source, this)); + } + String message; + if (costToPay instanceof ManaCost) { + message = "Would you like to pay " + costToPay.getText() + " to prevent counter effect?"; + } else { + message = costToPay.getText() + " to prevent counter effect?"; + } + costToPay.clearPaid(); + if (!(controller.chooseUse(Outcome.Benefit, message, source, game) && costToPay.pay(source, game, spell.getSourceId(), spell.getControllerId(), false))) { + game.getStack().counter(spell.getId(), source.getSourceId(), game); + } + if (ClashEffect.getInstance().apply(game, source)) { + controller.moveCards(controller.getLibrary().getTopCards(game, 4), Zone.LIBRARY, Zone.GRAVEYARD, source, game); + } + return true; + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/lorwyn/GiantsIre.java b/Mage.Sets/src/mage/sets/lorwyn/GiantsIre.java new file mode 100644 index 0000000000..82e62f769a --- /dev/null +++ b/Mage.Sets/src/mage/sets/lorwyn/GiantsIre.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.lorwyn; + +import java.util.UUID; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.TargetPlayer; + +/** + * + * @author fireshoes + */ +public class GiantsIre extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Giant"); + + static { + filter.add(new SubtypePredicate("Giant")); + } + + public GiantsIre(UUID ownerId) { + super(ownerId, 170, "Giant's Ire", Rarity.COMMON, new CardType[]{CardType.TRIBAL, CardType.SORCERY}, "{3}{R}"); + this.expansionSetCode = "LRW"; + this.subtype.add("Giant"); + + // Giant's Ire deals 4 damage to target player. + this.getSpellAbility().addEffect(new DamageTargetEffect(4)); + this.getSpellAbility().addTarget(new TargetPlayer()); + + // If you control a Giant, draw a card. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(1), + new PermanentsOnTheBattlefieldCondition(filter),"If you control a Giant, draw a card")); + } + + public GiantsIre(final GiantsIre card) { + super(card); + } + + @Override + public GiantsIre copy() { + return new GiantsIre(this); + } +} diff --git a/Mage.Sets/src/mage/sets/lorwyn/IncandescentSoulstoke.java b/Mage.Sets/src/mage/sets/lorwyn/IncandescentSoulstoke.java index 1d2c147476..f3ceefded0 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/IncandescentSoulstoke.java +++ b/Mage.Sets/src/mage/sets/lorwyn/IncandescentSoulstoke.java @@ -70,7 +70,7 @@ public class IncandescentSoulstoke extends CardImpl { static { filter.add(new SubtypePredicate("Elemental")); } - + public IncandescentSoulstoke(UUID ownerId) { super(ownerId, 178, "Incandescent Soulstoke", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}"); this.expansionSetCode = "LRW"; @@ -81,13 +81,12 @@ public class IncandescentSoulstoke extends CardImpl { // Other Elemental creatures you control get +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, true))); - - + // {1}{R}, {T}: You may put an Elemental creature card from your hand onto the battlefield. That creature gains haste until end of turn. Sacrifice it at the beginning of the next end step. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new IncandescentSoulstokeEffect(), new ManaCostsImpl<>("{1}{R}")); ability.addCost(new TapSourceCost()); this.addAbility(ability); - + } public IncandescentSoulstoke(final IncandescentSoulstoke card) { @@ -101,7 +100,7 @@ public class IncandescentSoulstoke extends CardImpl { } class IncandescentSoulstokeEffect extends OneShotEffect { - + private static final String choiceText = "Put an Elemental creature card from your hand onto the battlefield?"; public IncandescentSoulstokeEffect() { @@ -133,10 +132,10 @@ class IncandescentSoulstokeEffect extends OneShotEffect { Permanent permanent = game.getPermanent(card.getId()); if (permanent != null) { ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.Custom); - effect.setTargetPointer(new FixedTarget(permanent.getId())); + effect.setTargetPointer(new FixedTarget(permanent, game)); game.addEffect(effect, source); - SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice " + card.getName()); - sacrificeEffect.setTargetPointer(new FixedTarget(card.getId())); + SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice " + card.getName(), source.getControllerId()); + sacrificeEffect.setTargetPointer(new FixedTarget(permanent, game)); DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect); delayedAbility.setSourceId(source.getSourceId()); delayedAbility.setControllerId(source.getControllerId()); diff --git a/Mage.Sets/src/mage/sets/lorwyn/MistbindClique.java b/Mage.Sets/src/mage/sets/lorwyn/MistbindClique.java index b2efb5c1b1..9c5c7b0efa 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/MistbindClique.java +++ b/Mage.Sets/src/mage/sets/lorwyn/MistbindClique.java @@ -68,7 +68,6 @@ public class MistbindClique extends CardImpl { // When a Faerie is championed with Mistbind Clique, tap all lands target player controls. this.addAbility(new MistbindCliqueAbility()); - } public MistbindClique(final MistbindClique card) { @@ -105,8 +104,10 @@ class MistbindCliqueAbility extends ZoneChangeTriggeredAbility { @Override public boolean checkTrigger(GameEvent event, Game game) { - if (event.getSourceId() != null && event.getSourceId().equals(getSourceId())) { - ZoneChangeEvent zEvent = (ZoneChangeEvent)event; + if (event.getSourceId() != null + && event.getSourceId().equals(getSourceId()) + && !event.getSourceId().equals(event.getTargetId())) { + ZoneChangeEvent zEvent = (ZoneChangeEvent) event; if (zEvent.getTarget() != null && zEvent.getTarget().hasSubtype("Faerie")) { return true; } diff --git a/Mage.Sets/src/mage/sets/lorwyn/NathsBuffoon.java b/Mage.Sets/src/mage/sets/lorwyn/NathsBuffoon.java new file mode 100644 index 0000000000..9e9c619e27 --- /dev/null +++ b/Mage.Sets/src/mage/sets/lorwyn/NathsBuffoon.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.lorwyn; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author LoneFox + */ +public class NathsBuffoon extends CardImpl { + + private static final FilterCard filter = new FilterCard("Elves"); + + static { + filter.add(new SubtypePredicate("Elf")); + } + + public NathsBuffoon(UUID ownerId) { + super(ownerId, 129, "Nath's Buffoon", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "LRW"; + this.subtype.add("Goblin"); + this.subtype.add("Rogue"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Protection from Elves + this.addAbility(new ProtectionAbility(filter)); + } + + public NathsBuffoon(final NathsBuffoon card) { + super(card); + } + + @Override + public NathsBuffoon copy() { + return new NathsBuffoon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/lorwyn/SurgeOfThoughtweft.java b/Mage.Sets/src/mage/sets/lorwyn/SurgeOfThoughtweft.java new file mode 100644 index 0000000000..371828e431 --- /dev/null +++ b/Mage.Sets/src/mage/sets/lorwyn/SurgeOfThoughtweft.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.lorwyn; + +import java.util.UUID; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +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.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author fireshoes + */ +public class SurgeOfThoughtweft extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Kithkin"); + + static { + filter.add(new SubtypePredicate("Kithkin")); + } + + public SurgeOfThoughtweft(UUID ownerId) { + super(ownerId, 43, "Surge of Thoughtweft", Rarity.COMMON, new CardType[]{CardType.TRIBAL, CardType.INSTANT}, "{1}{W}"); + this.expansionSetCode = "LRW"; + this.subtype.add("Kithkin"); + + // Creatures you control get +1/+1 until end of turn. + this.getSpellAbility().addEffect(new BoostControlledEffect(1, 1, Duration.EndOfTurn)); + + // If you control a Kithkin, draw a card. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(1), + new PermanentsOnTheBattlefieldCondition(filter),"If you control a Kithkin, draw a card")); + } + + public SurgeOfThoughtweft(final SurgeOfThoughtweft card) { + super(card); + } + + @Override + public SurgeOfThoughtweft copy() { + return new SurgeOfThoughtweft(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magic2010/ProteanHydra.java b/Mage.Sets/src/mage/sets/magic2010/ProteanHydra.java index 9ca788f148..29285cf79c 100644 --- a/Mage.Sets/src/mage/sets/magic2010/ProteanHydra.java +++ b/Mage.Sets/src/mage/sets/magic2010/ProteanHydra.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.sets.magic2010; +import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.DelayedTriggeredAbility; @@ -37,20 +37,22 @@ 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.counter.AddCountersSourceEffect; import mage.cards.CardImpl; -import mage.constants.*; +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.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; -import java.util.UUID; -import mage.abilities.effects.PreventionEffectData; - /** * * @author BetaSteward_at_googlemail.com @@ -65,10 +67,9 @@ public class ProteanHydra extends CardImpl { this.power = new MageInt(0); 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")); - + // 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())); @@ -102,8 +103,9 @@ public class ProteanHydra extends CardImpl { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { - int amount = ((SpellAbility)obj).getManaCostsToPay().getX(); + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { + int amount = ((SpellAbility) obj).getManaCostsToPay().getX(); if (amount > 0) { permanent.addCounters(CounterType.P1P1.createInstance(amount), game); } @@ -127,7 +129,7 @@ public class ProteanHydra extends CardImpl { } public ProteanHydraEffect2(final ProteanHydraEffect2 effect) { - super(effect); + super(effect); } @Override @@ -142,12 +144,12 @@ public class ProteanHydra extends CardImpl { @Override public boolean replaceEvent(GameEvent event, Ability source, Game game) { - PreventionEffectData preventionEffectData = preventDamageAction(event, source, game); + PreventionEffectData preventionEffectData = preventDamageAction(event, source, game); if (preventionEffectData.getPreventedDamage() > 0) { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { permanent.removeCounters(CounterType.P1P1.createInstance(preventionEffectData.getPreventedDamage()), game); - } + } } return false; } diff --git a/Mage.Sets/src/mage/sets/magic2010/SoulWarden.java b/Mage.Sets/src/mage/sets/magic2010/SoulWarden.java index 5310991e3c..a84fcd66d1 100644 --- a/Mage.Sets/src/mage/sets/magic2010/SoulWarden.java +++ b/Mage.Sets/src/mage/sets/magic2010/SoulWarden.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,24 @@ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.magic2010; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; import mage.MageInt; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; - /** * * @author BetaSteward_at_googlemail.com @@ -47,6 +45,7 @@ import mage.filter.predicate.permanent.AnotherPredicate; public class SoulWarden extends CardImpl { private static final FilterPermanent filter = new FilterCreaturePermanent("another creature"); + static { filter.add(new AnotherPredicate()); } @@ -60,6 +59,7 @@ public class SoulWarden extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); + // Whenever another creature enters the battlefield, you gain 1 life. this.addAbility(new EntersBattlefieldAllTriggeredAbility(new GainLifeEffect(1), filter)); } diff --git a/Mage.Sets/src/mage/sets/magic2011/TimeReversal.java b/Mage.Sets/src/mage/sets/magic2011/TimeReversal.java index 6762ceeef9..adf004f62a 100644 --- a/Mage.Sets/src/mage/sets/magic2011/TimeReversal.java +++ b/Mage.Sets/src/mage/sets/magic2011/TimeReversal.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,23 +20,23 @@ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * The views and conclusions contained in the software and documentation are those 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.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DrawCardAllEffect; +import mage.abilities.effects.common.ExileSpellEffect; +import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.ExileSpellEffect; -import mage.cards.Card; -import mage.cards.CardImpl; import mage.constants.Zone; import mage.game.Game; import mage.players.Player; @@ -51,7 +51,11 @@ public class TimeReversal extends CardImpl { super(ownerId, 75, "Time Reversal", Rarity.MYTHIC, new CardType[]{CardType.SORCERY}, "{3}{U}{U}"); this.expansionSetCode = "M11"; + // Each player shuffles his or her hand and graveyard into his or her library, then draws seven cards this.getSpellAbility().addEffect(new TimeReversalEffect()); + Effect effect = new DrawCardAllEffect(7); + effect.setText(", then draws seven cards"); + this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(ExileSpellEffect.getInstance()); } @@ -78,18 +82,13 @@ class TimeReversalEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player sourcePlayer = game.getPlayer(source.getControllerId()); - for (UUID playerId: sourcePlayer.getInRange()) { + Player controller = game.getPlayer(source.getControllerId()); + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { - for (Card card: player.getHand().getCards(game)) { - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); - } - for (Card card: player.getGraveyard().getCards(game)) { - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); - } + player.moveCards(player.getHand(), Zone.HAND, Zone.LIBRARY, source, game); + player.moveCards(player.getGraveyard(), Zone.GRAVEYARD, Zone.LIBRARY, source, game); player.shuffleLibrary(game); - player.drawCards(7, game); } } return true; @@ -100,4 +99,4 @@ class TimeReversalEffect extends OneShotEffect { return new TimeReversalEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/magic2012/Firebreathing.java b/Mage.Sets/src/mage/sets/magic2012/Firebreathing.java index 6cd0014823..e7d349cee9 100644 --- a/Mage.Sets/src/mage/sets/magic2012/Firebreathing.java +++ b/Mage.Sets/src/mage/sets/magic2012/Firebreathing.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.magic2012; import java.util.UUID; - -import mage.constants.*; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ColoredManaCost; @@ -38,6 +35,12 @@ 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.ColoredManaSymbol; +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; @@ -47,20 +50,23 @@ import mage.target.common.TargetCreaturePermanent; */ public class Firebreathing extends CardImpl { - public Firebreathing (UUID ownerId) { + public Firebreathing(UUID ownerId) { super(ownerId, 132, "Firebreathing", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{R}"); this.expansionSetCode = "M12"; 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); + + // {R}: Enchanted creature gets +1/+0 until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 0, Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.R))); } - public Firebreathing (final Firebreathing card) { + public Firebreathing(final Firebreathing card) { super(card); } diff --git a/Mage.Sets/src/mage/sets/magic2012/PrimordialHydra.java b/Mage.Sets/src/mage/sets/magic2012/PrimordialHydra.java index 150a026655..420d7def57 100644 --- a/Mage.Sets/src/mage/sets/magic2012/PrimordialHydra.java +++ b/Mage.Sets/src/mage/sets/magic2012/PrimordialHydra.java @@ -27,8 +27,7 @@ */ package mage.sets.magic2012; - -import mage.constants.*; +import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.SpellAbility; @@ -42,12 +41,15 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.keyword.TrampleAbility; 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; -import java.util.UUID; - /** * * @author Loki @@ -83,6 +85,7 @@ public class PrimordialHydra extends CardImpl { } class PrimordialHydraEntersEffect extends OneShotEffect { + public PrimordialHydraEntersEffect() { super(Outcome.BoostCreature); } @@ -96,7 +99,8 @@ class PrimordialHydraEntersEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { int amount = ((SpellAbility) obj).getManaCostsToPay().getX(); if (amount > 0) { permanent.addCounters(CounterType.P1P1.createInstance(amount), game); @@ -113,6 +117,7 @@ class PrimordialHydraEntersEffect extends OneShotEffect { } class PrimordialHydraDoubleEffect extends OneShotEffect { + PrimordialHydraDoubleEffect() { super(Outcome.BoostCreature); staticText = "double the number of +1/+1 counters on {this}"; @@ -139,4 +144,4 @@ class PrimordialHydraDoubleEffect extends OneShotEffect { public PrimordialHydraDoubleEffect copy() { return new PrimordialHydraDoubleEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/magic2014/ShadowbornDemon.java b/Mage.Sets/src/mage/sets/magic2014/ShadowbornDemon.java index 08eda6473f..c81ad6839b 100644 --- a/Mage.Sets/src/mage/sets/magic2014/ShadowbornDemon.java +++ b/Mage.Sets/src/mage/sets/magic2014/ShadowbornDemon.java @@ -30,14 +30,13 @@ package mage.sets.magic2014; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; -import mage.abilities.effects.common.SacrificeTargetEffect; +import mage.abilities.effects.common.SacrificeControllerEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.constants.CardType; @@ -50,7 +49,6 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.Game; import mage.players.Player; import mage.target.Target; -import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetCreaturePermanent; /** @@ -60,6 +58,7 @@ import mage.target.common.TargetCreaturePermanent; public class ShadowbornDemon extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Demon creature"); + static { filter.add(Predicates.not(new SubtypePredicate("Demon"))); } @@ -75,17 +74,14 @@ public class ShadowbornDemon extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); // When Shadowborn Demon enters the battlefield, destroy target non-Demon creature. - Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(),false); + Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); Target target = new TargetCreaturePermanent(filter); ability.addTarget(target); this.addAbility(ability); + // At the beginning of your upkeep, if there are fewer than six creature cards in your graveyard, sacrifice a creature. - TriggeredAbility triggeredAbility = new BeginningOfUpkeepTriggeredAbility(new SacrificeTargetEffect(), TargetController.YOU, false); - target = new TargetControlledCreaturePermanent(); - target.setNotTarget(false); - triggeredAbility.addTarget(target); this.addAbility(new ConditionalTriggeredAbility( - triggeredAbility, + new BeginningOfUpkeepTriggeredAbility(new SacrificeControllerEffect(new FilterCreaturePermanent(), 1, ""), TargetController.YOU, false), new InvertCondition(new CreatureCardsInControllerGraveCondition(6)), "At the beginning of your upkeep, if there are fewer than six creature cards in your graveyard, sacrifice a creature")); @@ -102,6 +98,7 @@ public class ShadowbornDemon extends CardImpl { } class CreatureCardsInControllerGraveCondition implements Condition { + private int value; public CreatureCardsInControllerGraveCondition(int value) { @@ -111,10 +108,9 @@ class CreatureCardsInControllerGraveCondition implements Condition { @Override public boolean apply(Game game, Ability source) { Player p = game.getPlayer(source.getControllerId()); - if (p != null && p.getGraveyard().count(new FilterCreatureCard(), game) >= value) - { - return true; + if (p != null && p.getGraveyard().count(new FilterCreatureCard(), game) >= value) { + return true; } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/magic2014/VastwoodHydra.java b/Mage.Sets/src/mage/sets/magic2014/VastwoodHydra.java index e23e2f0123..1face40591 100644 --- a/Mage.Sets/src/mage/sets/magic2014/VastwoodHydra.java +++ b/Mage.Sets/src/mage/sets/magic2014/VastwoodHydra.java @@ -42,7 +42,6 @@ import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.TargetController; import mage.counters.CounterType; -import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.Game; @@ -57,6 +56,7 @@ import mage.target.common.TargetCreaturePermanentAmount; public class VastwoodHydra extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures you control"); + static { filter.add(new ControllerPredicate(TargetController.YOU)); } @@ -103,9 +103,8 @@ class VastwoodHydraEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { - // delete to prevent using it again if put into battlefield from other effect - setValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY, null); + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { int amount = ((SpellAbility) obj).getManaCostsToPay().getX(); if (amount > 0) { permanent.addCounters(CounterType.P1P1.createInstance(amount), game); @@ -126,7 +125,7 @@ class VastwoodHydraDistributeEffect extends OneShotEffect { public VastwoodHydraDistributeEffect() { super(Outcome.BoostCreature); - this.staticText = "distribute a number of +1/+1 counters equal to the number of +1/+1 counters on {this} among any number of creatures you control"; + this.staticText = "distribute a number of +1/+1 counters equal to the number of +1/+1 counters on {this} among any number of creatures you control"; } public VastwoodHydraDistributeEffect(final VastwoodHydraDistributeEffect effect) { @@ -142,7 +141,7 @@ class VastwoodHydraDistributeEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { if (source.getTargets().size() > 0) { Target multiTarget = source.getTargets().get(0); - for (UUID target: multiTarget.getTargets()) { + for (UUID target : multiTarget.getTargets()) { Permanent permanent = game.getPermanent(target); if (permanent != null) { permanent.addCounters(CounterType.P1P1.createInstance(multiTarget.getTargetAmount(target)), game); diff --git a/Mage.Sets/src/mage/sets/magic2015/GenesisHydra.java b/Mage.Sets/src/mage/sets/magic2015/GenesisHydra.java index b6ff9b77b9..39a891f900 100644 --- a/Mage.Sets/src/mage/sets/magic2015/GenesisHydra.java +++ b/Mage.Sets/src/mage/sets/magic2015/GenesisHydra.java @@ -27,6 +27,7 @@ */ package mage.sets.magic2015; +import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.SpellAbility; @@ -54,10 +55,6 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetCard; -import java.util.UUID; - - - /** * * @author LevelX2 @@ -73,7 +70,6 @@ public class GenesisHydra extends CardImpl { this.power = new MageInt(0); this.toughness = new MageInt(0); - // 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. @@ -106,9 +102,8 @@ class GenesisHydraEntersBattlefieldEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { - // delete to prevent using it again if put into battlefield from other effect - setValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY, null); + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { SpellAbility spellAbility = (SpellAbility) obj; if (spellAbility.getSourceId().equals(source.getSourceId())) { // put into play by normal cast int amount = spellAbility.getManaCostsToPay().getX(); diff --git a/Mage.Sets/src/mage/sets/magicorigins/AbbotOfKeralKeep.java b/Mage.Sets/src/mage/sets/magicorigins/AbbotOfKeralKeep.java index 9fa4c1512c..4ffba2d353 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/AbbotOfKeralKeep.java +++ b/Mage.Sets/src/mage/sets/magicorigins/AbbotOfKeralKeep.java @@ -42,7 +42,6 @@ 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.Library; @@ -65,7 +64,7 @@ public class AbbotOfKeralKeep extends CardImpl { // Prowess this.addAbility(new ProwessAbility()); - + // When Abbot of Keral Keep enters the battlefield, exile the top card of your library. Until end of turn, you may play that card. this.addAbility(new EntersBattlefieldTriggeredAbility(new AbbotOfKeralKeepExileEffect())); } @@ -104,10 +103,10 @@ class AbbotOfKeralKeepExileEffect extends OneShotEffect { Library library = controller.getLibrary(); Card card = library.removeFromTop(game); if (card != null) { - String exileName = new StringBuilder(sourcePermanent.getIdName()).append(" ").toString(); - controller.moveCardToExileWithInfo(card, source.getSourceId(), exileName, source.getSourceId(), game, Zone.LIBRARY, true); + String exileName = sourcePermanent.getIdName() + " "; + controller.moveCardsToExile(card, source, game, true, source.getSourceId(), exileName); ContinuousEffect effect = new AbbotOfKeralKeepCastFromExileEffect(); - effect.setTargetPointer(new FixedTarget(card.getId())); + effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game))); game.addEffect(effect, source); } return true; @@ -139,7 +138,7 @@ class AbbotOfKeralKeepCastFromExileEffect extends AsThoughEffectImpl { @Override public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { - return source.getControllerId().equals(affectedControllerId) && - objectId.equals(getTargetPointer().getFirst(game, source)); + return source.getControllerId().equals(affectedControllerId) + && objectId.equals(getTargetPointer().getFirst(game, source)); } } diff --git a/Mage.Sets/src/mage/sets/magicorigins/DaysUndoing.java b/Mage.Sets/src/mage/sets/magicorigins/DaysUndoing.java index a77cbe2b19..9e68ba3fd7 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/DaysUndoing.java +++ b/Mage.Sets/src/mage/sets/magicorigins/DaysUndoing.java @@ -31,9 +31,10 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.condition.common.MyTurnCondition; import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DrawCardAllEffect; import mage.abilities.effects.common.EndTurnEffect; -import mage.cards.Card; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Outcome; @@ -54,6 +55,9 @@ public class DaysUndoing extends CardImpl { // 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. this.getSpellAbility().addEffect(new DaysUndoingEffect()); + Effect effect = new DrawCardAllEffect(7); + effect.setText(", then draws seven cards"); + this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new EndTurnEffect(), MyTurnCondition.getInstance(), "If it's your turn, end the turn")); } @@ -71,7 +75,7 @@ class DaysUndoingEffect extends OneShotEffect { public DaysUndoingEffect() { super(Outcome.Neutral); - staticText = "Each player shuffles his or her hand and graveyard into his or her library, then draws seven cards"; + staticText = "Each player shuffles his or her hand and graveyard into his or her library"; } public DaysUndoingEffect(final DaysUndoingEffect effect) { @@ -80,28 +84,16 @@ class DaysUndoingEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player sourcePlayer = game.getPlayer(source.getControllerId()); - for (UUID playerId : sourcePlayer.getInRange()) { + Player controller = game.getPlayer(source.getControllerId()); + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { - for (Card card : player.getHand().getCards(game)) { - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); - } - for (Card card : player.getGraveyard().getCards(game)) { - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); - } - game.informPlayers(player.getLogName() + " puts his or her hand and graveyard into his or her library"); + player.moveCards(player.getHand(), Zone.HAND, Zone.LIBRARY, source, game); + player.moveCards(player.getGraveyard(), Zone.GRAVEYARD, Zone.LIBRARY, source, game); player.shuffleLibrary(game); } } - game.getState().handleSimultaneousEvent(game); // needed here so state based triggered effects - for (UUID playerId : sourcePlayer.getInRange()) { - Player player = game.getPlayer(playerId); - if (player != null) { - player.drawCards(7, game); - } - } return true; } diff --git a/Mage.Sets/src/mage/sets/magicorigins/HangarbackWalker.java b/Mage.Sets/src/mage/sets/magicorigins/HangarbackWalker.java index 6a1aa70c7c..f438ef8f52 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/HangarbackWalker.java +++ b/Mage.Sets/src/mage/sets/magicorigins/HangarbackWalker.java @@ -102,7 +102,8 @@ class HangarbackWalkerEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { int amount = ((SpellAbility) obj).getManaCostsToPay().getX(); if (amount > 0) { permanent.addCounters(CounterType.P1P1.createInstance(amount), game); diff --git a/Mage.Sets/src/mage/sets/magicorigins/TheGreatAurora.java b/Mage.Sets/src/mage/sets/magicorigins/TheGreatAurora.java index dd5b0b2a6c..93e61a08d9 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/TheGreatAurora.java +++ b/Mage.Sets/src/mage/sets/magicorigins/TheGreatAurora.java @@ -94,7 +94,7 @@ class TheGreatAuroraEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Map> permanentsOwned = new HashMap<>(); - Collection permanents = game.getBattlefield().getAllPermanents(); + Collection permanents = game.getBattlefield().getActivePermanents(source.getControllerId(), game); for (Permanent permanent : permanents) { List list = permanentsOwned.get(permanent.getOwnerId()); if (list == null) { diff --git a/Mage.Sets/src/mage/sets/mastersedition/DeathSpeakers.java b/Mage.Sets/src/mage/sets/mastersedition/DeathSpeakers.java new file mode 100644 index 0000000000..cb15936232 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mastersedition/DeathSpeakers.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.mastersedition; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class DeathSpeakers extends mage.sets.homelands.DeathSpeakers { + + public DeathSpeakers(UUID ownerId) { + super(ownerId); + this.cardNumber = 7; + this.expansionSetCode = "MED"; + this.rarity = Rarity.COMMON; + } + + public DeathSpeakers(final DeathSpeakers card) { + super(card); + } + + @Override + public DeathSpeakers copy() { + return new DeathSpeakers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mastersedition/HungryMist.java b/Mage.Sets/src/mage/sets/mastersedition/HungryMist.java new file mode 100644 index 0000000000..88df432a47 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mastersedition/HungryMist.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 LoneFox + */ +public class HungryMist extends mage.sets.fifthedition.HungryMist { + + public HungryMist(UUID ownerId) { + super(ownerId); + this.cardNumber = 121; + this.expansionSetCode = "MED"; + } + + public HungryMist(final HungryMist card) { + super(card); + } + + @Override + public HungryMist copy() { + return new HungryMist(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mastersedition/IllusionaryForces.java b/Mage.Sets/src/mage/sets/mastersedition/IllusionaryForces.java new file mode 100644 index 0000000000..30ad0dd52e --- /dev/null +++ b/Mage.Sets/src/mage/sets/mastersedition/IllusionaryForces.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.keyword.FlyingAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class IllusionaryForces extends CardImpl { + + public IllusionaryForces(UUID ownerId) { + super(ownerId, 38, "Illusionary Forces", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "MED"; + this.subtype.add("Illusion"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Cumulative upkeep {U} + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{U}"))); + } + + public IllusionaryForces(final IllusionaryForces card) { + super(card); + } + + @Override + public IllusionaryForces copy() { + return new IllusionaryForces(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mastersedition/IllusionaryWall.java b/Mage.Sets/src/mage/sets/mastersedition/IllusionaryWall.java new file mode 100644 index 0000000000..91fb06dff7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mastersedition/IllusionaryWall.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.mastersedition; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.DefenderAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class IllusionaryWall extends CardImpl { + + public IllusionaryWall(UUID ownerId) { + super(ownerId, 39, "Illusionary Wall", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "MED"; + this.subtype.add("Illusion"); + this.subtype.add("Wall"); + this.power = new MageInt(7); + this.toughness = new MageInt(4); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + // Flying + this.addAbility(FlyingAbility.getInstance()); + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + // Cumulative upkeep {U} + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{U}"))); + } + + public IllusionaryWall(final IllusionaryWall card) { + super(card); + } + + @Override + public IllusionaryWall copy() { + return new IllusionaryWall(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mastersedition/Roots.java b/Mage.Sets/src/mage/sets/mastersedition/Roots.java new file mode 100644 index 0000000000..d94b49d315 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mastersedition/Roots.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.mastersedition; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class Roots extends mage.sets.homelands.Roots { + + public Roots(UUID ownerId) { + super(ownerId); + this.cardNumber = 127; + this.expansionSetCode = "MED"; + this.rarity = Rarity.COMMON; + } + + public Roots(final Roots card) { + super(card); + } + + @Override + public Roots copy() { + return new Roots(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mastersedition/SeaSprite.java b/Mage.Sets/src/mage/sets/mastersedition/SeaSprite.java new file mode 100644 index 0000000000..503b55f1b4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mastersedition/SeaSprite.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.mastersedition; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class SeaSprite extends mage.sets.homelands.SeaSprite { + + public SeaSprite(UUID ownerId) { + super(ownerId); + this.cardNumber = 48; + this.expansionSetCode = "MED"; + this.rarity = Rarity.COMMON; + } + + public SeaSprite(final SeaSprite card) { + super(card); + } + + @Override + public SeaSprite copy() { + return new SeaSprite(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mastersedition/SpectralBears.java b/Mage.Sets/src/mage/sets/mastersedition/SpectralBears.java index e364e177ea..28ee345cc8 100644 --- a/Mage.Sets/src/mage/sets/mastersedition/SpectralBears.java +++ b/Mage.Sets/src/mage/sets/mastersedition/SpectralBears.java @@ -52,7 +52,7 @@ public class SpectralBears extends CardImpl { public SpectralBears(UUID ownerId) { super(ownerId, 131, "Spectral Bears", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.expansionSetCode = "HML"; + this.expansionSetCode = "MED"; this.subtype.add("Bear"); this.subtype.add("Spirit"); this.power = new MageInt(3); @@ -114,4 +114,4 @@ class SpectralBearsTriggeredAbility extends TriggeredAbilityImpl { public String getRule() { return "Whenever {this} attacks, if defending player controls no black nontoken permanents, it doesn't untap during your next untap step."; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/masterseditionii/ElvishFarmer.java b/Mage.Sets/src/mage/sets/masterseditionii/ElvishFarmer.java new file mode 100644 index 0000000000..3d06c738ec --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditionii/ElvishFarmer.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.masterseditionii; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.GainLifeEffect; +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.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.SaprolingToken; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author LoneFox + */ +public class ElvishFarmer extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Saproling"); + + static { + filter.add(new SubtypePredicate("Saproling")); + } + + public ElvishFarmer(UUID ownerId) { + super(ownerId, 156, "Elvish Farmer", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "ME2"; + this.subtype.add("Elf"); + this.power = new MageInt(0); + this.toughness = new MageInt(2); + + // At the beginning of your upkeep, put a spore counter on Elvish Farmer. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.SPORE.createInstance()), TargetController.YOU, false)); + // Remove three spore counters from Elvish Farmer: Put a 1/1 green Saproling creature token onto the battlefield. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SaprolingToken()), new RemoveCountersSourceCost(CounterType.SPORE.createInstance(3)))); + // Sacrifice a Saproling: You gain 2 life. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(2), + new SacrificeTargetCost(new TargetControlledPermanent(1, 1, filter, false)))); + } + + public ElvishFarmer(final ElvishFarmer card) { + super(card); + } + + @Override + public ElvishFarmer copy() { + return new ElvishFarmer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditionii/Enervate.java b/Mage.Sets/src/mage/sets/masterseditionii/Enervate.java new file mode 100644 index 0000000000..a0cb61ea42 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditionii/Enervate.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.masterseditionii; + +import java.util.UUID; +import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.TapTargetEffect; +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 fireshoes + */ +public class Enervate extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("artifact, creature, or land"); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.ARTIFACT), + new CardTypePredicate(CardType.CREATURE), + new CardTypePredicate(CardType.LAND))); + } + + public Enervate(UUID ownerId) { + super(ownerId, 47, "Enervate", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{U}"); + this.expansionSetCode = "ME2"; + + // Tap target artifact, creature, or land. + this.getSpellAbility().addEffect(new TapTargetEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + + // Draw a card at the beginning of the next turn's upkeep. + this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1)), false)); + } + + public Enervate(final Enervate card) { + super(card); + } + + @Override + public Enervate copy() { + return new Enervate(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditionii/Narwhal.java b/Mage.Sets/src/mage/sets/masterseditionii/Narwhal.java new file mode 100644 index 0000000000..762fd0dfc8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditionii/Narwhal.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.masterseditionii; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class Narwhal extends mage.sets.homelands.Narwhal { + + public Narwhal(UUID ownerId) { + super(ownerId); + this.cardNumber = 57; + this.expansionSetCode = "ME2"; + this.rarity = Rarity.UNCOMMON; + } + + public Narwhal(final Narwhal card) { + super(card); + } + + @Override + public Narwhal copy() { + return new Narwhal(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditionii/Stonehands.java b/Mage.Sets/src/mage/sets/masterseditionii/Stonehands.java new file mode 100644 index 0000000000..6e666840ff --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditionii/Stonehands.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 fireshoes + */ +public class Stonehands extends mage.sets.iceage.Stonehands { + + public Stonehands(UUID ownerId) { + super(ownerId); + this.cardNumber = 151; + this.expansionSetCode = "ME2"; + } + + public Stonehands(final Stonehands card) { + super(card); + } + + @Override + public Stonehands copy() { + return new Stonehands(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/LuMengWuGeneral.java b/Mage.Sets/src/mage/sets/masterseditioniii/LuMengWuGeneral.java new file mode 100644 index 0000000000..915f6c742a --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/LuMengWuGeneral.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.masterseditioniii; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class LuMengWuGeneral extends mage.sets.portalthreekingdoms.LuMengWuGeneral { + + public LuMengWuGeneral(UUID ownerId) { + super(ownerId); + this.cardNumber = 41; + this.expansionSetCode = "ME3"; + this.rarity = Rarity.UNCOMMON; + } + + public LuMengWuGeneral(final LuMengWuGeneral card) { + super(card); + } + + @Override + public LuMengWuGeneral copy() { + return new LuMengWuGeneral(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/PalladiaMors.java b/Mage.Sets/src/mage/sets/masterseditioniii/PalladiaMors.java new file mode 100644 index 0000000000..29daf0ab70 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/PalladiaMors.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.masterseditioniii; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; + +/** + * + * @author LoneFox + */ +public class PalladiaMors extends CardImpl { + + public PalladiaMors(UUID ownerId) { + super(ownerId, 164, "Palladia-Mors", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}{R}{G}{G}{W}{W}"); + this.expansionSetCode = "ME3"; + this.supertype.add("Legendary"); + this.subtype.add("Elder"); + this.subtype.add("Dragon"); + this.power = new MageInt(7); + this.toughness = new MageInt(7); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Trample + this.addAbility(TrampleAbility.getInstance()); + // At the beginning of your upkeep, sacrifice Palladia-Mors unless you pay {R}{G}{W}. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ManaCostsImpl("{R}{G}{W}")), TargetController.YOU, false)); + } + + public PalladiaMors(final PalladiaMors card) { + super(card); + } + + @Override + public PalladiaMors copy() { + return new PalladiaMors(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/PrincessLucrezia.java b/Mage.Sets/src/mage/sets/masterseditioniii/PrincessLucrezia.java new file mode 100644 index 0000000000..d3b41fc3df --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/PrincessLucrezia.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.masterseditioniii; + +import java.util.UUID; +import mage.MageInt; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.abilities.mana.BlueManaAbility; + +/** + * + * @author LoneFox + */ +public class PrincessLucrezia extends CardImpl { + + public PrincessLucrezia(UUID ownerId) { + super(ownerId, 166, "Princess Lucrezia", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}{U}{B}"); + this.expansionSetCode = "ME3"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(5); + this.toughness = new MageInt(4); + + // {tap}: Add {U} to your mana pool. + this.addAbility(new BlueManaAbility()); + } + + public PrincessLucrezia(final PrincessLucrezia card) { + super(card); + } + + @Override + public PrincessLucrezia copy() { + return new PrincessLucrezia(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/RivenTurnbull.java b/Mage.Sets/src/mage/sets/masterseditioniii/RivenTurnbull.java new file mode 100644 index 0000000000..59b049ae3a --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/RivenTurnbull.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.masterseditioniii; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class RivenTurnbull extends mage.sets.legends.RivenTurnbull { + + public RivenTurnbull(UUID ownerId) { + super(ownerId); + this.cardNumber = 171; + this.expansionSetCode = "ME3"; + } + + public RivenTurnbull(final RivenTurnbull card) { + super(card); + } + + @Override + public RivenTurnbull copy() { + return new RivenTurnbull(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/ShuCavalry.java b/Mage.Sets/src/mage/sets/masterseditioniii/ShuCavalry.java new file mode 100644 index 0000000000..1457dd6fff --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/ShuCavalry.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.masterseditioniii; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ShuCavalry extends CardImpl { + + public ShuCavalry(UUID ownerId) { + super(ownerId, 23, "Shu Cavalry", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "ME3"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Horsemanship + this.addAbility(HorsemanshipAbility.getInstance()); + } + + public ShuCavalry(final ShuCavalry card) { + super(card); + } + + @Override + public ShuCavalry copy() { + return new ShuCavalry(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/ShuEliteCompanions.java b/Mage.Sets/src/mage/sets/masterseditioniii/ShuEliteCompanions.java new file mode 100644 index 0000000000..a463cd1302 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/ShuEliteCompanions.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.masterseditioniii; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ShuEliteCompanions extends CardImpl { + + public ShuEliteCompanions(UUID ownerId) { + super(ownerId, 24, "Shu Elite Companions", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{W}"); + this.expansionSetCode = "ME3"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Horsemanship + this.addAbility(HorsemanshipAbility.getInstance()); + } + + public ShuEliteCompanions(final ShuEliteCompanions card) { + super(card); + } + + @Override + public ShuEliteCompanions copy() { + return new ShuEliteCompanions(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/ShuGeneral.java b/Mage.Sets/src/mage/sets/masterseditioniii/ShuGeneral.java new file mode 100644 index 0000000000..1c47b7fd10 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/ShuGeneral.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.masterseditioniii; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ShuGeneral extends mage.sets.portalthreekingdoms.ShuGeneral { + + public ShuGeneral(UUID ownerId) { + super(ownerId); + this.cardNumber = 25; + this.expansionSetCode = "ME3"; + this.rarity = Rarity.COMMON; + } + + public ShuGeneral(final ShuGeneral card) { + super(card); + } + + @Override + public ShuGeneral copy() { + return new ShuGeneral(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/SunastianFalconer.java b/Mage.Sets/src/mage/sets/masterseditioniii/SunastianFalconer.java new file mode 100644 index 0000000000..56cd522fa8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/SunastianFalconer.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.masterseditioniii; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class SunastianFalconer extends mage.sets.legends.SunastianFalconer { + + public SunastianFalconer(UUID ownerId) { + super(ownerId); + this.cardNumber = 178; + this.expansionSetCode = "ME3"; + } + + public SunastianFalconer(final SunastianFalconer card) { + super(card); + } + + @Override + public SunastianFalconer copy() { + return new SunastianFalconer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/VaevictisAsmadi.java b/Mage.Sets/src/mage/sets/masterseditioniii/VaevictisAsmadi.java new file mode 100644 index 0000000000..93e0513a6f --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/VaevictisAsmadi.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.masterseditioniii; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +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.constants.TargetController; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class VaevictisAsmadi extends CardImpl { + + public VaevictisAsmadi(UUID ownerId) { + super(ownerId, 185, "Vaevictis Asmadi", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{B}{R}{R}{G}{G}"); + this.expansionSetCode = "ME3"; + this.supertype.add("Legendary"); + this.subtype.add("Elder"); + this.subtype.add("Dragon"); + this.power = new MageInt(7); + this.toughness = new MageInt(7); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // At the beginning of your upkeep, sacrifice Vaevictis Asmadi unless you pay {B}{R}{G}. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ManaCostsImpl("{B}{R}{G}")), TargetController.YOU, false)); + // {B}: Vaevictis Asmadi gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{B}"))); + // {R}: Vaevictis Asmadi gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}"))); + // {G}: Vaevictis Asmadi gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{G}"))); + } + + public VaevictisAsmadi(final VaevictisAsmadi card) { + super(card); + } + + @Override + public VaevictisAsmadi copy() { + return new VaevictisAsmadi(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/WallOfLight.java b/Mage.Sets/src/mage/sets/masterseditioniii/WallOfLight.java new file mode 100644 index 0000000000..83fdd6802b --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/WallOfLight.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.ObjectColor; +import mage.abilities.keyword.DefenderAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author LoneFox + */ +public class WallOfLight extends CardImpl { + + private static final FilterCard filter = new FilterCard("black"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLACK)); + } + + public WallOfLight(UUID ownerId) { + super(ownerId, 27, "Wall of Light", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "ME3"; + this.subtype.add("Wall"); + this.power = new MageInt(1); + this.toughness = new MageInt(5); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + // Protection from black + this.addAbility(new ProtectionAbility(filter)); + } + + public WallOfLight(final WallOfLight card) { + super(card); + } + + @Override + public WallOfLight copy() { + return new WallOfLight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/WeiEliteCompanions.java b/Mage.Sets/src/mage/sets/masterseditioniii/WeiEliteCompanions.java new file mode 100644 index 0000000000..9af6c47d2d --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/WeiEliteCompanions.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.masterseditioniii; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class WeiEliteCompanions extends CardImpl { + + public WeiEliteCompanions(UUID ownerId) { + super(ownerId, 79, "Wei Elite Companions", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{B}"); + this.expansionSetCode = "ME3"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Horsemanship + this.addAbility(HorsemanshipAbility.getInstance()); + } + + public WeiEliteCompanions(final WeiEliteCompanions card) { + super(card); + } + + @Override + public WeiEliteCompanions copy() { + return new WeiEliteCompanions(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/WeiStrikeForce.java b/Mage.Sets/src/mage/sets/masterseditioniii/WeiStrikeForce.java new file mode 100644 index 0000000000..08224ecece --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/WeiStrikeForce.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.masterseditioniii; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class WeiStrikeForce extends mage.sets.portalthreekingdoms.WeiStrikeForce { + + public WeiStrikeForce(UUID ownerId) { + super(ownerId); + this.cardNumber = 82; + this.expansionSetCode = "ME3"; + } + + public WeiStrikeForce(final WeiStrikeForce card) { + super(card); + } + + @Override + public WeiStrikeForce copy() { + return new WeiStrikeForce(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/WuEliteCavalry.java b/Mage.Sets/src/mage/sets/masterseditioniii/WuEliteCavalry.java new file mode 100644 index 0000000000..ea254c501c --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/WuEliteCavalry.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.masterseditioniii; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class WuEliteCavalry extends mage.sets.portalthreekingdoms.WuEliteCavalry { + + public WuEliteCavalry(UUID ownerId) { + super(ownerId); + this.cardNumber = 54; + this.expansionSetCode = "ME3"; + } + + public WuEliteCavalry(final WuEliteCavalry card) { + super(card); + } + + @Override + public WuEliteCavalry copy() { + return new WuEliteCavalry(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/ZhangFeiFierceWarrior.java b/Mage.Sets/src/mage/sets/masterseditioniii/ZhangFeiFierceWarrior.java new file mode 100644 index 0000000000..db64cef886 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/ZhangFeiFierceWarrior.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.masterseditioniii; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ZhangFeiFierceWarrior extends CardImpl { + + public ZhangFeiFierceWarrior(UUID ownerId) { + super(ownerId, 28, "Zhang Fei, Fierce Warrior", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{W}{W}"); + this.expansionSetCode = "ME3"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.subtype.add("Warrior"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Vigilance; horsemanship + this.addAbility(VigilanceAbility.getInstance()); + this.addAbility(HorsemanshipAbility.getInstance()); + } + + public ZhangFeiFierceWarrior(final ZhangFeiFierceWarrior card) { + super(card); + } + + @Override + public ZhangFeiFierceWarrior copy() { + return new ZhangFeiFierceWarrior(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniv/FoulSpirit.java b/Mage.Sets/src/mage/sets/masterseditioniv/FoulSpirit.java index bf83c7d77a..4a00e1cc95 100644 --- a/Mage.Sets/src/mage/sets/masterseditioniv/FoulSpirit.java +++ b/Mage.Sets/src/mage/sets/masterseditioniv/FoulSpirit.java @@ -29,16 +29,13 @@ package mage.sets.masterseditioniv; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.SacrificeTargetEffect; +import mage.abilities.effects.common.SacrificeControllerEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.filter.common.FilterControlledLandPermanent; -import mage.target.common.TargetControlledPermanent; +import mage.filter.common.FilterLandPermanent; /** * @@ -55,13 +52,9 @@ public class FoulSpirit extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - + // When Foul Spirit enters the battlefield, sacrifice a land. - Effect effect = new SacrificeTargetEffect(); - effect.setText("sacrifice a land"); - Ability ability = new EntersBattlefieldTriggeredAbility(effect, false); - ability.addTarget(new TargetControlledPermanent(new FilterControlledLandPermanent())); - this.addAbility(ability); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeControllerEffect(new FilterLandPermanent(), 1, ""), false)); } public FoulSpirit(final FoulSpirit card) { diff --git a/Mage.Sets/src/mage/sets/masterseditioniv/JununEfreet.java b/Mage.Sets/src/mage/sets/masterseditioniv/JununEfreet.java new file mode 100644 index 0000000000..11361effc3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniv/JununEfreet.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 JununEfreet extends mage.sets.fourthedition.JununEfreet { + + public JununEfreet(UUID ownerId) { + super(ownerId); + this.cardNumber = 88; + this.expansionSetCode = "ME4"; + } + + public JununEfreet(final JununEfreet card) { + super(card); + } + + @Override + public JununEfreet copy() { + return new JununEfreet(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mercadianmasques/BattleSquadron.java b/Mage.Sets/src/mage/sets/mercadianmasques/BattleSquadron.java new file mode 100644 index 0000000000..88565f75e1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mercadianmasques/BattleSquadron.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.mercadianmasques; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; +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.FilterControlledCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class BattleSquadron extends CardImpl { + + public BattleSquadron(UUID ownerId) { + super(ownerId, 174, "Battle Squadron", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); + this.expansionSetCode = "MMQ"; + this.subtype.add("Goblin"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Battle Squadron'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))); + } + + public BattleSquadron(final BattleSquadron card) { + super(card); + } + + @Override + public BattleSquadron copy() { + return new BattleSquadron(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mercadianmasques/Lithophage.java b/Mage.Sets/src/mage/sets/mercadianmasques/Lithophage.java new file mode 100644 index 0000000000..6c08c9990f --- /dev/null +++ b/Mage.Sets/src/mage/sets/mercadianmasques/Lithophage.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.mercadianmasques; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author fireshoes + */ +public class Lithophage extends CardImpl { + + private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("a Mountain"); + + static { + filter.add(new SubtypePredicate("Mountain")); + } + + public Lithophage(UUID ownerId) { + super(ownerId, 202, "Lithophage", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); + this.expansionSetCode = "MMQ"; + this.subtype.add("Insect"); + this.power = new MageInt(7); + this.toughness = new MageInt(7); + + // At the beginning of your upkeep, sacrifice Lithophage unless you sacrifice a Mountain. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, + new SacrificeSourceUnlessPaysEffect(new SacrificeTargetCost(new TargetControlledPermanent(filter))), TargetController.YOU, false)); + } + + public Lithophage(final Lithophage card) { + super(card); + } + + @Override + public Lithophage copy() { + return new Lithophage(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mercadianmasques/LumberingSatyr.java b/Mage.Sets/src/mage/sets/mercadianmasques/LumberingSatyr.java new file mode 100644 index 0000000000..60bec905e1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mercadianmasques/LumberingSatyr.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.mercadianmasques; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.ForestwalkAbility; +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 fireshoes + */ +public class LumberingSatyr extends CardImpl { + + public LumberingSatyr(UUID ownerId) { + super(ownerId, 257, "Lumbering Satyr", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.expansionSetCode = "MMQ"; + this.subtype.add("Satyr"); + this.subtype.add("Beast"); + this.power = new MageInt(5); + this.toughness = new MageInt(4); + + // All creatures have forestwalk. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityAllEffect(new ForestwalkAbility(), Duration.WhileOnBattlefield, new FilterCreaturePermanent()))); + } + + public LumberingSatyr(final LumberingSatyr card) { + super(card); + } + + @Override + public LumberingSatyr copy() { + return new LumberingSatyr(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mercadianmasques/RishadanAirship.java b/Mage.Sets/src/mage/sets/mercadianmasques/RishadanAirship.java new file mode 100644 index 0000000000..5ea871ef1e --- /dev/null +++ b/Mage.Sets/src/mage/sets/mercadianmasques/RishadanAirship.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.mercadianmasques; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.CanBlockOnlyFlyingAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class RishadanAirship extends CardImpl { + + public RishadanAirship(UUID ownerId) { + super(ownerId, 91, "Rishadan Airship", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "MMQ"; + this.subtype.add("Human"); + this.subtype.add("Pirate"); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Rishadan Airship can block only creatures with flying. + this.addAbility(new CanBlockOnlyFlyingAbility()); + } + + public RishadanAirship(final RishadanAirship card) { + super(card); + } + + @Override + public RishadanAirship copy() { + return new RishadanAirship(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirage/CeruleanWyvern.java b/Mage.Sets/src/mage/sets/mirage/CeruleanWyvern.java new file mode 100644 index 0000000000..e5ff0bd451 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/CeruleanWyvern.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.mirage; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author LoneFox + */ +public class CeruleanWyvern extends CardImpl { + + private static final FilterCard filter = new FilterCard("green"); + + static { + filter.add(new ColorPredicate(ObjectColor.GREEN)); + } + + public CeruleanWyvern(UUID ownerId) { + super(ownerId, 57, "Cerulean Wyvern", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "MIR"; + this.subtype.add("Drake"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // protection from green + this.addAbility(new ProtectionAbility(filter)); + } + + public CeruleanWyvern(final CeruleanWyvern card) { + super(card); + } + + @Override + public CeruleanWyvern copy() { + return new CeruleanWyvern(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirage/CloakOfInvisibility.java b/Mage.Sets/src/mage/sets/mirage/CloakOfInvisibility.java new file mode 100644 index 0000000000..1e9f7b1c96 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/CloakOfInvisibility.java @@ -0,0 +1,118 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those 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.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.RestrictionEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.PhasingAbility; +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.permanent.Permanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class CloakOfInvisibility extends CardImpl { + + public CloakOfInvisibility(UUID ownerId) { + super(ownerId, 58, "Cloak of Invisibility", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{U}"); + this.expansionSetCode = "MIR"; + 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 phasing and can't be blocked except by Walls. + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(PhasingAbility.getInstance(), AttachmentType.AURA)); + ability.addEffect(new CantBeBlockedByWallsEffect()); + this.addAbility(ability); + } + + public CloakOfInvisibility(final CloakOfInvisibility card) { + super(card); + } + + @Override + public CloakOfInvisibility copy() { + return new CloakOfInvisibility(this); + } +} + +class CantBeBlockedByWallsEffect extends RestrictionEffect { + + public CantBeBlockedByWallsEffect() { + super(Duration.WhileOnBattlefield); + staticText = "Enchanted creature can't be blocked except by Walls"; + } + + public CantBeBlockedByWallsEffect(final CantBeBlockedByWallsEffect effect) { + super(effect); + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + Permanent enchantment = game.getPermanent(source.getSourceId()); + if (enchantment != null && enchantment.getAttachedTo() != null) { + if (permanent.getId().equals(enchantment.getAttachedTo())) { + return true; + } + } + return false; + } + + @Override + public boolean canBeBlocked(Permanent attacker, Permanent blocker, Ability source, Game game) { + if (!blocker.hasSubtype("Wall")) { + return false; + } + return true; + } + + @Override + public CantBeBlockedByWallsEffect copy() { + return new CantBeBlockedByWallsEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirage/CrystalGolem.java b/Mage.Sets/src/mage/sets/mirage/CrystalGolem.java new file mode 100644 index 0000000000..4b069186ad --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/CrystalGolem.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.mirage; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.effects.common.PhaseOutSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; + +/** + * + * @author fireshoes + */ +public class CrystalGolem extends CardImpl { + + public CrystalGolem(UUID ownerId) { + super(ownerId, 263, "Crystal Golem", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + this.expansionSetCode = "MIR"; + this.subtype.add("Golem"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // At the beginning of your end step, Crystal Golem phases out. + this.addAbility(new BeginningOfEndStepTriggeredAbility(new PhaseOutSourceEffect(), TargetController.YOU, false)); + } + + public CrystalGolem(final CrystalGolem card) { + super(card); + } + + @Override + public CrystalGolem copy() { + return new CrystalGolem(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirage/FreneticEfreet.java b/Mage.Sets/src/mage/sets/mirage/FreneticEfreet.java new file mode 100644 index 0000000000..98a77984ab --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/FreneticEfreet.java @@ -0,0 +1,106 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those 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.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +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.players.Player; + +/** + * + * @author fireshoes + */ +public class FreneticEfreet extends CardImpl { + + public FreneticEfreet(UUID ownerId) { + super(ownerId, 324, "Frenetic Efreet", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{U}{R}"); + this.expansionSetCode = "MIR"; + this.subtype.add("Efreet"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // {0}: Flip a coin. If you win the flip, Frenetic Efreet phases out. If you lose the flip, sacrifice Frenetic Efreet. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new FreneticEfreetEffect(), new GenericManaCost(0))); + } + + public FreneticEfreet(final FreneticEfreet card) { + super(card); + } + + @Override + public FreneticEfreet copy() { + return new FreneticEfreet(this); + } +} + +class FreneticEfreetEffect extends OneShotEffect { + + public FreneticEfreetEffect() { + super(Outcome.Damage); + staticText = "Flip a coin. If you win the flip, {this} phases out. If you lose the flip, sacrifice {this}"; + } + + public FreneticEfreetEffect(FreneticEfreetEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null && permanent != null) { + if (controller.flipCoin(game)) { + return permanent.phaseOut(game); + } else { + permanent.sacrifice(source.getSourceId(), game); + return true; + } + } + return false; + } + + @Override + public FreneticEfreetEffect copy() { + return new FreneticEfreetEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirage/HazeriderDrake.java b/Mage.Sets/src/mage/sets/mirage/HazeriderDrake.java new file mode 100644 index 0000000000..9fafa33256 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/HazeriderDrake.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.mirage; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author LoneFox + */ +public class HazeriderDrake extends CardImpl { + + private static final FilterCard filter = new FilterCard("red"); + + static { + filter.add(new ColorPredicate(ObjectColor.RED)); + } + + public HazeriderDrake(UUID ownerId) { + super(ownerId, 328, "Hazerider Drake", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}{U}"); + this.expansionSetCode = "MIR"; + this.subtype.add("Drake"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // protection from red + this.addAbility(new ProtectionAbility(filter)); + } + + public HazeriderDrake(final HazeriderDrake card) { + super(card); + } + + @Override + public HazeriderDrake copy() { + return new HazeriderDrake(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirage/KarooMeerkat.java b/Mage.Sets/src/mage/sets/mirage/KarooMeerkat.java new file mode 100644 index 0000000000..4c05f5806b --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/KarooMeerkat.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.mirage; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author LoneFox + */ +public class KarooMeerkat extends CardImpl { + + private static final FilterCard filter = new FilterCard("blue"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLUE)); + } + + public KarooMeerkat(UUID ownerId) { + super(ownerId, 123, "Karoo Meerkat", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "MIR"; + this.subtype.add("Mongoose"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Protection from blue + this.addAbility(new ProtectionAbility(filter)); + } + + public KarooMeerkat(final KarooMeerkat card) { + super(card); + } + + @Override + public KarooMeerkat copy() { + return new KarooMeerkat(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirage/MelesseSpirit.java b/Mage.Sets/src/mage/sets/mirage/MelesseSpirit.java new file mode 100644 index 0000000000..1299568ed9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/MelesseSpirit.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.mirage; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author LoneFox + */ +public class MelesseSpirit extends CardImpl { + + private static final FilterCard filter = new FilterCard("black"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLACK)); + } + + public MelesseSpirit(UUID ownerId) { + super(ownerId, 231, "Melesse Spirit", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); + this.expansionSetCode = "MIR"; + this.subtype.add("Angel"); + this.subtype.add("Spirit"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // protection from black + this.addAbility(new ProtectionAbility(filter)); + } + + public MelesseSpirit(final MelesseSpirit card) { + super(card); + } + + @Override + public MelesseSpirit copy() { + return new MelesseSpirit(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirage/MistDragon.java b/Mage.Sets/src/mage/sets/mirage/MistDragon.java new file mode 100644 index 0000000000..672b23b45e --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/MistDragon.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.mirage; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.PhaseOutSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.effects.common.continuous.LoseAbilitySourceEffect; +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; + +/** + * + * @author fireshoes + */ +public class MistDragon extends CardImpl { + + public MistDragon(UUID ownerId) { + super(ownerId, 79, "Mist Dragon", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{U}{U}"); + this.expansionSetCode = "MIR"; + this.subtype.add("Dragon"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // {0}: Mist Dragon gains flying. This effect lasts indefinitely + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield), new GenericManaCost(0))); + + // {0}: Mist Dragon loses flying. This effect lasts indefinitely + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + new LoseAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield), new GenericManaCost(0))); + + // {3}{U}{U}: Mist Dragon phases out. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + new PhaseOutSourceEffect(), new ManaCostsImpl("{3}{U}{U}"))); + } + + public MistDragon(final MistDragon card) { + super(card); + } + + @Override + public MistDragon copy() { + return new MistDragon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirage/PaupersCage.java b/Mage.Sets/src/mage/sets/mirage/PaupersCage.java new file mode 100644 index 0000000000..7a2d0d3741 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/PaupersCage.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.mirage; + +import java.util.UUID; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.condition.common.CardsInHandCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class PaupersCage extends CardImpl { + + public PaupersCage(UUID ownerId) { + super(ownerId, 279, "Paupers' Cage", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{3}"); + this.expansionSetCode = "MIR"; + + // At the beginning of each opponent's upkeep, if that player has two or fewer cards in hand, Paupers' Cage deals 2 damage to him or her. + TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, + new DamageTargetEffect(2), TargetController.OPPONENT, false, true); + CardsInHandCondition condition = new CardsInHandCondition(CardsInHandCondition.CountType.FEWER_THAN, 3); + this.addAbility(new ConditionalTriggeredAbility(ability, condition, "At the beginning of each opponent's upkeep, if that player has two or fewer cards in hand, {this} deals 2 damage to him or her.")); + } + + public PaupersCage(final PaupersCage card) { + super(card); + } + + @Override + public PaupersCage copy() { + return new PaupersCage(this); + } +} diff --git a/Mage/src/mage/abilities/costs/common/MetalcraftCost.java b/Mage.Sets/src/mage/sets/mirage/RealityRipple.java similarity index 63% rename from Mage/src/mage/abilities/costs/common/MetalcraftCost.java rename to Mage.Sets/src/mage/sets/mirage/RealityRipple.java index d73fd484ba..1ec6929a7c 100644 --- a/Mage/src/mage/abilities/costs/common/MetalcraftCost.java +++ b/Mage.Sets/src/mage/sets/mirage/RealityRipple.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,56 +20,53 @@ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * The views and conclusions contained in the software and documentation are 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; +package mage.sets.mirage; import java.util.UUID; +import mage.abilities.effects.common.PhaseOutTargetEffect; +import mage.cards.CardImpl; import mage.constants.CardType; -import mage.abilities.Ability; -import mage.abilities.costs.CostImpl; +import mage.constants.Rarity; import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.game.Game; +import mage.target.TargetPermanent; /** * - * @author BetaSteward_at_googlemail.com + * @author fireshoes */ -public class MetalcraftCost extends CostImpl { - - private static final FilterPermanent filter = new FilterPermanent("artifact"); - +public class RealityRipple extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("artifact, creature, or land"); + static { - filter.add(new CardTypePredicate(CardType.ARTIFACT)); + filter.add(Predicates.or( + new CardTypePredicate(CardType.ARTIFACT), + new CardTypePredicate(CardType.CREATURE), + new CardTypePredicate(CardType.LAND))); } - public MetalcraftCost() { - this.text = "Activate this ability only if you control three or more artifacts"; + public RealityRipple(UUID ownerId) { + super(ownerId, 87, "Reality Ripple", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{U}"); + this.expansionSetCode = "MIR"; + + // Target artifact, creature, or land phases out. + this.getSpellAbility().addEffect(new PhaseOutTargetEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); } - public MetalcraftCost(final MetalcraftCost cost) { - super(cost); + public RealityRipple(final RealityRipple card) { + super(card); } @Override - public MetalcraftCost copy() { - return new MetalcraftCost(this); + public RealityRipple copy() { + return new RealityRipple(this); } - - @Override - public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { - return game.getBattlefield().contains(filter, controllerId, 3, game); - } - - @Override - public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) { - this.paid = true; - return paid; - } - -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/mirage/RitualOfSteel.java b/Mage.Sets/src/mage/sets/mirage/RitualOfSteel.java new file mode 100644 index 0000000000..b3e56b3a3e --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/RitualOfSteel.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.mirage; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +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 fireshoes + */ +public class RitualOfSteel extends CardImpl { + + public RitualOfSteel(UUID ownerId) { + super(ownerId, 240, "Ritual of Steel", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); + this.expansionSetCode = "MIR"; + 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 Ritual of Steel enters the battlefield, draw a card at the beginning of the next turn's upkeep. + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1)), false))); + + // Enchanted creature gets +0/+2. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(0,2, Duration.WhileOnBattlefield))); + } + + public RitualOfSteel(final RitualOfSteel card) { + super(card); + } + + @Override + public RitualOfSteel copy() { + return new RitualOfSteel(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirage/SapphireCharm.java b/Mage.Sets/src/mage/sets/mirage/SapphireCharm.java new file mode 100644 index 0000000000..187e8399b5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/SapphireCharm.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.mirage; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.DrawCardTargetEffect; +import mage.abilities.effects.common.PhaseOutTargetEffect; +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.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.TargetPlayer; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class SapphireCharm extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public SapphireCharm(UUID ownerId) { + super(ownerId, 89, "Sapphire Charm", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}"); + this.expansionSetCode = "MIR"; + + // Choose one - Target player draws a card at the beginning of the next turn's upkeep; + Effect effect = new DrawCardTargetEffect(1); + effect.setText("Target player draws a card"); + this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect( + new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(effect), true)); + this.getSpellAbility().addTarget(new TargetPlayer()); + + // or target creature gains flying until end of turn; + Mode mode = new Mode(); + mode.getEffects().add(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn)); + mode.getTargets().add(new TargetCreaturePermanent()); + this.getSpellAbility().addMode(mode); + + // or target creature an opponent controls phases out. + mode = new Mode(); + mode.getEffects().add(new PhaseOutTargetEffect()); + mode.getTargets().add(new TargetCreaturePermanent(filter)); + this.getSpellAbility().addMode(mode); + } + + public SapphireCharm(final SapphireCharm card) { + super(card); + } + + @Override + public SapphireCharm copy() { + return new SapphireCharm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirage/Shimmer.java b/Mage.Sets/src/mage/sets/mirage/Shimmer.java new file mode 100644 index 0000000000..0f17fa2768 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/Shimmer.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.mirage; + +import java.util.UUID; +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.ChooseLandTypeEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.PhasingAbility; +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.FilterLandPermanent; +import mage.filter.predicate.mageobject.ChosenSubtypePredicate; + +/** + * + * @author fireshoes + */ +public class Shimmer extends CardImpl { + + public Shimmer(UUID ownerId) { + super(ownerId, 92, "Shimmer", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{U}"); + this.expansionSetCode = "MIR"; + + // As Shimmer enters the battlefield, choose a land type. + this.addAbility(new AsEntersBattlefieldAbility(new ChooseLandTypeEffect(Outcome.Detriment))); + + // Each land of the chosen type has phasing. + FilterLandPermanent filter = new FilterLandPermanent("Each land of the chosen type"); + filter.add(new ChosenSubtypePredicate(this.getId())); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(PhasingAbility.getInstance(), Duration.WhileOnBattlefield, filter, false))); + } + + public Shimmer(final Shimmer card) { + super(card); + } + + @Override + public Shimmer copy() { + return new Shimmer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirage/Taniwha.java b/Mage.Sets/src/mage/sets/mirage/Taniwha.java index 15b0e0426f..ca2154c502 100644 --- a/Mage.Sets/src/mage/sets/mirage/Taniwha.java +++ b/Mage.Sets/src/mage/sets/mirage/Taniwha.java @@ -51,7 +51,7 @@ import mage.players.Player; public class Taniwha extends CardImpl { public Taniwha(UUID ownerId) { - super(ownerId, 95, "Taniwha", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{U}"); + super(ownerId, 95, "Taniwha", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); this.expansionSetCode = "MIR"; this.supertype.add("Legendary"); this.subtype.add("Serpent"); diff --git a/Mage.Sets/src/mage/sets/mirage/TeferisCurse.java b/Mage.Sets/src/mage/sets/mirage/TeferisCurse.java new file mode 100644 index 0000000000..340d1172f0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/TeferisCurse.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.mirage; + +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.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.PhasingAbility; +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.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.TargetPermanent; + +/** + * + * @author fireshoes + */ +public class TeferisCurse extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("artifact or creature"); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.CREATURE), + new CardTypePredicate(CardType.ARTIFACT))); + } + + public TeferisCurse(UUID ownerId) { + super(ownerId, 96, "Teferi's Curse", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); + this.expansionSetCode = "MIR"; + this.subtype.add("Aura"); + + // Enchant artifact or creature + TargetPermanent auraTarget = new TargetPermanent(filter); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted permanent has phasing. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(PhasingAbility.getInstance(), AttachmentType.AURA))); + } + + public TeferisCurse(final TeferisCurse card) { + super(card); + } + + @Override + public TeferisCurse copy() { + return new TeferisCurse(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirage/VaporousDjinn.java b/Mage.Sets/src/mage/sets/mirage/VaporousDjinn.java new file mode 100644 index 0000000000..5d26403579 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/VaporousDjinn.java @@ -0,0 +1,109 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those 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.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class VaporousDjinn extends CardImpl { + + public VaporousDjinn(UUID ownerId) { + super(ownerId, 101, "Vaporous Djinn", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); + this.expansionSetCode = "MIR"; + this.subtype.add("Djinn"); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // At the beginning of your upkeep, Vaporous Djinn phases out unless you pay {U}{U}. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new VaporousDjinnEffect(), TargetController.YOU, false)); + } + + public VaporousDjinn(final VaporousDjinn card) { + super(card); + } + + @Override + public VaporousDjinn copy() { + return new VaporousDjinn(this); + } +} + +class VaporousDjinnEffect extends OneShotEffect { + + public VaporousDjinnEffect() { + super(Outcome.Damage); + this.staticText = "{this} phases out unless you pay {U}{U}"; + } + + public VaporousDjinnEffect(final VaporousDjinnEffect effect) { + super(effect); + } + + @Override + public VaporousDjinnEffect copy() { + return new VaporousDjinnEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Cost cost = new ManaCostsImpl("{U}{U}"); + String message = "Would you like to pay {U}{U} to prevent {this} from phasing out?"; + if (!(controller.chooseUse(Outcome.Benefit, message, source, game) + && cost.pay(source, game, source.getSourceId(), controller.getId(), false))) { + permanent.phaseOut(game); + } + return true; + } + return false; + } + +} diff --git a/Mage.Sets/src/mage/sets/mirage/WindreaperFalcon.java b/Mage.Sets/src/mage/sets/mirage/WindreaperFalcon.java new file mode 100644 index 0000000000..cc3c7df595 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/WindreaperFalcon.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.mirage; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; +/** + * + * @author LoneFox + */ +public class WindreaperFalcon extends CardImpl { + + private static final FilterCard filter = new FilterCard("blue"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLUE)); + } + + public WindreaperFalcon(UUID ownerId) { + super(ownerId, 349, "Windreaper Falcon", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{R}{G}"); + this.expansionSetCode = "MIR"; + this.subtype.add("Bird"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // protection from blue + this.addAbility(new ProtectionAbility(filter)); + } + + public WindreaperFalcon(final WindreaperFalcon card) { + super(card); + } + + @Override + public WindreaperFalcon copy() { + return new WindreaperFalcon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirrodin/ChaliceOfTheVoid.java b/Mage.Sets/src/mage/sets/mirrodin/ChaliceOfTheVoid.java index 9547ef0150..e36d852e5b 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/ChaliceOfTheVoid.java +++ b/Mage.Sets/src/mage/sets/mirrodin/ChaliceOfTheVoid.java @@ -74,8 +74,8 @@ public class ChaliceOfTheVoid extends CardImpl { } } - class ChaliceOfTheVoidEffect extends OneShotEffect { + public ChaliceOfTheVoidEffect() { super(Outcome.Benefit); } @@ -89,9 +89,8 @@ class ChaliceOfTheVoidEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { - // delete to prevent using it again if put into battlefield from other effect - setValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY, null); + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { int amount = ((SpellAbility) obj).getManaCostsToPay().getX(); if (amount > 0) { permanent.addCounters(CounterType.CHARGE.createInstance(amount), game); @@ -108,13 +107,11 @@ class ChaliceOfTheVoidEffect extends OneShotEffect { } class ChaliceOfTheVoidTriggeredAbility extends TriggeredAbilityImpl { - public ChaliceOfTheVoidTriggeredAbility() { super(Zone.BATTLEFIELD, new CounterEffect()); } - public ChaliceOfTheVoidTriggeredAbility(final ChaliceOfTheVoidTriggeredAbility abiltity) { super(abiltity); } @@ -128,12 +125,12 @@ class ChaliceOfTheVoidTriggeredAbility extends TriggeredAbilityImpl { public boolean checkEventType(GameEvent event, Game game) { return event.getType() == GameEvent.EventType.SPELL_CAST; } - + @java.lang.Override public boolean checkTrigger(GameEvent event, Game game) { Permanent chalice = game.getPermanent(getSourceId()); Spell spell = game.getStack().getSpell(event.getTargetId()); - if(spell != null && chalice != null && spell.getConvertedManaCost() == chalice.getCounters().getCount(CounterType.CHARGE)){ + if (spell != null && chalice != null && spell.getConvertedManaCost() == chalice.getCounters().getCount(CounterType.CHARGE)) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(event.getTargetId())); } @@ -148,7 +145,6 @@ class ChaliceOfTheVoidTriggeredAbility extends TriggeredAbilityImpl { } } - class CounterEffect extends OneShotEffect { public CounterEffect() { diff --git a/Mage.Sets/src/mage/sets/mirrodin/GridMonitor.java b/Mage.Sets/src/mage/sets/mirrodin/GridMonitor.java new file mode 100644 index 0000000000..7ef1888e8c --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirrodin/GridMonitor.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.mirrodin; + +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.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; + +/** + * + * @author fireshoes + */ +public class GridMonitor extends CardImpl { + + public GridMonitor(UUID ownerId) { + super(ownerId, 183, "Grid Monitor", Rarity.RARE, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + this.expansionSetCode = "MRD"; + this.subtype.add("Construct"); + this.power = new MageInt(4); + this.toughness = new MageInt(6); + + // You can't cast creature spells. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GridMonitorEffect())); + } + + public GridMonitor(final GridMonitor card) { + super(card); + } + + @java.lang.Override + public GridMonitor copy() { + return new GridMonitor(this); + } +} + +class GridMonitorEffect extends ContinuousRuleModifyingEffectImpl { + + public GridMonitorEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment); + staticText = "You can't cast creature spells"; + } + + public GridMonitorEffect(final GridMonitorEffect effect) { + super(effect); + } + + @java.lang.Override + public GridMonitorEffect copy() { + return new GridMonitorEffect(this); + } + + @java.lang.Override + public boolean apply(Game game, Ability source) { + return true; + } + + @java.lang.Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == GameEvent.EventType.CAST_SPELL && event.getPlayerId().equals(source.getControllerId())) { + MageObject object = game.getObject(event.getSourceId()); + if (object.getCardType().contains(CardType.CREATURE)) { + return true; + } + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/mirrodin/Leveler.java b/Mage.Sets/src/mage/sets/mirrodin/Leveler.java new file mode 100644 index 0000000000..e76e9b346e --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirrodin/Leveler.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.mirrodin; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +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.game.Game; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class Leveler extends CardImpl { + + public Leveler(UUID ownerId) { + super(ownerId, 195, "Leveler", Rarity.RARE, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}"); + this.expansionSetCode = "MRD"; + this.subtype.add("Juggernaut"); + this.power = new MageInt(10); + this.toughness = new MageInt(10); + + // When Leveler enters the battlefield, exile all cards from your library. + this.addAbility(new EntersBattlefieldTriggeredAbility(new LevelerExileLibraryEffect(), false)); + } + + public Leveler(final Leveler card) { + super(card); + } + + @java.lang.Override + public Leveler copy() { + return new Leveler(this); + } +} + +class LevelerExileLibraryEffect extends OneShotEffect { + + public LevelerExileLibraryEffect() { + super(Outcome.Exile); + staticText = "exile all cards from your library"; + } + + @java.lang.Override + public LevelerExileLibraryEffect copy() { + return new LevelerExileLibraryEffect(); + } + + @java.lang.Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int count = controller.getLibrary().size(); + Cards cards = new CardsImpl(); + cards.addAll(controller.getLibrary().getTopCards(game, count)); + controller.moveCards(cards, Zone.LIBRARY, Zone.EXILED, source, game); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/modernmasters2015/WorldheartPhoenix.java b/Mage.Sets/src/mage/sets/modernmasters2015/WorldheartPhoenix.java index b9ca13546a..3eb2340d63 100644 --- a/Mage.Sets/src/mage/sets/modernmasters2015/WorldheartPhoenix.java +++ b/Mage.Sets/src/mage/sets/modernmasters2015/WorldheartPhoenix.java @@ -65,10 +65,10 @@ public class WorldheartPhoenix extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // You may cast Worldheart Phoenix from your graveyard by paying {W}{U}{B}{R}{G} rather than paying its mana cost. + // You may cast Worldheart Phoenix from your graveyard by paying {W}{U}{B}{R}{G} rather than paying its mana cost. // If you do, it enters the battlefield with two +1/+1 counters on it. Ability ability = new SimpleStaticAbility(Zone.ALL, new WorldheartPhoenixPlayEffect()); - ability.addEffect(new EntersBattlefieldEffect(new WorldheartPhoenixEntersBattlefieldEffect(), + ability.addEffect(new EntersBattlefieldEffect(new WorldheartPhoenixEntersBattlefieldEffect(), "If you do, it enters the battlefield with two +1/+1 counters on it")); this.addAbility(ability); @@ -137,7 +137,8 @@ public class WorldheartPhoenix extends CardImpl { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { // TODO: No perfect solution because there could be other effects that allow to cast the card for this mana cost if (((SpellAbility) obj).getManaCosts().getText().equals("{W}{U}{B}{R}{G}")) { permanent.addCounters(CounterType.P1P1.createInstance(2), game); diff --git a/Mage.Sets/src/mage/sets/morningtide/SagesDousing.java b/Mage.Sets/src/mage/sets/morningtide/SagesDousing.java new file mode 100644 index 0000000000..d6c235a11f --- /dev/null +++ b/Mage.Sets/src/mage/sets/morningtide/SagesDousing.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.morningtide; + +import java.util.UUID; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.CounterUnlessPaysEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.TargetSpell; + +/** + * + * @author fireshoes + */ +public class SagesDousing extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Wizard"); + + static { + filter.add(new SubtypePredicate("Wizard")); + } + + public SagesDousing(UUID ownerId) { + super(ownerId, 48, "Sage's Dousing", Rarity.UNCOMMON, new CardType[]{CardType.TRIBAL, CardType.INSTANT}, "{2}{U}"); + this.expansionSetCode = "MOR"; + this.subtype.add("Wizard"); + + // Counter target spell unless its controller pays {3}. + this.getSpellAbility().addTarget(new TargetSpell()); + this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new GenericManaCost(3))); + + // If you control a Wizard, draw a card. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(1), + new PermanentsOnTheBattlefieldCondition(filter),"If you control a Wizard, draw a card")); + } + + public SagesDousing(final SagesDousing card) { + super(card); + } + + @Override + public SagesDousing copy() { + return new SagesDousing(this); + } +} diff --git a/Mage.Sets/src/mage/sets/morningtide/StreamOfUnconsciousness.java b/Mage.Sets/src/mage/sets/morningtide/StreamOfUnconsciousness.java new file mode 100644 index 0000000000..dceb753b77 --- /dev/null +++ b/Mage.Sets/src/mage/sets/morningtide/StreamOfUnconsciousness.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.morningtide; + +import java.util.UUID; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +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.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class StreamOfUnconsciousness extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Wizard"); + + static { + filter.add(new SubtypePredicate("Wizard")); + } + + public StreamOfUnconsciousness(UUID ownerId) { + super(ownerId, 52, "Stream of Unconsciousness", Rarity.COMMON, new CardType[]{CardType.TRIBAL, CardType.INSTANT}, "{U}"); + this.expansionSetCode = "MOR"; + this.subtype.add("Wizard"); + + // Target creature gets -4/-0 until end of turn. + this.getSpellAbility().addEffect(new BoostTargetEffect(-4, 0, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // If you control a Wizard, draw a card. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(1), + new PermanentsOnTheBattlefieldCondition(filter),"If you control a Wizard, draw a card")); + } + + public StreamOfUnconsciousness(final StreamOfUnconsciousness card) { + super(card); + } + + @Override + public StreamOfUnconsciousness copy() { + return new StreamOfUnconsciousness(this); + } +} diff --git a/Mage.Sets/src/mage/sets/nemesis/AncientHydra.java b/Mage.Sets/src/mage/sets/nemesis/AncientHydra.java new file mode 100644 index 0000000000..a9ea30a997 --- /dev/null +++ b/Mage.Sets/src/mage/sets/nemesis/AncientHydra.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.nemesis; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.FadingAbility; +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; + +/** + * + * @author LoneFox + */ +public class AncientHydra extends CardImpl { + + public AncientHydra(UUID ownerId) { + super(ownerId, 76, "Ancient Hydra", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{R}"); + this.expansionSetCode = "NMS"; + this.subtype.add("Hydra"); + this.power = new MageInt(5); + this.toughness = new MageInt(1); + + // Fading 5 + this.addAbility(new FadingAbility(5, this)); + // {1}, Remove a fade counter from Ancient Hydra: Ancient Hydra deals 1 damage to target creature or player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}")); + ability.addCost(new RemoveCountersSourceCost(CounterType.FADE.createInstance(1))); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public AncientHydra(final AncientHydra card) { + super(card); + } + + @Override + public AncientHydra copy() { + return new AncientHydra(this); + } +} diff --git a/Mage.Sets/src/mage/sets/nemesis/BattlefieldPercher.java b/Mage.Sets/src/mage/sets/nemesis/BattlefieldPercher.java new file mode 100644 index 0000000000..7d4698c545 --- /dev/null +++ b/Mage.Sets/src/mage/sets/nemesis/BattlefieldPercher.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.nemesis; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.CanBlockOnlyFlyingAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +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.constants.Zone; + +/** + * + * @author LoneFox + */ +public class BattlefieldPercher extends CardImpl { + + public BattlefieldPercher(UUID ownerId) { + super(ownerId, 52, "Battlefield Percher", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + this.expansionSetCode = "NMS"; + this.subtype.add("Bird"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Battlefield Percher can block only creatures with flying. + this.addAbility(new CanBlockOnlyFlyingAbility()); + // {1}{B}: Battlefield Percher gets +1/+1 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), + new ManaCostsImpl("{1}{B}"))); + } + + public BattlefieldPercher(final BattlefieldPercher card) { + super(card); + } + + @Override + public BattlefieldPercher copy() { + return new BattlefieldPercher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/nemesis/BelbesPercher.java b/Mage.Sets/src/mage/sets/nemesis/BelbesPercher.java new file mode 100644 index 0000000000..cf18440b8f --- /dev/null +++ b/Mage.Sets/src/mage/sets/nemesis/BelbesPercher.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.nemesis; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.CanBlockOnlyFlyingAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class BelbesPercher extends CardImpl { + + public BelbesPercher(UUID ownerId) { + super(ownerId, 53, "Belbe's Percher", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "NMS"; + this.subtype.add("Bird"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Belbe's Percher can block only creatures with flying. + this.addAbility(new CanBlockOnlyFlyingAbility()); + } + + public BelbesPercher(final BelbesPercher card) { + super(card); + } + + @Override + public BelbesPercher copy() { + return new BelbesPercher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/nemesis/FlowstoneCrusher.java b/Mage.Sets/src/mage/sets/nemesis/FlowstoneCrusher.java new file mode 100644 index 0000000000..6c85d1c1a3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/nemesis/FlowstoneCrusher.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.nemesis; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class FlowstoneCrusher extends mage.sets.ninthedition.FlowstoneCrusher { + + public FlowstoneCrusher(UUID ownerId) { + super(ownerId); + this.cardNumber = 81; + this.expansionSetCode = "NMS"; + this.rarity = Rarity.COMMON; + } + + public FlowstoneCrusher(final FlowstoneCrusher card) { + super(card); + } + + @Override + public FlowstoneCrusher copy() { + return new FlowstoneCrusher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/nemesis/Oraxid.java b/Mage.Sets/src/mage/sets/nemesis/Oraxid.java new file mode 100644 index 0000000000..137056a5cb --- /dev/null +++ b/Mage.Sets/src/mage/sets/nemesis/Oraxid.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.nemesis; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author LoneFox + */ +public class Oraxid extends CardImpl { + + private static final FilterCard filter = new FilterCard("red"); + + static { + filter.add(new ColorPredicate(ObjectColor.RED)); + } + + public Oraxid(UUID ownerId) { + super(ownerId, 35, "Oraxid", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "NMS"; + this.subtype.add("Crab"); + this.subtype.add("Beast"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Protection from red + this.addAbility(new ProtectionAbility(filter)); + } + + public Oraxid(final Oraxid card) { + super(card); + } + + @Override + public Oraxid copy() { + return new Oraxid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/nemesis/StrongholdZeppelin.java b/Mage.Sets/src/mage/sets/nemesis/StrongholdZeppelin.java new file mode 100644 index 0000000000..8d15644b66 --- /dev/null +++ b/Mage.Sets/src/mage/sets/nemesis/StrongholdZeppelin.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.nemesis; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.CanBlockOnlyFlyingAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class StrongholdZeppelin extends CardImpl { + + public StrongholdZeppelin(UUID ownerId) { + super(ownerId, 47, "Stronghold Zeppelin", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); + this.expansionSetCode = "NMS"; + this.subtype.add("Human"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Stronghold Zeppelin can block only creatures with flying. + this.addAbility(new CanBlockOnlyFlyingAbility()); + } + + public StrongholdZeppelin(final StrongholdZeppelin card) { + super(card); + } + + @Override + public StrongholdZeppelin copy() { + return new StrongholdZeppelin(this); + } +} diff --git a/Mage.Sets/src/mage/sets/nemesis/VoiceOfTruth.java b/Mage.Sets/src/mage/sets/nemesis/VoiceOfTruth.java new file mode 100644 index 0000000000..fc9f0e3797 --- /dev/null +++ b/Mage.Sets/src/mage/sets/nemesis/VoiceOfTruth.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.nemesis; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; +/** + * + * @author LoneFox + */ +public class VoiceOfTruth extends CardImpl { + + private static final FilterCard filter = new FilterCard("white"); + + static { + filter.add(new ColorPredicate(ObjectColor.WHITE)); + } + + public VoiceOfTruth(UUID ownerId) { + super(ownerId, 25, "Voice of Truth", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "NMS"; + this.subtype.add("Angel"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // protection from white + this.addAbility(new ProtectionAbility(filter)); + } + + public VoiceOfTruth(final VoiceOfTruth card) { + super(card); + } + + @Override + public VoiceOfTruth copy() { + return new VoiceOfTruth(this); + } +} diff --git a/Mage.Sets/src/mage/sets/newphyrexia/PraetorsGrasp.java b/Mage.Sets/src/mage/sets/newphyrexia/PraetorsGrasp.java index de9c500e10..f101663e2b 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/PraetorsGrasp.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/PraetorsGrasp.java @@ -34,8 +34,6 @@ import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; import mage.cards.CardImpl; -import mage.cards.Cards; -import mage.cards.CardsImpl; import mage.constants.AsThoughEffectType; import mage.constants.CardType; import mage.constants.Duration; @@ -167,7 +165,7 @@ class PraetorsGraspRevealEffect extends AsThoughEffectImpl { private final UUID cardId; public PraetorsGraspRevealEffect(UUID cardId) { - super(AsThoughEffectType.REVEAL_FACE_DOWN, Duration.EndOfGame, Outcome.Benefit); + super(AsThoughEffectType.LOOK_AT_FACE_DOWN, Duration.EndOfGame, Outcome.Benefit); this.cardId = cardId; staticText = "You may look at and play that card for as long as it remains exiled"; } @@ -198,10 +196,7 @@ class PraetorsGraspRevealEffect extends AsThoughEffectImpl { Player controller = game.getPlayer(source.getControllerId()); Card card = game.getCard(cardId); if (controller != null && card != null && game.getState().getZone(cardId) == Zone.EXILED) { - if (controller.chooseUse(outcome, "Reveal exiled card?", source, game)) { - Cards cards = new CardsImpl(card); - controller.lookAtCards("Exiled with " + sourceObject.getIdName(), cards, game); - } + return true; } } else { discard(); diff --git a/Mage.Sets/src/mage/sets/newphyrexia/Spellskite.java b/Mage.Sets/src/mage/sets/newphyrexia/Spellskite.java index 6c6db8f49c..ba7b8ebc63 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/Spellskite.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/Spellskite.java @@ -93,20 +93,23 @@ class SpellskiteEffect extends OneShotEffect { StackObject stackObject = game.getStack().getStackObject(source.getFirstTarget()); MageObject sourceObject = game.getObject(source.getSourceId()); if (stackObject != null && sourceObject != null) { - Targets targets; + Targets targets = new Targets(); Ability sourceAbility; MageObject oldTarget = null; if (stackObject instanceof Spell) { - Spell spell = (Spell)stackObject; + Spell spell = (Spell) stackObject; sourceAbility = spell.getSpellAbility(); - targets = spell.getSpellAbility().getTargets(); } else if (stackObject instanceof StackAbility) { - StackAbility stackAbility = (StackAbility)stackObject; + StackAbility stackAbility = (StackAbility) stackObject; sourceAbility = stackAbility; - targets = stackAbility.getTargets(); } else { return false; } + for (UUID modeId : sourceAbility.getModes().getSelectedModes()) { + sourceAbility.getModes().setActiveMode(modeId); + targets.addAll(sourceAbility.getTargets()); + } + boolean twoTimesTarget = false; if (targets.size() == 1 && targets.get(0).getTargets().size() == 1) { Target target = targets.get(0); @@ -115,25 +118,25 @@ class SpellskiteEffect extends OneShotEffect { target.clearChosen(); // The source is still the spell on the stack target.addTarget(source.getSourceId(), stackObject.getStackAbility(), game); - } + } } else { Player player = game.getPlayer(source.getControllerId()); - for (Target target: targets) { - for (UUID targetId: target.getTargets()) { + for (Target target : targets) { + for (UUID targetId : target.getTargets()) { MageObject object = game.getObject(targetId); String name; if (object == null) { Player targetPlayer = game.getPlayer(targetId); name = targetPlayer.getLogName(); } else { - name = object.getName(); + name = object.getLogName(); } if (!targetId.equals(source.getSourceId()) && target.getTargets().contains(source.getSourceId())) { // you can't change this target to Spellskite because Spellskite is already another targetId of that target. twoTimesTarget = true; continue; } - if (name != null && player.chooseUse(Outcome.Neutral, new StringBuilder("Change target from ").append(name).append(" to ").append(sourceObject.getName()).append("?").toString(), source, game)) { + if (name != null && player.chooseUse(Outcome.Neutral, "Change target from " + name + " to " + sourceObject.getLogName() + "?", source, game)) { if (target.canTarget(stackObject.getControllerId(), source.getSourceId(), sourceAbility, game)) { oldTarget = game.getObject(targets.getFirstTarget()); target.remove(targetId); @@ -146,12 +149,12 @@ class SpellskiteEffect extends OneShotEffect { } } if (oldTarget != null) { - game.informPlayers(sourceObject.getLogName() + ": Changed target of " +stackObject.getLogName() + " from " + oldTarget.getLogName() + " to " + sourceObject.getLogName()); + game.informPlayers(sourceObject.getLogName() + ": Changed target of " + stackObject.getLogName() + " from " + oldTarget.getLogName() + " to " + sourceObject.getLogName()); } else { if (twoTimesTarget) { - game.informPlayers(sourceObject.getLogName() + ": Target not changed to " + sourceObject.getLogName() + " because its not valid to target it twice for " + stackObject.getName()); + game.informPlayers(sourceObject.getLogName() + ": Target not changed to " + sourceObject.getLogName() + " because its not valid to target it twice for " + stackObject.getLogName()); } else { - game.informPlayers(sourceObject.getLogName() + ": Target not changed to " + sourceObject.getLogName() + " because its no valid target for " + stackObject.getName()); + game.informPlayers(sourceObject.getLogName() + ": Target not changed to " + sourceObject.getLogName() + " because its no valid target for " + stackObject.getLogName()); } } return true; diff --git a/Mage.Sets/src/mage/sets/ninthedition/FlowstoneCrusher.java b/Mage.Sets/src/mage/sets/ninthedition/FlowstoneCrusher.java new file mode 100644 index 0000000000..d05061444b --- /dev/null +++ b/Mage.Sets/src/mage/sets/ninthedition/FlowstoneCrusher.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.ninthedition; + +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 LoneFox + */ +public class FlowstoneCrusher extends CardImpl { + + public FlowstoneCrusher(UUID ownerId) { + super(ownerId, 184, "Flowstone Crusher", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); + this.expansionSetCode = "9ED"; + this.subtype.add("Beast"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // {R}: Flowstone Crusher gets +1/-1 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + new BoostSourceEffect(1, -1, Duration.EndOfTurn), new ManaCostsImpl("{R}"))); + } + + public FlowstoneCrusher(final FlowstoneCrusher card) { + super(card); + } + + @Override + public FlowstoneCrusher copy() { + return new FlowstoneCrusher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ninthedition/FlowstoneShambler.java b/Mage.Sets/src/mage/sets/ninthedition/FlowstoneShambler.java new file mode 100644 index 0000000000..4ec8d5747a --- /dev/null +++ b/Mage.Sets/src/mage/sets/ninthedition/FlowstoneShambler.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.ninthedition; + +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 LoneFox + */ +public class FlowstoneShambler extends CardImpl { + + public FlowstoneShambler(UUID ownerId) { + super(ownerId, 185, "Flowstone Shambler", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "9ED"; + this.subtype.add("Beast"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {R}: Flowstone Shambler gets +1/-1 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + new BoostSourceEffect(1, -1, Duration.EndOfTurn), new ManaCostsImpl("{R}"))); + } + + public FlowstoneShambler(final FlowstoneShambler card) { + super(card); + } + + @Override + public FlowstoneShambler copy() { + return new FlowstoneShambler(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ninthedition/HorrorOfHorrors.java b/Mage.Sets/src/mage/sets/ninthedition/HorrorOfHorrors.java new file mode 100644 index 0000000000..5f229c7da1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ninthedition/HorrorOfHorrors.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.ninthedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class HorrorOfHorrors extends mage.sets.legends.HorrorOfHorrors { + + public HorrorOfHorrors(UUID ownerId) { + super(ownerId); + this.cardNumber = 140; + this.expansionSetCode = "9ED"; + } + + public HorrorOfHorrors(final HorrorOfHorrors card) { + super(card); + } + + @Override + public HorrorOfHorrors copy() { + return new HorrorOfHorrors(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ninthedition/ImaginaryPet.java b/Mage.Sets/src/mage/sets/ninthedition/ImaginaryPet.java new file mode 100644 index 0000000000..cbc264edc8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ninthedition/ImaginaryPet.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.ninthedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class ImaginaryPet extends mage.sets.urzassaga.ImaginaryPet { + + public ImaginaryPet(UUID ownerId) { + super(ownerId); + this.cardNumber = 82; + this.expansionSetCode = "9ED"; + } + + public ImaginaryPet(final ImaginaryPet card) { + super(card); + } + + @Override + public ImaginaryPet copy() { + return new ImaginaryPet(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ninthedition/Inspirit.java b/Mage.Sets/src/mage/sets/ninthedition/Inspirit.java new file mode 100644 index 0000000000..12112f59e1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ninthedition/Inspirit.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.ninthedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class Inspirit extends mage.sets.onslaught.Inspirit { + + public Inspirit(UUID ownerId) { + super(ownerId); + this.cardNumber = 22; + this.expansionSetCode = "9ED"; + } + + public Inspirit(final Inspirit card) { + super(card); + } + + @Override + public Inspirit copy() { + return new Inspirit(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ninthedition/MarbleTitan.java b/Mage.Sets/src/mage/sets/ninthedition/MarbleTitan.java new file mode 100644 index 0000000000..61d49319d2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ninthedition/MarbleTitan.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.ninthedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class MarbleTitan extends mage.sets.tempest.MarbleTitan { + + public MarbleTitan(UUID ownerId) { + super(ownerId); + this.cardNumber = 26; + this.expansionSetCode = "9ED"; + } + + public MarbleTitan(final MarbleTitan card) { + super(card); + } + + @Override + public MarbleTitan copy() { + return new MarbleTitan(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ninthedition/SageAven.java b/Mage.Sets/src/mage/sets/ninthedition/SageAven.java new file mode 100644 index 0000000000..c7a91f38e4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ninthedition/SageAven.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.ninthedition; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.LookLibraryControllerEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class SageAven extends CardImpl { + + public SageAven(UUID ownerId) { + super(ownerId, 95, "Sage Aven", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "9ED"; + this.subtype.add("Bird"); + this.subtype.add("Wizard"); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // When Sage Aven enters the battlefield, look at the top four cards of your library, then put them back in any order. + this.addAbility(new EntersBattlefieldTriggeredAbility(new LookLibraryControllerEffect(4))); + } + + public SageAven(final SageAven card) { + super(card); + } + + @Override + public SageAven copy() { + return new SageAven(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ninthedition/SanctumGuardian.java b/Mage.Sets/src/mage/sets/ninthedition/SanctumGuardian.java new file mode 100644 index 0000000000..938fc48205 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ninthedition/SanctumGuardian.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.ninthedition; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.common.PreventNextDamageFromChosenSourceToTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LoneFox + */ +public class SanctumGuardian extends CardImpl { + + public SanctumGuardian(UUID ownerId) { + super(ownerId, 40, "Sanctum Guardian", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{W}{W}"); + this.expansionSetCode = "9ED"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // Sacrifice Sanctum Guardian: The next time a source of your choice would deal damage to target creature or player this turn, prevent that damage. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventNextDamageFromChosenSourceToTargetEffect(Duration.EndOfTurn), + new SacrificeSourceCost()); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public SanctumGuardian(final SanctumGuardian card) { + super(card); + } + + @Override + public SanctumGuardian copy() { + return new SanctumGuardian(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ninthedition/TeferisPuzzleBox.java b/Mage.Sets/src/mage/sets/ninthedition/TeferisPuzzleBox.java index 636a1fe1ad..a62fe24a92 100644 --- a/Mage.Sets/src/mage/sets/ninthedition/TeferisPuzzleBox.java +++ b/Mage.Sets/src/mage/sets/ninthedition/TeferisPuzzleBox.java @@ -27,25 +27,22 @@ */ package mage.sets.ninthedition; -import mage.constants.*; +import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.BeginningOfDrawTriggeredAbility; import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; import mage.cards.CardImpl; -import mage.cards.Cards; -import mage.cards.CardsImpl; -import mage.filter.FilterCard; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; import mage.game.Game; import mage.players.Player; -import mage.target.TargetCard; - -import java.util.UUID; /** * * @author noxx - + * */ public class TeferisPuzzleBox extends CardImpl { @@ -87,30 +84,7 @@ class TeferisPuzzleBoxEffect extends OneShotEffect { Player player = game.getPlayer(targetPointer.getFirst(game, source)); if (player != null) { int count = player.getHand().size(); - - // puts the cards in his or her hand on the bottom of his or her library in any order - Cards cards = new CardsImpl(); - for (Card card : player.getHand().getCards(game)) { - cards.add(card.getId()); - } - - TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on the bottom of your library")); - while (player.canRespond() && cards.size() > 1) { - player.choose(Outcome.Neutral, cards, target, game); - Card card = cards.get(target.getFirstTarget(), game); - if (card != null) { - cards.remove(card); - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false); - } - target.clearChosen(); - } - if (cards.size() == 1) { - Card card = cards.get(cards.iterator().next(), game); - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false); - } - player.getHand().clear(); - - // draws that many cards + player.putCardsOnBottomOfLibrary(player.getHand(), game, source, true); player.drawCards(count, game); } return true; diff --git a/Mage.Sets/src/mage/sets/ninthedition/WhipSergeant.java b/Mage.Sets/src/mage/sets/ninthedition/WhipSergeant.java new file mode 100644 index 0000000000..9342c79098 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ninthedition/WhipSergeant.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.ninthedition; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class WhipSergeant extends mage.sets.prophecy.WhipSergeant { + + public WhipSergeant(UUID ownerId) { + super(ownerId); + this.cardNumber = 227; + this.expansionSetCode = "9ED"; + } + + public WhipSergeant(final WhipSergeant card) { + super(card); + } + + @Override + public WhipSergeant copy() { + return new WhipSergeant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/AscendingAven.java b/Mage.Sets/src/mage/sets/onslaught/AscendingAven.java new file mode 100644 index 0000000000..f0b1e28894 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/AscendingAven.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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.CanBlockOnlyFlyingAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class AscendingAven extends CardImpl { + + public AscendingAven(UUID ownerId) { + super(ownerId, 68, "Ascending Aven", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Bird"); + this.subtype.add("Soldier"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Ascending Aven can block only creatures with flying. + this.addAbility(new CanBlockOnlyFlyingAbility()); + // Morph {2}{U} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{U}"))); + } + + public AscendingAven(final AscendingAven card) { + super(card); + } + + @Override + public AscendingAven copy() { + return new AscendingAven(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/BatteringCraghorn.java b/Mage.Sets/src/mage/sets/onslaught/BatteringCraghorn.java new file mode 100644 index 0000000000..482ff2d529 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/BatteringCraghorn.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.onslaught; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class BatteringCraghorn extends mage.sets.archenemy.BatteringCraghorn { + + public BatteringCraghorn(UUID ownerId) { + super(ownerId); + this.cardNumber = 188; + this.expansionSetCode = "ONS"; + } + + public BatteringCraghorn(final BatteringCraghorn card) { + super(card); + } + + @Override + public BatteringCraghorn copy() { + return new BatteringCraghorn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/Complicate.java b/Mage.Sets/src/mage/sets/onslaught/Complicate.java index 29e679a624..3d5023a586 100644 --- a/Mage.Sets/src/mage/sets/onslaught/Complicate.java +++ b/Mage.Sets/src/mage/sets/onslaught/Complicate.java @@ -52,12 +52,12 @@ public class Complicate extends CardImpl { // Counter target spell unless its controller pays {3}. this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new GenericManaCost(3))); this.getSpellAbility().addTarget(new TargetSpell()); - + // Cycling {2}{U} this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{2}{U}"))); - + // When you cycle Complicate, you may counter target spell unless its controller pays {1}. - Ability ability = new CycleTriggeredAbility(new CounterUnlessPaysEffect(new GenericManaCost(1))); + Ability ability = new CycleTriggeredAbility(new CounterUnlessPaysEffect(new GenericManaCost(1)), true); ability.addTarget(new TargetSpell()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/onslaught/CrudeRampart.java b/Mage.Sets/src/mage/sets/onslaught/CrudeRampart.java new file mode 100644 index 0000000000..5bda4d9b29 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/CrudeRampart.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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.DefenderAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class CrudeRampart extends CardImpl { + + public CrudeRampart(UUID ownerId) { + super(ownerId, 17, "Crude Rampart", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Wall"); + this.power = new MageInt(4); + this.toughness = new MageInt(5); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + // Morph {4}{W} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{4}{W}"))); + } + + public CrudeRampart(final CrudeRampart card) { + super(card); + } + + @Override + public CrudeRampart copy() { + return new CrudeRampart(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/DaruLancer.java b/Mage.Sets/src/mage/sets/onslaught/DaruLancer.java new file mode 100644 index 0000000000..a0ede3c08c --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/DaruLancer.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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class DaruLancer extends CardImpl { + + public DaruLancer(UUID ownerId) { + super(ownerId, 20, "Daru Lancer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{W}{W}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + // Morph {2}{W}{W} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{W}{W}"))); + } + + public DaruLancer(final DaruLancer card) { + super(card); + } + + @Override + public DaruLancer copy() { + return new DaruLancer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/DeathPulse.java b/Mage.Sets/src/mage/sets/onslaught/DeathPulse.java index be0c44a8f8..0cf9e25b03 100644 --- a/Mage.Sets/src/mage/sets/onslaught/DeathPulse.java +++ b/Mage.Sets/src/mage/sets/onslaught/DeathPulse.java @@ -52,11 +52,11 @@ public class DeathPulse extends CardImpl { // Target creature gets -4/-4 until end of turn. this.getSpellAbility().addEffect(new BoostTargetEffect(-4, -4, Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - + // Cycling {1}{B}{B} this.addAbility(new CyclingAbility(new ManaCostsImpl("{1}{B}{B}"))); // When you cycle Death Pulse, you may have target creature get -1/-1 until end of turn. - Ability ability = new CycleTriggeredAbility(new BoostTargetEffect(-1, -1, Duration.EndOfTurn)); + Ability ability = new CycleTriggeredAbility(new BoostTargetEffect(-1, -1, Duration.EndOfTurn), true); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/onslaught/FallenCleric.java b/Mage.Sets/src/mage/sets/onslaught/FallenCleric.java new file mode 100644 index 0000000000..a4e9bbfa37 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/FallenCleric.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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.MorphAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author LoneFox + */ +public class FallenCleric extends CardImpl { + + private static final FilterCard filter = new FilterCard("Clerics"); + + static { + filter.add(new SubtypePredicate("Cleric")); + } + + public FallenCleric(UUID ownerId) { + super(ownerId, 145, "Fallen Cleric", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{B}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Zombie"); + this.subtype.add("Cleric"); + this.power = new MageInt(4); + this.toughness = new MageInt(2); + + // Protection from Clerics + this.addAbility(new ProtectionAbility(filter)); + // Morph {4}{B} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{4}{B}"))); + } + + public FallenCleric(final FallenCleric card) { + super(card); + } + + @Override + public FallenCleric copy() { + return new FallenCleric(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/FoothillGuide.java b/Mage.Sets/src/mage/sets/onslaught/FoothillGuide.java new file mode 100644 index 0000000000..18265611be --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/FoothillGuide.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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.MorphAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author LoneFox + */ +public class FoothillGuide extends CardImpl { + + private static final FilterCard filter = new FilterCard("Goblins"); + + static { + filter.add(new SubtypePredicate("Goblin")); + } + + public FoothillGuide(UUID ownerId) { + super(ownerId, 29, "Foothill Guide", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Protection from Goblins + this.addAbility(new ProtectionAbility(filter)); + // Morph {W} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{W}"))); + } + + public FoothillGuide(final FoothillGuide card) { + super(card); + } + + @Override + public FoothillGuide copy() { + return new FoothillGuide(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/GoblinBurrows.java b/Mage.Sets/src/mage/sets/onslaught/GoblinBurrows.java index c54781b82e..66bcc8033f 100644 --- a/Mage.Sets/src/mage/sets/onslaught/GoblinBurrows.java +++ b/Mage.Sets/src/mage/sets/onslaught/GoblinBurrows.java @@ -49,7 +49,7 @@ import mage.target.common.TargetCreaturePermanent; */ public class GoblinBurrows extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblin"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblin creature"); static { filter.add(new SubtypePredicate(("Goblin"))); diff --git a/Mage.Sets/src/mage/sets/onslaught/GrinningDemon.java b/Mage.Sets/src/mage/sets/onslaught/GrinningDemon.java new file mode 100644 index 0000000000..e11f608d74 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/GrinningDemon.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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; + +/** + * + * @author LoneFox + */ +public class GrinningDemon extends CardImpl { + + public GrinningDemon(UUID ownerId) { + super(ownerId, 153, "Grinning Demon", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Demon"); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // At the beginning of your upkeep, you lose 2 life. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new LoseLifeSourceControllerEffect(2), TargetController.YOU, false)); + // Morph {2}{B}{B} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{B}{B}"))); + } + + public GrinningDemon(final GrinningDemon card) { + super(card); + } + + @Override + public GrinningDemon copy() { + return new GrinningDemon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/Inspirit.java b/Mage.Sets/src/mage/sets/onslaught/Inspirit.java new file mode 100644 index 0000000000..fd26c17183 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/Inspirit.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.onslaught; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.UntapTargetEffect; +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 LoneFox + */ +public class Inspirit extends CardImpl { + + public Inspirit(UUID ownerId) { + super(ownerId, 41, "Inspirit", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{W}"); + this.expansionSetCode = "ONS"; + + // Untap target creature. It gets +2/+4 until end of turn. + this.getSpellAbility().addEffect(new UntapTargetEffect()); + Effect effect = new BoostTargetEffect(2, 4, Duration.EndOfTurn); + effect.setText("It gets +2/+4 until end of turn"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public Inspirit(final Inspirit card) { + super(card); + } + + @Override + public Inspirit copy() { + return new Inspirit(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/KrosanColossus.java b/Mage.Sets/src/mage/sets/onslaught/KrosanColossus.java new file mode 100644 index 0000000000..bc7d6f1918 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/KrosanColossus.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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class KrosanColossus extends CardImpl { + + public KrosanColossus(UUID ownerId) { + super(ownerId, 270, "Krosan Colossus", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{6}{G}{G}{G}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Beast"); + this.power = new MageInt(9); + this.toughness = new MageInt(9); + + // Morph {6}{G}{G} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{6}{G}{G}"))); + } + + public KrosanColossus(final KrosanColossus card) { + super(card); + } + + @Override + public KrosanColossus copy() { + return new KrosanColossus(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/OversoldCemetery.java b/Mage.Sets/src/mage/sets/onslaught/OversoldCemetery.java new file mode 100644 index 0000000000..1f5ff6efbe --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/OversoldCemetery.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.onslaught; + +import java.util.UUID; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.condition.common.CardsInControllerGraveCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureCard; +import mage.target.common.TargetCardInGraveyard; + +/** + * + * @author fireshoes + */ +public class OversoldCemetery extends CardImpl { + + public OversoldCemetery(UUID ownerId) { + super(ownerId, 160, "Oversold Cemetery", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); + this.expansionSetCode = "ONS"; + + // At the beginning of your upkeep, if you have four or more creature cards in your graveyard, you may return target creature card from your graveyard to your hand. + TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToHandTargetEffect(), TargetController.YOU, true); + ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard())); + CardsInControllerGraveCondition condition = new CardsInControllerGraveCondition(4, new FilterCreatureCard("creature card from your graveyard")); + this.addAbility(new ConditionalTriggeredAbility(ability, condition, "At the beginning of your upkeep, if you have four or more creature cards in your graveyard, you may return target creature card from your graveyard to your hand.")); + } + + public OversoldCemetery(final OversoldCemetery card) { + super(card); + } + + @Override + public OversoldCemetery copy() { + return new OversoldCemetery(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/PrimalBoost.java b/Mage.Sets/src/mage/sets/onslaught/PrimalBoost.java new file mode 100644 index 0000000000..9d050f1fc2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/PrimalBoost.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.onslaught; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.CycleTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.keyword.CyclingAbility; +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 PrimalBoost extends CardImpl { + + public PrimalBoost(UUID ownerId) { + super(ownerId, 277, "Primal Boost", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{G}"); + this.expansionSetCode = "ONS"; + + // Target creature gets +4/+4 until end of turn. + this.getSpellAbility().addEffect(new BoostTargetEffect(4, 4, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + // Cycling {2}{G} + this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}{G}"))); + // When you cycle Primal Boost, you may have target creature get +1/+1 until end of turn. + Ability ability = new CycleTriggeredAbility(new BoostTargetEffect(1, 1, Duration.EndOfTurn), true); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public PrimalBoost(final PrimalBoost card) { + super(card); + } + + @Override + public PrimalBoost copy() { + return new PrimalBoost(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/RiptideBiologist.java b/Mage.Sets/src/mage/sets/onslaught/RiptideBiologist.java new file mode 100644 index 0000000000..dc469edda8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/RiptideBiologist.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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.MorphAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author LoneFox + */ +public class RiptideBiologist extends CardImpl { + + private static final FilterCard filter = new FilterCard("Beasts"); + + static { + filter.add(new SubtypePredicate("Beast")); + } + + public RiptideBiologist(UUID ownerId) { + super(ownerId, 106, "Riptide Biologist", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Protection from Beasts + this.addAbility(new ProtectionAbility(filter)); + // Morph {2}{U} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{U}"))); + } + + public RiptideBiologist(final RiptideBiologist card) { + super(card); + } + + @Override + public RiptideBiologist copy() { + return new RiptideBiologist(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/SageAven.java b/Mage.Sets/src/mage/sets/onslaught/SageAven.java new file mode 100644 index 0000000000..d1d40e34d7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/SageAven.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.onslaught; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class SageAven extends mage.sets.ninthedition.SageAven { + + public SageAven(UUID ownerId) { + super(ownerId); + this.cardNumber = 111; + this.expansionSetCode = "ONS"; + } + + public SageAven(final SageAven card) { + super(card); + } + + @Override + public SageAven copy() { + return new SageAven(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/SeasideHaven.java b/Mage.Sets/src/mage/sets/onslaught/SeasideHaven.java index 193ab18919..eaccc8185c 100644 --- a/Mage.Sets/src/mage/sets/onslaught/SeasideHaven.java +++ b/Mage.Sets/src/mage/sets/onslaught/SeasideHaven.java @@ -33,6 +33,7 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeTargetCost; 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; @@ -47,9 +48,9 @@ import mage.target.common.TargetControlledPermanent; * @author anonymous */ public class SeasideHaven extends CardImpl { - + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Bird"); - + static{ filter.add(new SubtypePredicate("Bird")); } @@ -61,7 +62,7 @@ public class SeasideHaven extends CardImpl { // {tap}: Add {1} to your mana pool. this.addAbility(new ColorlessManaAbility()); // {W}{U}, {tap}, Sacrifice a Bird: Draw a card. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, null, new ManaCostsImpl<>("{W}{U}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{W}{U}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/onslaught/SpinedBasher.java b/Mage.Sets/src/mage/sets/onslaught/SpinedBasher.java new file mode 100644 index 0000000000..fb63ab3944 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/SpinedBasher.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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class SpinedBasher extends CardImpl { + + public SpinedBasher(UUID ownerId) { + super(ownerId, 172, "Spined Basher", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Zombie"); + this.subtype.add("Beast"); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // Morph {2}{B} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{B}"))); + } + + public SpinedBasher(final SpinedBasher card) { + super(card); + } + + @Override + public SpinedBasher copy() { + return new SpinedBasher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/SpittingGourna.java b/Mage.Sets/src/mage/sets/onslaught/SpittingGourna.java new file mode 100644 index 0000000000..ce970c772e --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/SpittingGourna.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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.ReachAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class SpittingGourna extends CardImpl { + + public SpittingGourna(UUID ownerId) { + super(ownerId, 284, "Spitting Gourna", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Beast"); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Reach + this.addAbility(ReachAbility.getInstance()); + // Morph {4}{G} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{4}{G}"))); + } + + public SpittingGourna(final SpittingGourna card) { + super(card); + } + + @Override + public SpittingGourna copy() { + return new SpittingGourna(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/SunfireBalm.java b/Mage.Sets/src/mage/sets/onslaught/SunfireBalm.java new file mode 100644 index 0000000000..896fcdc29a --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/SunfireBalm.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.onslaught; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.CycleTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.PreventDamageToTargetEffect; +import mage.abilities.keyword.CyclingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LoneFox + */ +public class SunfireBalm extends CardImpl { + + public SunfireBalm(UUID ownerId) { + super(ownerId, 56, "Sunfire Balm", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{W}"); + this.expansionSetCode = "ONS"; + + // Prevent the next 4 damage that would be dealt to target creature or player this turn. + this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, 4)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + // Cycling {1}{W} + this.addAbility(new CyclingAbility(new ManaCostsImpl("{1}{W}"))); + // When you cycle Sunfire Balm, you may prevent the next 1 damage that would be dealt to target creature or player this turn. + Ability ability = new CycleTriggeredAbility(new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), true); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + + } + + public SunfireBalm(final SunfireBalm card) { + super(card); + } + + @Override + public SunfireBalm copy() { + return new SunfireBalm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/ThunderOfHooves.java b/Mage.Sets/src/mage/sets/onslaught/ThunderOfHooves.java new file mode 100644 index 0000000000..d5b051cb3a --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/ThunderOfHooves.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.onslaught; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.Effect; +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.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author fireshoes + */ +public class ThunderOfHooves extends CardImpl { + + private static final FilterCreaturePermanent filterNotFlying = new FilterCreaturePermanent(); + private static final FilterPermanent filterBeasts = new FilterPermanent(); + + static { + filterNotFlying.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); + filterBeasts.add(new SubtypePredicate("Beast")); + } + + public ThunderOfHooves(UUID ownerId) { + super(ownerId, 242, "Thunder of Hooves", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{R}"); + this.expansionSetCode = "ONS"; + + // Thunder of Hooves deals X damage to each creature without flying and each player, where X is the number of Beasts on the battlefield. + Effect effect = new DamageEverythingEffect(new PermanentsOnBattlefieldCount(new FilterPermanent(filterBeasts)), new FilterCreaturePermanent(filterNotFlying)); + effect.setText("{this} deals X damage to each creature, where X is the number of creatures on the battlefield"); + this.getSpellAbility().addEffect(effect); + } + + public ThunderOfHooves(final ThunderOfHooves card) { + super(card); + } + + @Override + public ThunderOfHooves copy() { + return new ThunderOfHooves(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/ToweringBaloth.java b/Mage.Sets/src/mage/sets/onslaught/ToweringBaloth.java new file mode 100644 index 0000000000..87b8eeab81 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/ToweringBaloth.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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ToweringBaloth extends CardImpl { + + public ToweringBaloth(UUID ownerId) { + super(ownerId, 292, "Towering Baloth", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{6}{G}{G}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Beast"); + this.power = new MageInt(7); + this.toughness = new MageInt(6); + + // Morph {6}{G} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{6}{G}"))); + } + + public ToweringBaloth(final ToweringBaloth card) { + super(card); + } + + @Override + public ToweringBaloth copy() { + return new ToweringBaloth(this); + } +} diff --git a/Mage.Sets/src/mage/sets/onslaught/TreespringLorian.java b/Mage.Sets/src/mage/sets/onslaught/TreespringLorian.java new file mode 100644 index 0000000000..40b9221b98 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/TreespringLorian.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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class TreespringLorian extends CardImpl { + + public TreespringLorian(UUID ownerId) { + super(ownerId, 293, "Treespring Lorian", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{5}{G}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Beast"); + this.power = new MageInt(5); + this.toughness = new MageInt(4); + + // Morph {5}{G} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{5}{G}"))); + } + + public TreespringLorian(final TreespringLorian card) { + super(card); + } + + @Override + public TreespringLorian copy() { + return new TreespringLorian(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planarchaos/BatteringSliver.java b/Mage.Sets/src/mage/sets/planarchaos/BatteringSliver.java index d52aa2499c..0f3880bf28 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/BatteringSliver.java +++ b/Mage.Sets/src/mage/sets/planarchaos/BatteringSliver.java @@ -46,7 +46,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class BatteringSliver extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("all Sliver creatures"); static { filter.add(new SubtypePredicate("Sliver")); diff --git a/Mage.Sets/src/mage/sets/planarchaos/Chronozoa.java b/Mage.Sets/src/mage/sets/planarchaos/Chronozoa.java index ce30729322..c3e250f828 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/Chronozoa.java +++ b/Mage.Sets/src/mage/sets/planarchaos/Chronozoa.java @@ -71,8 +71,8 @@ public class Chronozoa extends CardImpl { this.addAbility(new VanishingSacrificeAbility()); // When Chronozoa is put into a graveyard from play, if it had no time counters on it, put two tokens into play that are copies of it. this.addAbility(new ConditionalTriggeredAbility(new DiesCreatureTriggeredAbility(new CopyCardEffect(this, numCopies), false), - new LastTimeCounterRemovedCondition(), - "When {this} is put into a graveyard from play, if it had no time counters on it, put two tokens into play that are copies of it.")); + new LastTimeCounterRemovedCondition(), + "When {this} dies, if it had no time counters on it, put two tokens that are copies of it onto the battlefield.")); } public Chronozoa(final Chronozoa card) { diff --git a/Mage.Sets/src/mage/sets/planarchaos/DeadlyGrub.java b/Mage.Sets/src/mage/sets/planarchaos/DeadlyGrub.java new file mode 100644 index 0000000000..6b580ad132 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planarchaos/DeadlyGrub.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.planarchaos; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.condition.common.LastTimeCounterRemovedCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.ShroudAbility; +import mage.abilities.keyword.VanishingSacrificeAbility; +import mage.abilities.keyword.VanishingUpkeepAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; +import mage.game.permanent.token.Token; + +/** + * + * @author LoneFox + */ +public class DeadlyGrub extends CardImpl { + + public DeadlyGrub(UUID ownerId) { + super(ownerId, 69, "Deadly Grub", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "PLC"; + this.subtype.add("Insect"); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // Vanishing 3 + Ability ability = new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.TIME.createInstance(3))); + ability.setRuleVisible(false); + this.addAbility(ability); + this.addAbility(new VanishingUpkeepAbility(3)); + this.addAbility(new VanishingSacrificeAbility()); + // When Deadly Grub dies, if it had no time counters on it, put a 6/1 green Insect creature token with shroud onto the battlefield. + this.addAbility(new ConditionalTriggeredAbility(new DiesTriggeredAbility(new CreateTokenEffect(new DeadlyGrubToken(), 1)), + new LastTimeCounterRemovedCondition(), "When {this} dies, if it had no time counters on it, put a 6/1 green Insect creature token with shroud onto the battlefield.")); + } + + public DeadlyGrub(final DeadlyGrub card) { + super(card); + } + + @Override + public DeadlyGrub copy() { + return new DeadlyGrub(this); + } +} + +class DeadlyGrubToken extends Token { + DeadlyGrubToken() { + super("Insect", "6/1 green Insect creature token with shroud"); + cardType.add(CardType.CREATURE); + color.setGreen(true); + subtype.add("Insect"); + power = new MageInt(6); + toughness = new MageInt(1); + this.addAbility(ShroudAbility.getInstance()); + } +} diff --git a/Mage.Sets/src/mage/sets/planarchaos/DreamscapeArtist.java b/Mage.Sets/src/mage/sets/planarchaos/DreamscapeArtist.java index 14335e8ba6..00a1cea424 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/DreamscapeArtist.java +++ b/Mage.Sets/src/mage/sets/planarchaos/DreamscapeArtist.java @@ -63,12 +63,12 @@ public class DreamscapeArtist extends CardImpl { // {2}{U}, {tap}, Discard a card, Sacrifice a land: Search your library for up to two basic land cards and put them onto the battlefield. Then shuffle your library. TargetCardInLibrary target = new TargetCardInLibrary(0, 2, new FilterBasicLandCard()); Ability ability = new SimpleActivatedAbility( - Zone.BATTLEFIELD, - new SearchLibraryPutInPlayEffect(target, false, Outcome.PutLandInPlay), + Zone.BATTLEFIELD, + new SearchLibraryPutInPlayEffect(target, false, Outcome.PutLandInPlay), new ManaCostsImpl("{2}{U}")); ability.addCost(new TapSourceCost()); ability.addCost(new DiscardCardCost()); - ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("land")))); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land")))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/planarchaos/FatalFrenzy.java b/Mage.Sets/src/mage/sets/planarchaos/FatalFrenzy.java index 43ba60a904..0bbef4cfb3 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/FatalFrenzy.java +++ b/Mage.Sets/src/mage/sets/planarchaos/FatalFrenzy.java @@ -28,10 +28,6 @@ package mage.sets.planarchaos; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Rarity; import mage.abilities.Ability; import mage.abilities.DelayedTriggeredAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; @@ -43,7 +39,12 @@ 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.Outcome; +import mage.constants.Rarity; import mage.game.Game; +import mage.game.permanent.Permanent; import mage.target.common.TargetControlledCreaturePermanent; import mage.target.targetpointer.FixedTarget; @@ -57,7 +58,6 @@ public class FatalFrenzy extends CardImpl { super(ownerId, 98, "Fatal Frenzy", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{2}{R}"); this.expansionSetCode = "PLC"; - // Until end of turn, target creature you control gains trample and gets +X/+0, where X is its power. Sacrifice it at the beginning of the next end step. this.getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)); this.getSpellAbility().addEffect(new BoostTargetEffect(new TargetPermanentPowerCount(), new StaticValue(0), Duration.EndOfTurn, true)); @@ -94,13 +94,16 @@ class FatalFrenzyEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice this"); - sacrificeEffect.setTargetPointer(new FixedTarget(source.getFirstTarget())); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); + Permanent targetCreature = game.getPermanent(source.getFirstTarget()); + if (targetCreature != null) { + SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice this", source.getControllerId()); + sacrificeEffect.setTargetPointer(new FixedTarget(targetCreature, game)); + DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(game), game); + game.addDelayedTriggeredAbility(delayedAbility); + } return true; } } diff --git a/Mage.Sets/src/mage/sets/planarchaos/IntetTheDreamer.java b/Mage.Sets/src/mage/sets/planarchaos/IntetTheDreamer.java index 88d32915c3..d3107a9bfb 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/IntetTheDreamer.java +++ b/Mage.Sets/src/mage/sets/planarchaos/IntetTheDreamer.java @@ -27,21 +27,21 @@ */ package mage.sets.planarchaos; +import java.util.HashSet; +import java.util.Set; import java.util.UUID; import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.AsThoughEffectImpl; -import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DoIfCostPaid; import mage.abilities.keyword.FlyingAbility; import mage.cards.Card; import mage.cards.CardImpl; -import mage.cards.Cards; -import mage.cards.CardsImpl; import mage.constants.AsThoughEffectType; import mage.constants.CardType; import mage.constants.Duration; @@ -59,6 +59,8 @@ import mage.util.CardUtil; */ public class IntetTheDreamer extends CardImpl { + protected static final String VALUE_PREFIX = "ExileZones"; + public IntetTheDreamer(UUID ownerId) { super(ownerId, 158, "Intet, the Dreamer", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{U}{R}{G}"); this.expansionSetCode = "PLC"; @@ -72,9 +74,12 @@ public class IntetTheDreamer extends CardImpl { // Whenever Intet, the Dreamer deals combat damage to a player, you may pay {2}{U}. If you do, exile the top card of your library face down. this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility( new DoIfCostPaid(new IntetTheDreamerExileEffect(), new ManaCostsImpl("{2}{U}")), false, true)); - // You may look at that card for as long as it remains exiled. You may play that card without paying its mana cost for as long as Intet remains on the battlefield. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new IntetTheDreamerEffect())); + // You may look at that card for as long as it remains exiled. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new IntetTheDreamerLookEffect())); + // You may play that card without paying its mana cost for as long as Intet remains on the battlefield. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new IntetTheDreamerCastEffect())); } + public IntetTheDreamer(final IntetTheDreamer card) { super(card); } @@ -86,46 +91,53 @@ public class IntetTheDreamer extends CardImpl { } class IntetTheDreamerExileEffect extends OneShotEffect { - + public IntetTheDreamerExileEffect() { super(Outcome.Discard); staticText = "exile the top card of your library face down"; } - + public IntetTheDreamerExileEffect(final IntetTheDreamerExileEffect effect) { super(effect); } - + @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - if (player != null) { - Card card = player.getLibrary().getFromTop(game); - MageObject sourceObject = source.getSourceObject(game); - if (card != null && sourceObject != null) { - UUID exileZoneId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()); - player.moveCardToExileWithInfo(card, exileZoneId, sourceObject.getIdName(), source.getSourceId(), game, Zone.LIBRARY, false); - card.setFaceDown(true, game); - return true; - } - } - return false; + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Card card = controller.getLibrary().getFromTop(game); + MageObject sourceObject = source.getSourceObject(game); + if (card != null && sourceObject != null) { + UUID exileZoneId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()); + card.setFaceDown(true, game); + controller.moveCardsToExile(card, source, game, false, exileZoneId, sourceObject.getIdName()); + card.setFaceDown(true, game); + Set exileZones = (Set) game.getState().getValue(IntetTheDreamer.VALUE_PREFIX + source.getSourceId().toString()); + if (exileZones == null) { + exileZones = new HashSet<>(); + game.getState().setValue(IntetTheDreamer.VALUE_PREFIX + source.getSourceId().toString(), exileZones); + } + exileZones.add(exileZoneId); + return true; + } + } + return false; } - + @Override public IntetTheDreamerExileEffect copy() { return new IntetTheDreamerExileEffect(this); } } -class IntetTheDreamerEffect extends AsThoughEffectImpl { +class IntetTheDreamerCastEffect extends AsThoughEffectImpl { - public IntetTheDreamerEffect() { + public IntetTheDreamerCastEffect() { super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit); staticText = "You may play the card from exile without paying its mana cost for as long as {this} remains on the battlefield"; } - public IntetTheDreamerEffect(final IntetTheDreamerEffect effect) { + public IntetTheDreamerCastEffect(final IntetTheDreamerCastEffect effect) { super(effect); } @@ -135,30 +147,80 @@ class IntetTheDreamerEffect extends AsThoughEffectImpl { } @Override - public IntetTheDreamerEffect copy() { - return new IntetTheDreamerEffect(this); + public IntetTheDreamerCastEffect copy() { + return new IntetTheDreamerCastEffect(this); } @Override public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { - Player controller = game.getPlayer(source.getControllerId()); - MageObject sourceObject = source.getSourceObject(game); - if (controller != null && sourceObject != null) { - Card card = game.getCard(objectId); - if (affectedControllerId.equals(source.getControllerId()) && card != null && game.getState().getZone(card.getId()) == Zone.EXILED) { - ExileZone zone = game.getExile().getExileZone(CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter())); - if (zone != null && zone.contains(card.getId())) { - if (controller.chooseUse(outcome, "Look at the card?", source, game)) { - Cards cards = new CardsImpl(); - cards.add(card); - controller.lookAtCards(sourceObject.getName(), cards, game); - return false; - } - controller.setCastSourceIdWithAlternateMana(objectId, null); - return true; + if (affectedControllerId.equals(source.getControllerId()) && game.getState().getZone(objectId).equals(Zone.EXILED)) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (controller != null && sourceObject != null) { + Card card = game.getCard(objectId); + if (card != null && card.isFaceDown(game)) { + ExileZone zone = game.getExile().getExileZone(CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter())); + if (zone != null && zone.contains(card.getId())/* && CardUtil.cardCanBePlayedNow(card, controller.getId(), game)*/) { + if (card.getCardType().contains(CardType.LAND)) { + if (game.canPlaySorcery(controller.getId()) && game.getPlayer(controller.getId()).canPlayLand()) { + return controller.chooseUse(outcome, "Play " + card.getName() + "?", source, game); + } + } else { + controller.setCastSourceIdWithAlternateMana(objectId, null); + return true; + } + } + } + } + } + return false; + + } +} + +class IntetTheDreamerLookEffect extends AsThoughEffectImpl { + + public IntetTheDreamerLookEffect() { + super(AsThoughEffectType.LOOK_AT_FACE_DOWN, Duration.EndOfGame, Outcome.Benefit); + staticText = "You may look at that card for as long as it remains exiled"; + } + + public IntetTheDreamerLookEffect(final IntetTheDreamerLookEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public IntetTheDreamerLookEffect copy() { + return new IntetTheDreamerLookEffect(this); + } + + @Override + public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + if (affectedControllerId.equals(source.getControllerId()) && game.getState().getZone(objectId).equals(Zone.EXILED)) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (controller != null && sourceObject != null) { + Card card = game.getCard(objectId); + if (card != null && card.isFaceDown(game)) { + Set exileZones = (Set) game.getState().getValue(IntetTheDreamer.VALUE_PREFIX + source.getSourceId().toString()); + if (exileZones != null) { + for (ExileZone exileZone : game.getExile().getExileZones()) { + if (exileZone.contains(objectId)) { + if (!exileZones.contains(exileZone.getId())) { + return false; + } + } + } + return true; + } } } } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/planarchaos/Mycologist.java b/Mage.Sets/src/mage/sets/planarchaos/Mycologist.java new file mode 100644 index 0000000000..8c1d968b68 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planarchaos/Mycologist.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.planarchaos; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.GainLifeEffect; +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.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.SaprolingToken; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author LoneFox + */ +public class Mycologist extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Saproling"); + + static { + filter.add(new SubtypePredicate("Saproling")); + } + + public Mycologist(UUID ownerId) { + super(ownerId, 27, "Mycologist", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "PLC"; + this.subtype.add("Human"); + this.subtype.add("Druid"); + this.power = new MageInt(0); + this.toughness = new MageInt(2); + + // At the beginning of your upkeep, put a spore counter on Mycologist. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.SPORE.createInstance()), TargetController.YOU, false)); + // Remove three spore counters from Mycologist: Put a 1/1 green Saproling creature token onto the battlefield. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SaprolingToken()), new RemoveCountersSourceCost(CounterType.SPORE.createInstance(3)))); + // Sacrifice a Saproling: You gain 2 life. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(2), + new SacrificeTargetCost(new TargetControlledPermanent(1, 1, filter, false)))); + } + + public Mycologist(final Mycologist card) { + super(card); + } + + @Override + public Mycologist copy() { + return new Mycologist(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planarchaos/Ovinize.java b/Mage.Sets/src/mage/sets/planarchaos/Ovinize.java index 01a618d528..416f27cba6 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/Ovinize.java +++ b/Mage.Sets/src/mage/sets/planarchaos/Ovinize.java @@ -28,6 +28,7 @@ package mage.sets.planarchaos; import java.util.UUID; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.continuous.LoseAllAbilitiesTargetEffect; import mage.abilities.effects.common.continuous.SetPowerToughnessTargetEffect; import mage.cards.CardImpl; @@ -50,7 +51,9 @@ public class Ovinize extends CardImpl { // Target creature loses all abilities and becomes 0/1 until end of turn. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new LoseAllAbilitiesTargetEffect(Duration.EndOfTurn)); - this.getSpellAbility().addEffect(new SetPowerToughnessTargetEffect(0, 1, Duration.EndOfTurn)); + Effect effect = new SetPowerToughnessTargetEffect(0, 1, Duration.EndOfTurn); + effect.setText("and has base power and toughness 0/1"); + this.getSpellAbility().addEffect(effect); } public Ovinize(final Ovinize card) { diff --git a/Mage.Sets/src/mage/sets/planarchaos/PallidMycoderm.java b/Mage.Sets/src/mage/sets/planarchaos/PallidMycoderm.java index 8ed3c7192a..1052c0548b 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/PallidMycoderm.java +++ b/Mage.Sets/src/mage/sets/planarchaos/PallidMycoderm.java @@ -59,7 +59,7 @@ import mage.target.common.TargetControlledCreaturePermanent; public class PallidMycoderm extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Each creature you control that's a Fungus or a Saproling"); - private static final FilterControlledCreaturePermanent filterSaproling = new FilterControlledCreaturePermanent("Saproling"); + private static final FilterControlledCreaturePermanent filterSaproling = new FilterControlledCreaturePermanent("a Saproling"); static { filter.add(new ControllerPredicate(TargetController.YOU)); filter.add(Predicates.or(new SubtypePredicate("Fungus"), new SubtypePredicate("Saproling"))); @@ -79,10 +79,9 @@ public class PallidMycoderm extends CardImpl { // Remove three spore counters from Pallid Mycoderm: Put a 1/1 green Saproling creature token onto the battlefield. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SaprolingToken()), new RemoveCountersSourceCost(CounterType.SPORE.createInstance(3)))); // Sacrifice a Saproling: Each creature you control that's a Fungus or a Saproling gets +1/+1 until end of turn. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, - new BoostAllEffect(1,1,Duration.EndOfTurn, filter, false), + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + new BoostAllEffect(1,1,Duration.EndOfTurn, filter, false), new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1,filterSaproling, false)))); - } public PallidMycoderm(final PallidMycoderm card) { diff --git a/Mage.Sets/src/mage/sets/planarchaos/PsychotropeThallid.java b/Mage.Sets/src/mage/sets/planarchaos/PsychotropeThallid.java index 19002bc550..7e5babcf3a 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/PsychotropeThallid.java +++ b/Mage.Sets/src/mage/sets/planarchaos/PsychotropeThallid.java @@ -54,8 +54,8 @@ import mage.target.common.TargetControlledCreaturePermanent; * @author fireshoes */ public class PsychotropeThallid extends CardImpl { - - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Saproling"); + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a Saproling"); static { filter.add(new SubtypePredicate("Saproling")); } @@ -71,11 +71,11 @@ public class PsychotropeThallid extends CardImpl { this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.SPORE.createInstance()), TargetController.YOU, false)); // Remove three spore counters from Psychotrope Thallid: Put a 1/1 green Saproling creature token onto the battlefield. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, - new CreateTokenEffect(new SaprolingToken()), + new CreateTokenEffect(new SaprolingToken()), new RemoveCountersSourceCost(CounterType.SPORE.createInstance(3)))); // {1}, Sacrifice a Saproling: Draw a card. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new DrawCardSourceControllerEffect(1), + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new DrawCardSourceControllerEffect(1), new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1, filter, false))); ability.addCost(new GenericManaCost(1)); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/planarchaos/RealityAcid.java b/Mage.Sets/src/mage/sets/planarchaos/RealityAcid.java index 425d94127d..ac39868c19 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/RealityAcid.java +++ b/Mage.Sets/src/mage/sets/planarchaos/RealityAcid.java @@ -76,8 +76,7 @@ public class RealityAcid extends CardImpl { this.addAbility(new VanishingSacrificeAbility()); // When Reality Acid leaves the battlefield, enchanted permanent's controller sacrifices it. - Effect effect = new SacrificeTargetEffect(); - effect.setText("enchanted permanent's controller sacrifices it"); + Effect effect = new SacrificeTargetEffect("enchanted permanent's controller sacrifices it"); this.addAbility(new RealityAcidTriggeredAbility(effect, false)); } diff --git a/Mage.Sets/src/mage/sets/planarchaos/Tidewalker.java b/Mage.Sets/src/mage/sets/planarchaos/Tidewalker.java new file mode 100644 index 0000000000..3c55beed82 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planarchaos/Tidewalker.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.sets.planarchaos; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.CountersCount; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.VanishingSacrificeAbility; +import mage.abilities.keyword.VanishingUpkeepAbility; +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.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author LoneFox + */ +public class Tidewalker extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Island you control"); + + static { + filter.add(new SubtypePredicate("Island")); + } + + public Tidewalker(UUID ownerId) { + super(ownerId, 49, "Tidewalker", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "PLC"; + this.subtype.add("Elemental"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Tidewalker enters the battlefield with a time counter on it for each Island you control. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.TIME.createInstance(0), new PermanentsOnBattlefieldCount(filter), true), "with a time counter on it for each Island you control")); + // Vanishing + this.addAbility(new VanishingUpkeepAbility(0)); + this.addAbility(new VanishingSacrificeAbility()); + // Tidewalker's power and toughness are each equal to the number of time counters on it. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new CountersCount(CounterType.TIME), Duration.EndOfGame))); + } + + public Tidewalker(final Tidewalker card) { + super(card); + } + + @Override + public Tidewalker copy() { + return new Tidewalker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planarchaos/VitasporeThallid.java b/Mage.Sets/src/mage/sets/planarchaos/VitasporeThallid.java index c9ea1e225f..0e7d29b505 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/VitasporeThallid.java +++ b/Mage.Sets/src/mage/sets/planarchaos/VitasporeThallid.java @@ -56,8 +56,8 @@ import mage.target.common.TargetCreaturePermanent; * @author fireshoes */ public class VitasporeThallid extends CardImpl { - - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Saproling"); + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a Saproling"); static { filter.add(new SubtypePredicate("Saproling")); } @@ -73,11 +73,11 @@ public class VitasporeThallid extends CardImpl { this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.SPORE.createInstance()), TargetController.YOU, false)); // Remove three spore counters from Vitaspore Thallid: Put a 1/1 green Saproling creature token onto the battlefield. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, - new CreateTokenEffect(new SaprolingToken()), + new CreateTokenEffect(new SaprolingToken()), new RemoveCountersSourceCost(CounterType.SPORE.createInstance(3)))); // Sacrifice a Saproling: Target creature gains haste until end of turn. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn), + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn), new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1, filter, false))); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/planarchaos/WistfulThinking.java b/Mage.Sets/src/mage/sets/planarchaos/WistfulThinking.java index 021d6e01b3..b662e319be 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/WistfulThinking.java +++ b/Mage.Sets/src/mage/sets/planarchaos/WistfulThinking.java @@ -28,6 +28,7 @@ package mage.sets.planarchaos; import java.util.UUID; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.DrawCardTargetEffect; import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; @@ -44,12 +45,12 @@ public class WistfulThinking extends CardImpl { public WistfulThinking(UUID ownerId) { super(ownerId, 53, "Wistful Thinking", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{U}"); this.expansionSetCode = "PLC"; - - // Target player draws two cards, then discards four cards. this.getSpellAbility().addEffect(new DrawCardTargetEffect(2)); - this.getSpellAbility().addEffect(new DiscardTargetEffect(4)); + Effect effect = new DiscardTargetEffect(4); + effect.setText(", then discards four cards"); + this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetPlayer()); } diff --git a/Mage.Sets/src/mage/sets/planechase/IvyElemental.java b/Mage.Sets/src/mage/sets/planechase/IvyElemental.java index 2895430d7d..ab427c6c98 100644 --- a/Mage.Sets/src/mage/sets/planechase/IvyElemental.java +++ b/Mage.Sets/src/mage/sets/planechase/IvyElemental.java @@ -32,10 +32,8 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.SpellAbility; import mage.abilities.common.EntersBattlefieldAbility; -import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.effects.EntersBattlefieldEffect; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Outcome; @@ -59,7 +57,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 IvyElementalEntersBattlefieldEffect(), "with X +1/+1 counters on it")); } public IvyElemental(final IvyElemental card) { @@ -88,9 +86,8 @@ class IvyElementalEntersBattlefieldEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { - // delete to prevent using it again if put into battlefield from other effect - setValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY, null); + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { SpellAbility spellAbility = (SpellAbility) obj; if (spellAbility.getSourceId().equals(source.getSourceId())) { // put into play by normal cast int amount = spellAbility.getManaCostsToPay().getX(); @@ -108,4 +105,4 @@ class IvyElementalEntersBattlefieldEffect extends OneShotEffect { return new IvyElementalEntersBattlefieldEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/planechase2012/WhirlpoolWarrior.java b/Mage.Sets/src/mage/sets/planechase2012/WhirlpoolWarrior.java index 475a7fd963..059d5a709c 100644 --- a/Mage.Sets/src/mage/sets/planechase2012/WhirlpoolWarrior.java +++ b/Mage.Sets/src/mage/sets/planechase2012/WhirlpoolWarrior.java @@ -27,11 +27,9 @@ */ package mage.sets.planechase2012; +import java.util.LinkedHashMap; +import java.util.Map; 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.EntersBattlefieldTriggeredAbility; @@ -41,7 +39,10 @@ import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; import mage.cards.CardImpl; -import mage.cards.Cards; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.game.Game; import mage.players.Player; @@ -99,16 +100,23 @@ class WhirlpoolWarriorTriggeredEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - int cardsHand = controller.getHand().size(); - if (cardsHand > 0){ - for (Card card: controller.getHand().getCards(game)) { - if (card != null) { - controller.removeFromHand(card, game); - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); + Map cardsToDraw = new LinkedHashMap<>(); + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null) { + int cardsInHand = player.getHand().size(); + if (cardsInHand > 0) { + cardsToDraw.put(playerId, cardsInHand); } + player.moveCards(player.getHand(), Zone.HAND, Zone.LIBRARY, source, game); + player.shuffleLibrary(game); + } + } + for (UUID playerId : cardsToDraw.keySet()) { + Player player = game.getPlayer(playerId); + if (player != null) { + player.drawCards(cardsToDraw.get(playerId), game); } - controller.shuffleLibrary(game); - controller.drawCards(cardsHand, game); } return true; } @@ -141,8 +149,8 @@ class WhirlpoolWarriorActivatedEffect extends OneShotEffect { Player player = game.getPlayer(playerId); if (player != null) { int cardsHand = player.getHand().size(); - if (cardsHand > 0){ - for (Card card: player.getHand().getCards(game)) { + if (cardsHand > 0) { + for (Card card : player.getHand().getCards(game)) { if (card != null) { player.removeFromHand(card, game); card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); diff --git a/Mage.Sets/src/mage/sets/planeshift/DralnusPet.java b/Mage.Sets/src/mage/sets/planeshift/DralnusPet.java index 11e6279866..c8c9218dbd 100644 --- a/Mage.Sets/src/mage/sets/planeshift/DralnusPet.java +++ b/Mage.Sets/src/mage/sets/planeshift/DralnusPet.java @@ -38,7 +38,6 @@ import mage.abilities.costs.Costs; import mage.abilities.costs.CostsImpl; import mage.abilities.costs.common.DiscardCardCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.Effect; import mage.abilities.effects.EntersBattlefieldEffect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; @@ -77,7 +76,7 @@ public class DralnusPet extends CardImpl { this.addAbility(new KickerAbility(kickerCosts)); // If Dralnu's Pet was kicked, it enters the battlefield with flying and with X +1/+1 counters on it, where X is the discarded card's converted mana cost. Ability ability = new EntersBattlefieldAbility(new DralnusPetEffect(), KickedCondition.getInstance(), true, - "If {this} was kicked, it enters the battlefield with flying and with X +1/+1 counters on it, where X is the discarded card's converted mana cost", ""); + "If {this} was kicked, it enters the battlefield with flying and with X +1/+1 counters on it, where X is the discarded card's converted mana cost", ""); ability.addEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield)); this.addAbility(ability); } @@ -114,7 +113,8 @@ class DralnusPetEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (controller != null && permanent != null) { Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { int cmc = 0; for (Cost cost : ((SpellAbility) obj).getCosts()) { if (cost instanceof DiscardCardCost && ((DiscardCardCost) cost).getCards().size() > 0) { diff --git a/Mage.Sets/src/mage/sets/portal/AlluringScent.java b/Mage.Sets/src/mage/sets/portal/AlluringScent.java index fcd20fda21..7d4ac4d3f0 100644 --- a/Mage.Sets/src/mage/sets/portal/AlluringScent.java +++ b/Mage.Sets/src/mage/sets/portal/AlluringScent.java @@ -42,7 +42,7 @@ import mage.target.common.TargetCreaturePermanent; public class AlluringScent extends CardImpl { public AlluringScent(UUID ownerId) { - super(ownerId, 61, "Alluring Scent", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{1}{G}{G}"); + super(ownerId, 80, "Alluring Scent", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{1}{G}{G}"); this.expansionSetCode = "POR"; // All creatures able to block target creature this turn do so. diff --git a/Mage.Sets/src/mage/sets/portal/CloudPirates.java b/Mage.Sets/src/mage/sets/portal/CloudPirates.java new file mode 100644 index 0000000000..5635495516 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/CloudPirates.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.portal; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.CanBlockOnlyFlyingAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class CloudPirates extends CardImpl { + + public CloudPirates(UUID ownerId) { + super(ownerId, 47, "Cloud Pirates", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{U}"); + this.expansionSetCode = "POR"; + this.subtype.add("Human"); + this.subtype.add("Pirate"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Cloud Pirates can block only creatures with flying. + this.addAbility(new CanBlockOnlyFlyingAbility()); + } + + public CloudPirates(final CloudPirates card) { + super(card); + } + + @Override + public CloudPirates copy() { + return new CloudPirates(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/BarbarianGeneral.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/BarbarianGeneral.java new file mode 100644 index 0000000000..87abf4b050 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/BarbarianGeneral.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class BarbarianGeneral extends CardImpl { + + public BarbarianGeneral(UUID ownerId) { + super(ownerId, 100, "Barbarian General", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{R}"); + this.expansionSetCode = "PTK"; + this.subtype.add("Human"); + this.subtype.add("Barbarian"); + this.subtype.add("Soldier"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Horsemanship + this.addAbility(HorsemanshipAbility.getInstance()); + } + + public BarbarianGeneral(final BarbarianGeneral card) { + super(card); + } + + @Override + public BarbarianGeneral copy() { + return new BarbarianGeneral(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/LadyZhurongWarriorQueen.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/LadyZhurongWarriorQueen.java new file mode 100644 index 0000000000..fd5918fba0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/LadyZhurongWarriorQueen.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class LadyZhurongWarriorQueen extends CardImpl { + + public LadyZhurongWarriorQueen(UUID ownerId) { + super(ownerId, 139, "Lady Zhurong, Warrior Queen", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{G}"); + this.expansionSetCode = "PTK"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.subtype.add("Warrior"); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Horsemanship + this.addAbility(HorsemanshipAbility.getInstance()); + } + + public LadyZhurongWarriorQueen(final LadyZhurongWarriorQueen card) { + super(card); + } + + @Override + public LadyZhurongWarriorQueen copy() { + return new LadyZhurongWarriorQueen(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/LuMengWuGeneral.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/LuMengWuGeneral.java new file mode 100644 index 0000000000..1692ad121d --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/LuMengWuGeneral.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class LuMengWuGeneral extends CardImpl { + + public LuMengWuGeneral(UUID ownerId) { + super(ownerId, 46, "Lu Meng, Wu General", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); + this.expansionSetCode = "PTK"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Horsemanship + this.addAbility(HorsemanshipAbility.getInstance()); + } + + public LuMengWuGeneral(final LuMengWuGeneral card) { + super(card); + } + + @Override + public LuMengWuGeneral copy() { + return new LuMengWuGeneral(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/ShuCavalry.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/ShuCavalry.java new file mode 100644 index 0000000000..70b8f85a5a --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/ShuCavalry.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.portalthreekingdoms; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class ShuCavalry extends mage.sets.masterseditioniii.ShuCavalry { + + public ShuCavalry(UUID ownerId) { + super(ownerId); + this.cardNumber = 19; + this.expansionSetCode = "PTK"; + } + + public ShuCavalry(final ShuCavalry card) { + super(card); + } + + @Override + public ShuCavalry copy() { + return new ShuCavalry(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/ShuEliteCompanions.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/ShuEliteCompanions.java new file mode 100644 index 0000000000..5b00f9e97a --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/ShuEliteCompanions.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.portalthreekingdoms; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ShuEliteCompanions extends mage.sets.masterseditioniii.ShuEliteCompanions { + + public ShuEliteCompanions(UUID ownerId) { + super(ownerId); + this.cardNumber = 21; + this.expansionSetCode = "PTK"; + this.rarity = Rarity.UNCOMMON; + } + + public ShuEliteCompanions(final ShuEliteCompanions card) { + super(card); + } + + @Override + public ShuEliteCompanions copy() { + return new ShuEliteCompanions(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/ShuGeneral.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/ShuGeneral.java new file mode 100644 index 0000000000..8e507e1eb9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/ShuGeneral.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ShuGeneral extends CardImpl { + + public ShuGeneral(UUID ownerId) { + super(ownerId, 25, "Shu General", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "PTK"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Vigilance; horsemanship + this.addAbility(VigilanceAbility.getInstance()); + this.addAbility(HorsemanshipAbility.getInstance()); + } + + public ShuGeneral(final ShuGeneral card) { + super(card); + } + + @Override + public ShuGeneral copy() { + return new ShuGeneral(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/WeiEliteCompanions.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/WeiEliteCompanions.java new file mode 100644 index 0000000000..667ef3c730 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/WeiEliteCompanions.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.portalthreekingdoms; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class WeiEliteCompanions extends mage.sets.masterseditioniii.WeiEliteCompanions { + + public WeiEliteCompanions(UUID ownerId) { + super(ownerId); + this.cardNumber = 87; + this.expansionSetCode = "PTK"; + this.rarity = Rarity.UNCOMMON; + } + + public WeiEliteCompanions(final WeiEliteCompanions card) { + super(card); + } + + @Override + public WeiEliteCompanions copy() { + return new WeiEliteCompanions(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/WeiScout.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/WeiScout.java new file mode 100644 index 0000000000..41435c2fc7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/WeiScout.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class WeiScout extends CardImpl { + + public WeiScout(UUID ownerId) { + super(ownerId, 90, "Wei Scout", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "PTK"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.subtype.add("Scout"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Horsemanship + this.addAbility(HorsemanshipAbility.getInstance()); + } + + public WeiScout(final WeiScout card) { + super(card); + } + + @Override + public WeiScout copy() { + return new WeiScout(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/WeiStrikeForce.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/WeiStrikeForce.java new file mode 100644 index 0000000000..4dad25498c --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/WeiStrikeForce.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class WeiStrikeForce extends CardImpl { + + public WeiStrikeForce(UUID ownerId) { + super(ownerId, 91, "Wei Strike Force", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "PTK"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Horsemanship + this.addAbility(HorsemanshipAbility.getInstance()); + } + + public WeiStrikeForce(final WeiStrikeForce card) { + super(card); + } + + @Override + public WeiStrikeForce copy() { + return new WeiStrikeForce(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/WuEliteCavalry.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/WuEliteCavalry.java new file mode 100644 index 0000000000..105baab909 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/WuEliteCavalry.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class WuEliteCavalry extends CardImpl { + + public WuEliteCavalry(UUID ownerId) { + super(ownerId, 58, "Wu Elite Cavalry", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "PTK"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Horsemanship + this.addAbility(HorsemanshipAbility.getInstance()); + } + + public WuEliteCavalry(final WuEliteCavalry card) { + super(card); + } + + @Override + public WuEliteCavalry copy() { + return new WuEliteCavalry(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/WuLightCavalry.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/WuLightCavalry.java new file mode 100644 index 0000000000..7b134a16aa --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/WuLightCavalry.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class WuLightCavalry extends CardImpl { + + public WuLightCavalry(UUID ownerId) { + super(ownerId, 60, "Wu Light Cavalry", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "PTK"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Horsemanship + this.addAbility(HorsemanshipAbility.getInstance()); + } + + public WuLightCavalry(final WuLightCavalry card) { + super(card); + } + + @Override + public WuLightCavalry copy() { + return new WuLightCavalry(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/YellowScarvesCavalry.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/YellowScarvesCavalry.java new file mode 100644 index 0000000000..b1467c910a --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/YellowScarvesCavalry.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.CantBlockAbility; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class YellowScarvesCavalry extends CardImpl { + + public YellowScarvesCavalry(UUID ownerId) { + super(ownerId, 125, "Yellow Scarves Cavalry", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "PTK"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Horsemanship + this.addAbility(HorsemanshipAbility.getInstance()); + // Yellow Scarves Cavalry can't block. + this.addAbility(new CantBlockAbility()); + } + + public YellowScarvesCavalry(final YellowScarvesCavalry card) { + super(card); + } + + @Override + public YellowScarvesCavalry copy() { + return new YellowScarvesCavalry(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/YellowScarvesGeneral.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/YellowScarvesGeneral.java new file mode 100644 index 0000000000..4d7c59888e --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/YellowScarvesGeneral.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.CantBlockAbility; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class YellowScarvesGeneral extends CardImpl { + + public YellowScarvesGeneral(UUID ownerId) { + super(ownerId, 126, "Yellow Scarves General", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "PTK"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Horsemanship + this.addAbility(HorsemanshipAbility.getInstance()); + // Yellow Scarves General can't block. + this.addAbility(new CantBlockAbility()); + } + + public YellowScarvesGeneral(final YellowScarvesGeneral card) { + super(card); + } + + @Override + public YellowScarvesGeneral copy() { + return new YellowScarvesGeneral(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/ZhangFeiFierceWarrior.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/ZhangFeiFierceWarrior.java new file mode 100644 index 0000000000..75a46a4b62 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/ZhangFeiFierceWarrior.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.portalthreekingdoms; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ZhangFeiFierceWarrior extends mage.sets.masterseditioniii.ZhangFeiFierceWarrior { + + public ZhangFeiFierceWarrior(UUID ownerId) { + super(ownerId); + this.cardNumber = 32; + this.expansionSetCode = "PTK"; + this.rarity = Rarity.RARE; + } + + public ZhangFeiFierceWarrior(final ZhangFeiFierceWarrior card) { + super(card); + } + + @Override + public ZhangFeiFierceWarrior copy() { + return new ZhangFeiFierceWarrior(this); + } +} diff --git a/Mage.Sets/src/mage/sets/prophecy/Darba.java b/Mage.Sets/src/mage/sets/prophecy/Darba.java new file mode 100644 index 0000000000..1b38dc0a47 --- /dev/null +++ b/Mage.Sets/src/mage/sets/prophecy/Darba.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.prophecy; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; + +/** + * + * @author LoneFox + */ +public class Darba extends CardImpl { + + public Darba(UUID ownerId) { + super(ownerId, 111, "Darba", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "PCY"; + this.subtype.add("Bird"); + this.subtype.add("Beast"); + this.power = new MageInt(5); + this.toughness = new MageInt(4); + + // At the beginning of your upkeep, sacrifice Darba unless you pay {G}{G}. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ManaCostsImpl("{G}{G}")), TargetController.YOU, false)); + } + + public Darba(final Darba card) { + super(card); + } + + @Override + public Darba copy() { + return new Darba(this); + } +} diff --git a/Mage.Sets/src/mage/sets/prophecy/Outbreak.java b/Mage.Sets/src/mage/sets/prophecy/Outbreak.java new file mode 100644 index 0000000000..aa0473be3c --- /dev/null +++ b/Mage.Sets/src/mage/sets/prophecy/Outbreak.java @@ -0,0 +1,123 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.prophecy; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.costs.AlternativeCostSourceAbility; +import mage.abilities.costs.common.DiscardTargetCost; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostAllEffect; +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.filter.FilterCard; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInHand; + +/** + * + * @author fireshoes + */ +public class Outbreak extends CardImpl { + + private static final FilterCard filterLand = new FilterCard("a Swamp card"); + + static { + filterLand.add(new SubtypePredicate("Swamp")); + } + + public Outbreak(UUID ownerId) { + super(ownerId, 71, "Outbreak", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{B}"); + this.expansionSetCode = "PCY"; + + // You may discard a Swamp card rather than pay Outbreak's mana cost. + this.addAbility(new AlternativeCostSourceAbility(new DiscardTargetCost(new TargetCardInHand(filterLand)))); + + // Choose a creature type. All creatures of that type get -1/-1 until end of turn. + this.getSpellAbility().addEffect(new OutbreakEffect()); + } + + public Outbreak(final Outbreak card) { + super(card); + } + + @Override + public Outbreak copy() { + return new Outbreak(this); + } +} + +class OutbreakEffect extends OneShotEffect { + + public OutbreakEffect() { + super(Outcome.UnboostCreature); + staticText = "Choose a creature type. All creatures of that type get -1/-1 until end of turn"; + } + + public OutbreakEffect(final OutbreakEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + Choice typeChoice = new ChoiceImpl(true); + typeChoice.setMessage("Choose a creature type:"); + typeChoice.setChoices(CardRepository.instance.getCreatureTypes()); + while (!player.choose(outcome, typeChoice, game)) { + if (!player.canRespond()) { + return false; + } + } + if (typeChoice.getChoice() != null) { + game.informPlayers(player.getLogName() + " has chosen " + typeChoice.getChoice()); + } + FilterCreaturePermanent filter = new FilterCreaturePermanent("All creatures of the chosen type"); + filter.add(new SubtypePredicate(typeChoice.getChoice())); + ContinuousEffect effect = new BoostAllEffect(-1, -1, Duration.WhileOnBattlefield, filter, false); + game.addEffect(effect, source); + } + return false; + } + + @Override + public OutbreakEffect copy() { + return new OutbreakEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/prophecy/StealStrength.java b/Mage.Sets/src/mage/sets/prophecy/StealStrength.java new file mode 100644 index 0000000000..c0dc42b53d --- /dev/null +++ b/Mage.Sets/src/mage/sets/prophecy/StealStrength.java @@ -0,0 +1,99 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.prophecy; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.cards.CardImpl; +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.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class StealStrength extends CardImpl { + + public StealStrength(UUID ownerId) { + super(ownerId, 79, "Steal Strength", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{B}"); + this.expansionSetCode = "PCY"; + + // Target creature gets +1/+1 until end of turn. Another target creature gets -1/-1 until end of turn. + this.getSpellAbility().addEffect(new StealStrengthEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(2)); + } + + public StealStrength(final StealStrength card) { + super(card); + } + + @Override + public StealStrength copy() { + return new StealStrength(this); + } +} + +class StealStrengthEffect extends ContinuousEffectImpl { + + public StealStrengthEffect() { + super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature); + this.staticText = "Target creature gets +1/+1 until end of turn. Another target creature gets -1/-1 until end of turn"; + } + + public StealStrengthEffect(final StealStrengthEffect effect) { + super(effect); + } + + @Override + public StealStrengthEffect copy() { + return new StealStrengthEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent != null) { + permanent.addPower(1); + permanent.addToughness(1); + } + permanent = game.getPermanent(source.getTargets().get(0).getTargets().get(1)); + if (permanent != null) { + permanent.addPower(-1); + permanent.addToughness(-1); + } + return true; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/prophecy/WhipSergeant.java b/Mage.Sets/src/mage/sets/prophecy/WhipSergeant.java new file mode 100644 index 0000000000..6067839931 --- /dev/null +++ b/Mage.Sets/src/mage/sets/prophecy/WhipSergeant.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.prophecy; + +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.GainAbilityTargetEffect; +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; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class WhipSergeant extends CardImpl { + + public WhipSergeant(UUID ownerId) { + super(ownerId, 107, "Whip Sergeant", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "PCY"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // {R}: Target creature gains haste until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{R}")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public WhipSergeant(final WhipSergeant card) { + super(card); + } + + @Override + public WhipSergeant copy() { + return new WhipSergeant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/prophecy/WhipstitchedZombie.java b/Mage.Sets/src/mage/sets/prophecy/WhipstitchedZombie.java new file mode 100644 index 0000000000..632598ce5b --- /dev/null +++ b/Mage.Sets/src/mage/sets/prophecy/WhipstitchedZombie.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.prophecy; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; + +/** + * + * @author LoneFox + */ +public class WhipstitchedZombie extends CardImpl { + + public WhipstitchedZombie(UUID ownerId) { + super(ownerId, 81, "Whipstitched Zombie", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "PCY"; + this.subtype.add("Zombie"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // At the beginning of your upkeep, sacrifice Whipstitched Zombie unless you pay {B}. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ManaCostsImpl("{B}")), TargetController.YOU, false)); + } + + public WhipstitchedZombie(final WhipstitchedZombie card) { + super(card); + } + + @Override + public WhipstitchedZombie copy() { + return new WhipstitchedZombie(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ravnica/HammerfistGiant.java b/Mage.Sets/src/mage/sets/ravnica/HammerfistGiant.java new file mode 100644 index 0000000000..db5d3e5df1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ravnica/HammerfistGiant.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.ravnica; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +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.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; + +/** + * + * @author fireshoes + */ +public class HammerfistGiant extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("each creature without flying"); + + static { + filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); + } + + public HammerfistGiant(UUID ownerId) { + super(ownerId, 130, "Hammerfist Giant", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); + this.expansionSetCode = "RAV"; + this.subtype.add("Giant"); + this.subtype.add("Warrior"); + this.power = new MageInt(5); + this.toughness = new MageInt(4); + + // {tap}: Hammerfist Giant deals 4 damage to each creature without flying and each player. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageEverythingEffect(4, filter), new TapSourceCost())); + } + + public HammerfistGiant(final HammerfistGiant card) { + super(card); + } + + @Override + public HammerfistGiant copy() { + return new HammerfistGiant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ravnica/SuppressionField.java b/Mage.Sets/src/mage/sets/ravnica/SuppressionField.java index 7c4142711e..ae8f16d745 100644 --- a/Mage.Sets/src/mage/sets/ravnica/SuppressionField.java +++ b/Mage.Sets/src/mage/sets/ravnica/SuppressionField.java @@ -29,11 +29,8 @@ package mage.sets.ravnica; import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.ActivatedAbility; -import mage.abilities.SpellAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.cost.CostModificationEffectImpl; -import mage.abilities.mana.ManaAbility; import mage.cards.CardImpl; import mage.constants.AbilityType; import mage.constants.CardType; @@ -55,9 +52,8 @@ public class SuppressionField extends CardImpl { super(ownerId, 31, "Suppression Field", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); this.expansionSetCode = "RAV"; - // Activated abilities cost {2} more to activate unless they're mana abilities. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SuppressionFieldCostReductionEffect() )); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SuppressionFieldCostReductionEffect())); } public SuppressionField(final SuppressionField card) { @@ -72,7 +68,7 @@ public class SuppressionField extends CardImpl { class SuppressionFieldCostReductionEffect extends CostModificationEffectImpl { - SuppressionFieldCostReductionEffect ( ) { + SuppressionFieldCostReductionEffect() { super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.INCREASE_COST); staticText = "Activated abilities cost {2} more to activate unless they're mana abilities"; } @@ -89,10 +85,7 @@ class SuppressionFieldCostReductionEffect extends CostModificationEffectImpl { @Override public boolean applies(Ability abilityToModify, Ability source, Game game) { - if (abilityToModify.getAbilityType().equals(AbilityType.ACTIVATED)) { - return true; - } - return false; + return abilityToModify.getAbilityType().equals(AbilityType.ACTIVATED); } @Override diff --git a/Mage.Sets/src/mage/sets/returntoravnica/ManaBloom.java b/Mage.Sets/src/mage/sets/returntoravnica/ManaBloom.java index 7bccbedcf0..155244c026 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/ManaBloom.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/ManaBloom.java @@ -25,15 +25,9 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.returntoravnica; 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.SpellAbility; import mage.abilities.TriggeredAbility; @@ -48,7 +42,11 @@ import mage.abilities.effects.common.AddManaOfAnyColorEffect; 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; @@ -61,13 +59,12 @@ public class ManaBloom extends CardImpl { static final String rule = "with X charge counters on it"; - public ManaBloom (UUID ownerId) { + public ManaBloom(UUID ownerId) { super(ownerId, 130, "Mana Bloom", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{X}{G}"); 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 ManaBloomEffect(), rule)); // 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())); @@ -75,11 +72,11 @@ public class ManaBloom extends CardImpl { // At the beginning of your upkeep, if Mana Bloom has no charge counters on it, return it to its owner's hand. TriggeredAbility triggeredAbility = new BeginningOfUpkeepTriggeredAbility(new ReturnToHandSourceEffect(true), TargetController.YOU, false); - this.addAbility(new ConditionalTriggeredAbility(triggeredAbility, new SourceHasCounterCondition(CounterType.CHARGE, 0,0), "At the beginning of your upkeep, if Mana Bloom has no charge counters on it, return it to its owner's hand.")); + this.addAbility(new ConditionalTriggeredAbility(triggeredAbility, new SourceHasCounterCondition(CounterType.CHARGE, 0, 0), "At the beginning of your upkeep, if Mana Bloom has no charge counters on it, return it to its owner's hand.")); } - public ManaBloom (final ManaBloom card) { + public ManaBloom(final ManaBloom card) { super(card); } @@ -90,6 +87,7 @@ public class ManaBloom extends CardImpl { } class ManaBloomEffect extends OneShotEffect { + public ManaBloomEffect() { super(Outcome.Benefit); } @@ -103,7 +101,8 @@ class ManaBloomEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).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) obj).getManaCostsToPay().getX(); @@ -120,4 +119,4 @@ class ManaBloomEffect extends OneShotEffect { public ManaBloomEffect copy() { return new ManaBloomEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/returntoravnica/SupremeVerdict.java b/Mage.Sets/src/mage/sets/returntoravnica/SupremeVerdict.java index 3ea105437d..08dc6f8feb 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/SupremeVerdict.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/SupremeVerdict.java @@ -25,20 +25,15 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.returntoravnica; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.CantBeCounteredAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.Effect; -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.abilities.effects.common.CantBeCounteredSourceEffect; import mage.abilities.effects.common.DestroyAllEffect; import mage.cards.CardImpl; -import mage.constants.Zone; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.filter.common.FilterCreaturePermanent; /** @@ -47,21 +42,20 @@ import mage.filter.common.FilterCreaturePermanent; */ public class SupremeVerdict extends CardImpl { - public SupremeVerdict (UUID ownerId) { + public SupremeVerdict(UUID ownerId) { super(ownerId, 201, "Supreme Verdict", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{1}{W}{W}{U}"); this.expansionSetCode = "RTR"; - // Supreme Verdict can't be countered. Ability ability = new CantBeCounteredAbility(); ability.setRuleAtTheTop(true); this.addAbility(ability); - // Destroy all creatures. + // Destroy all creatures. this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterCreaturePermanent())); } - public SupremeVerdict (final SupremeVerdict card) { + public SupremeVerdict(final SupremeVerdict card) { super(card); } @@ -69,4 +63,4 @@ public class SupremeVerdict extends CardImpl { public SupremeVerdict copy() { return new SupremeVerdict(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/DemonicAppetite.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/DemonicAppetite.java index d467a009fb..efaaf2c58a 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/DemonicAppetite.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/DemonicAppetite.java @@ -25,20 +25,25 @@ * 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.*; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.SacrificeControllerEffect; import mage.abilities.effects.common.SacrificeTargetEffect; 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.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; import mage.target.TargetPermanent; import mage.target.common.TargetControlledCreaturePermanent; @@ -48,29 +53,27 @@ import mage.target.common.TargetControlledCreaturePermanent; */ public class DemonicAppetite extends CardImpl { - public DemonicAppetite (UUID ownerId) { + public DemonicAppetite(UUID ownerId) { super(ownerId, 106, "Demonic Appetite", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{B}"); this.expansionSetCode = "ROE"; this.subtype.add("Aura"); - + // Enchant creature you control TargetPermanent auraTarget = new TargetControlledCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); - Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); + + // Enchanted creature gets +3/+3. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(3, 3, Duration.WhileOnBattlefield))); - ability = new BeginningOfUpkeepTriggeredAbility( - new DemonicAppetiteEffect(), - TargetController.YOU, - false); - ability.addTarget(new TargetControlledCreaturePermanent()); - this.addAbility(ability); + // At the beginning of your upkeep, sacrifice a creature. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeControllerEffect(new FilterCreaturePermanent("a creature"), 1, ""), + TargetController.YOU, false)); } - public DemonicAppetite (final DemonicAppetite card) { + public DemonicAppetite(final DemonicAppetite card) { super(card); } @@ -80,16 +83,16 @@ public class DemonicAppetite extends CardImpl { } } - class DemonicAppetiteEffect extends SacrificeTargetEffect { +class DemonicAppetiteEffect extends SacrificeTargetEffect { - DemonicAppetiteEffect() { - super(); - staticText = "sacrifice a creature"; - } + DemonicAppetiteEffect() { + super(); + staticText = "sacrifice a creature"; + } - @Override - public DemonicAppetiteEffect copy() { - return new DemonicAppetiteEffect(); - } + @Override + public DemonicAppetiteEffect copy() { + return new DemonicAppetiteEffect(); + } -} +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/LinvalaKeeperOfSilence.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/LinvalaKeeperOfSilence.java index a094002890..d67a300c38 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/LinvalaKeeperOfSilence.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/LinvalaKeeperOfSilence.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.riseoftheeldrazi; import java.util.UUID; @@ -48,7 +47,7 @@ import mage.game.permanent.Permanent; */ public class LinvalaKeeperOfSilence extends CardImpl { - public LinvalaKeeperOfSilence (UUID ownerId) { + public LinvalaKeeperOfSilence(UUID ownerId) { super(ownerId, 33, "Linvala, Keeper of Silence", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); this.expansionSetCode = "ROE"; this.supertype.add("Legendary"); @@ -57,12 +56,14 @@ public class LinvalaKeeperOfSilence extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(4); + // Flying this.addAbility(FlyingAbility.getInstance()); - + + // Activated abilities of creatures your opponents control can't be activated. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new LinvalaKeeperOfSilenceCantActivateEffect())); } - public LinvalaKeeperOfSilence (final LinvalaKeeperOfSilence card) { + public LinvalaKeeperOfSilence(final LinvalaKeeperOfSilence card) { super(card); } @@ -98,4 +99,4 @@ class LinvalaKeeperOfSilenceCantActivateEffect extends RestrictionEffect { return new LinvalaKeeperOfSilenceCantActivateEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/TrainingGrounds.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/TrainingGrounds.java index d1aeb9882d..9919547c67 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/TrainingGrounds.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/TrainingGrounds.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.riseoftheeldrazi; import java.util.LinkedHashSet; @@ -33,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.cards.CardImpl; @@ -56,14 +56,14 @@ import mage.util.CardUtil; */ public class TrainingGrounds extends CardImpl { - public TrainingGrounds (UUID ownerId) { + public TrainingGrounds(UUID ownerId) { super(ownerId, 91, "Training Grounds", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{U}"); this.expansionSetCode = "ROE"; this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new TrainingGroundsEffect())); } - public TrainingGrounds (final TrainingGrounds card) { + public TrainingGrounds(final TrainingGrounds card) { super(card); } @@ -74,7 +74,7 @@ public class TrainingGrounds extends CardImpl { } class TrainingGroundsEffect extends CostModificationEffectImpl { - + private static final String effectText = "Activated abilities of creatures you control cost up to {2} less to activate. This effect can't reduce the amount of mana an ability costs to activate to less than one mana"; private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(); @@ -90,41 +90,42 @@ class TrainingGroundsEffect extends CostModificationEffectImpl { @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 > 0 && mana.count() == mana.getColorless()){ + if (reduceMax > 0 && mana.count() == mana.getColorless()) { reduceMax--; } - if (reduceMax > 2){ + if (reduceMax > 2) { reduceMax = 2; } if (reduceMax > 0) { 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 ability cost"); - if(controller.choose(Outcome.Benefit, choice, game)){ + if (controller.choose(Outcome.Benefit, choice, game)) { int reduce = Integer.parseInt(choice.getChoice()); CardUtil.reduceCost(abilityToModify, reduce); } } return true; } - return false; + return false; } @Override public boolean applies(Ability abilityToModify, Ability source, Game game) { - if (abilityToModify.getAbilityType().equals(AbilityType.ACTIVATED)) { + if (abilityToModify.getAbilityType().equals(AbilityType.ACTIVATED) + || (abilityToModify.getAbilityType().equals(AbilityType.MANA) && (abilityToModify instanceof ActivatedAbility))) { //Activated abilities of creatures you control Permanent permanent = game.getPermanent(abilityToModify.getSourceId()); if (permanent != null && filter.match(permanent, source.getSourceId(), source.getControllerId(), game)) { - return true; + return true; } } return false; diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/FootstepsOfTheGoryo.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/FootstepsOfTheGoryo.java index d558731be7..1e3be38179 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/FootstepsOfTheGoryo.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/FootstepsOfTheGoryo.java @@ -32,15 +32,9 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.DelayedTriggeredAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; -import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; -import mage.abilities.effects.common.ExileTargetEffect; -import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; import mage.abilities.effects.common.SacrificeTargetEffect; -import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; -import mage.abilities.keyword.HasteAbility; import mage.cards.Card; import mage.cards.CardImpl; import mage.constants.*; @@ -62,7 +56,6 @@ public class FootstepsOfTheGoryo extends CardImpl { this.expansionSetCode = "SOK"; this.subtype.add("Arcane"); - // Return target creature card from your graveyard to the battlefield. Sacrifice that creature at the beginning of the next end step. this.getSpellAbility().addEffect(new FootstepsOfTheGoryoEffect()); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard())); @@ -104,8 +97,8 @@ class FootstepsOfTheGoryoEffect extends OneShotEffect { Permanent permanent = game.getPermanent(card.getId()); if (permanent != null) { // Sacrifice it at end of turn - Effect sacrificeEffect = new SacrificeTargetEffect("Sacrifice that creature at the beginning of next end step"); - sacrificeEffect.setTargetPointer(new FixedTarget(card.getId())); + Effect sacrificeEffect = new SacrificeTargetEffect("Sacrifice that creature at the beginning of next end step", source.getControllerId()); + sacrificeEffect.setTargetPointer(new FixedTarget(permanent, game)); DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect); delayedAbility.setSourceId(source.getSourceId()); delayedAbility.setControllerId(source.getControllerId()); diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/GodosIrregulars.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/GodosIrregulars.java index ed5fe602c3..f346e94a31 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/GodosIrregulars.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/GodosIrregulars.java @@ -34,11 +34,9 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; -import mage.constants.AbilityType; import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; -import mage.filter.Filter; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.BlockingAttackerIdPredicate; import mage.filter.predicate.permanent.BlockingPredicate; @@ -53,10 +51,13 @@ import mage.target.common.TargetCreaturePermanent; public class GodosIrregulars extends CardImpl { private static final FilterCreaturePermanent basicFilter = new FilterCreaturePermanent("creature blocking it"); + static { basicFilter.add(new BlockingPredicate()); } + public UUID originalAbilityIdToAdjust; + public GodosIrregulars(UUID ownerId) { super(ownerId, 101, "Godo's Irregulars", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{R}"); this.expansionSetCode = "SOK"; @@ -69,12 +70,13 @@ public class GodosIrregulars extends CardImpl { // {R}: Godo's Irregulars deals 1 damage to target creature blocking it. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{R")); ability.addTarget(new TargetCreaturePermanent()); + originalAbilityIdToAdjust = ability.getOriginalId(); this.addAbility(ability); } @Override public void adjustTargets(Ability ability, Game game) { - if (ability.getAbilityType().equals(AbilityType.ACTIVATED)) { + if (originalAbilityIdToAdjust.equals(ability.getOriginalId())) { ability.getTargets().clear(); FilterCreaturePermanent filter = basicFilter.copy(); filter.add(new BlockingAttackerIdPredicate(this.getId())); @@ -85,6 +87,7 @@ public class GodosIrregulars extends CardImpl { public GodosIrregulars(final GodosIrregulars card) { super(card); + this.originalAbilityIdToAdjust = card.originalAbilityIdToAdjust; } @Override diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/HailOfArrows.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/HailOfArrows.java index 337d1870e7..23e8f6e605 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/HailOfArrows.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/HailOfArrows.java @@ -34,7 +34,7 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.filter.common.FilterAttackingCreature; -import mage.target.common.TargetAttackingCreature; +import mage.target.common.TargetCreaturePermanentAmount; /** * @@ -46,10 +46,9 @@ public class HailOfArrows extends CardImpl { super(ownerId, 11, "Hail of Arrows", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{X}{W}"); this.expansionSetCode = "SOK"; - // Hail of Arrows deals X damage divided as you choose among any number of target attacking creatures. this.getSpellAbility().addEffect(new DamageMultiEffect(new ManacostVariableValue())); - this.getSpellAbility().addTarget(new TargetAttackingCreature(0, Integer.MAX_VALUE, new FilterAttackingCreature(), true)); + this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(new ManacostVariableValue(), new FilterAttackingCreature())); } public HailOfArrows(final HailOfArrows card) { diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/IvoryCraneNetsuke.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/IvoryCraneNetsuke.java index 0ab2b4e3fd..313615c5fa 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/IvoryCraneNetsuke.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/IvoryCraneNetsuke.java @@ -1,67 +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.saviorsofkamigawa; - -import java.util.UUID; -import mage.abilities.TriggeredAbility; -import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; -import mage.abilities.condition.common.CardsInHandCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.common.GainLifeEffect; -import mage.cards.CardImpl; -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.constants.TargetController; -import mage.constants.Zone; - -/** - * - * @author LevelX2 - */ -public class IvoryCraneNetsuke extends CardImpl { - - public IvoryCraneNetsuke(UUID ownerId) { - super(ownerId, 155, "Ivory Crane Netsuke", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); - this.expansionSetCode = "SOK"; - - // At the beginning of your upkeep, if you have seven or more cards in hand, you gain 4 life. - TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(4), TargetController.YOU, false); - CardsInHandCondition contition = new CardsInHandCondition(CardsInHandCondition.CountType.MORE_THAN, 6); - this.addAbility(new ConditionalTriggeredAbility(ability, contition, "At the beginning of your upkeep, if you have seven or more cards in hand, you gain 4 life.")); - - } - - public IvoryCraneNetsuke(final IvoryCraneNetsuke card) { - super(card); - } - - @Override - public IvoryCraneNetsuke copy() { - return new IvoryCraneNetsuke(this); - } -} +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.saviorsofkamigawa; + +import java.util.UUID; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.condition.common.CardsInHandCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class IvoryCraneNetsuke extends CardImpl { + + public IvoryCraneNetsuke(UUID ownerId) { + super(ownerId, 155, "Ivory Crane Netsuke", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.expansionSetCode = "SOK"; + + // At the beginning of your upkeep, if you have seven or more cards in hand, you gain 4 life. + TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(4), TargetController.YOU, false); + CardsInHandCondition condition = new CardsInHandCondition(CardsInHandCondition.CountType.MORE_THAN, 6); + this.addAbility(new ConditionalTriggeredAbility(ability, condition, "At the beginning of your upkeep, if you have seven or more cards in hand, you gain 4 life.")); + + } + + public IvoryCraneNetsuke(final IvoryCraneNetsuke card) { + super(card); + } + + @Override + public IvoryCraneNetsuke copy() { + return new IvoryCraneNetsuke(this); + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/MagaTraitorToMortals.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/MagaTraitorToMortals.java index cde762b0da..fa2c2afda1 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/MagaTraitorToMortals.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/MagaTraitorToMortals.java @@ -98,7 +98,8 @@ class MagaTraitorToMortalsEnterBattlefieldEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { int amount = ((SpellAbility) obj).getManaCostsToPay().getX(); if (amount > 0) { permanent.addCounters(CounterType.P1P1.createInstance(amount), game); diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/RuneTailKitsuneAscendant.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/RuneTailKitsuneAscendant.java index ed256a3987..a1b8c7dd41 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/RuneTailKitsuneAscendant.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/RuneTailKitsuneAscendant.java @@ -61,7 +61,6 @@ public class RuneTailKitsuneAscendant extends CardImpl { this.toughness = new MageInt(2); this.flipCard = true; this.flipCardName = "Rune-Tail's Essence"; - // When you have 30 or more life, flip Rune-Tail, Kitsune Ascendant. this.addAbility(new RuneTailKitsuneAscendantFlipAbility()); @@ -103,22 +102,22 @@ class RuneTailKitsuneAscendantFlipAbility extends StateTriggeredAbility { @Override public String getRule() { - return "When you have 30 or more life, flip {this}"; + return "When you have 30 or more life, flip {this}."; } } class RuneTailEssence extends Token { - RuneTailEssence() { super("Rune-Tail's Essence", ""); supertype.add("Legendary"); cardType.add(CardType.ENCHANTMENT); - + color.setWhite(true); // Prevent all damage that would be dealt to creatures you control. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PreventAllDamageToAllEffect(Duration.WhileOnBattlefield, new FilterControlledCreatureInPlay()))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new PreventAllDamageToAllEffect(Duration.WhileOnBattlefield, new FilterControlledCreatureInPlay("creatures you control")))); } } diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/WineOfBloodAndIron.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/WineOfBloodAndIron.java index 2a831a03a0..bfe6007c45 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/WineOfBloodAndIron.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/WineOfBloodAndIron.java @@ -30,23 +30,19 @@ package mage.sets.saviorsofkamigawa; 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.abilities.Ability; -import mage.abilities.DelayedTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.dynamicvalue.common.TargetPermanentPowerCount; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.SacrificeTargetEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; -import mage.game.Game; import mage.target.common.TargetCreaturePermanent; -import mage.target.targetpointer.FixedTarget; /** * @@ -62,7 +58,10 @@ public class WineOfBloodAndIron extends CardImpl { SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(new TargetPermanentPowerCount(), new StaticValue(0), Duration.EndOfTurn, true), new GenericManaCost(4)); - ability.addEffect(new WineOfBloodAndIronEffect()); + Effect effect = new CreateDelayedTriggeredAbilityEffect( + new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new SacrificeSourceEffect()), false); + effect.setText("Sacrifice {this} at the beginning of the next end step"); + ability.addEffect(effect); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); } @@ -76,32 +75,3 @@ public class WineOfBloodAndIron extends CardImpl { return new WineOfBloodAndIron(this); } } - -class WineOfBloodAndIronEffect extends OneShotEffect { - - public WineOfBloodAndIronEffect() { - super(Outcome.Sacrifice); - this.staticText = "Sacrifice {this} at the beginning of the next end step"; - } - - public WineOfBloodAndIronEffect(final WineOfBloodAndIronEffect effect) { - super(effect); - } - - @Override - public WineOfBloodAndIronEffect copy() { - return new WineOfBloodAndIronEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice this"); - sacrificeEffect.setTargetPointer(new FixedTarget(source.getSourceId())); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); - return true; - } -} diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/ArgentSphinx.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/ArgentSphinx.java index 3863832e51..aa0a0daaab 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/ArgentSphinx.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/ArgentSphinx.java @@ -31,14 +31,15 @@ import java.util.UUID; import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.ActivateIfConditionActivatedAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; -import mage.abilities.costs.common.MetalcraftCost; +import mage.abilities.condition.common.MetalcraftCondition; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ReturnFromExileEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; +import mage.constants.AbilityWord; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; @@ -59,9 +60,13 @@ public class ArgentSphinx extends CardImpl { this.power = new MageInt(4); this.toughness = new MageInt(3); + + // Flying this.addAbility(FlyingAbility.getInstance()); - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ArgentSphinxEffect(), new ManaCostsImpl("{U}")); - ability.addCost(new MetalcraftCost()); + + // Metalcraft - {U}: Exile Argent Sphinx. Return it to the battlefield under your control at the beginning of the next end step. Activate this ability only if you control three or more artifacts. + Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new ArgentSphinxEffect(), new ManaCostsImpl("{U}"), MetalcraftCondition.getInstance()); + ability.setAbilityWord(AbilityWord.METALCRAFT); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/ChimericMass.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/ChimericMass.java index fe2675c496..e554b7b6c3 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/ChimericMass.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/ChimericMass.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,18 +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.scarsofmirrodin; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; +import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.SpellAbility; @@ -45,13 +41,16 @@ import mage.abilities.effects.OneShotEffect; 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; -import java.util.UUID; - /** * @author BetaSteward_at_googlemail.com */ @@ -60,10 +59,10 @@ public class ChimericMass extends CardImpl { public ChimericMass(UUID ownerId) { super(ownerId, 141, "Chimeric Mass", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{X}"); 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")); - + // {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))); } @@ -80,6 +79,7 @@ public class ChimericMass extends CardImpl { } class ChimericMassEffect extends OneShotEffect { + public ChimericMassEffect() { super(Outcome.Benefit); } @@ -93,9 +93,8 @@ class ChimericMassEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { - // delete to prevent using it again if put into battlefield from other effect - setValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY, null); + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { int amount = ((SpellAbility) obj).getManaCostsToPay().getX(); if (amount > 0) { permanent.addCounters(CounterType.CHARGE.createInstance(amount), game); diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/MoltenPsyche.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/MoltenPsyche.java index 9b944c4268..42122cfa4c 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/MoltenPsyche.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/MoltenPsyche.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,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. @@ -28,18 +28,18 @@ package mage.sets.scarsofmirrodin; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; import java.util.Map.Entry; import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.condition.common.MetalcraftCondition; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.WatcherScope; -import mage.abilities.Ability; -import mage.abilities.condition.common.MetalcraftCondition; -import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -56,7 +56,6 @@ public class MoltenPsyche extends CardImpl { super(ownerId, 98, "Molten Psyche", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{1}{R}{R}"); this.expansionSetCode = "SOM"; - // Each player shuffles the cards from his or her hand into his or her library, then draws that many cards. // Metalcraft - If you control three or more artifacts, Molten Psyche deals damage to each opponent equal to the number of cards that player has drawn this turn. this.getSpellAbility().addEffect(new MoltenPsycheEffect()); @@ -78,8 +77,8 @@ class MoltenPsycheEffect extends OneShotEffect { public MoltenPsycheEffect() { super(Outcome.Neutral); - staticText = "Each player shuffles the cards from his or her hand into his or her library, then draws that many cards.\n" + - "Metalcraft - If you control three or more artifacts, {this} deals damage to each opponent equal to the number of cards that player has drawn this turn."; + staticText = "Each player shuffles the cards from his or her hand into his or her library, then draws that many cards.\n" + + "Metalcraft - If you control three or more artifacts, {this} deals damage to each opponent equal to the number of cards that player has drawn this turn."; } public MoltenPsycheEffect(final MoltenPsycheEffect effect) { @@ -88,27 +87,43 @@ class MoltenPsycheEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player sourcePlayer = game.getPlayer(source.getControllerId()); - for (UUID playerId: sourcePlayer.getInRange()) { - Player player = game.getPlayer(playerId); - if (player != null) { - int count = player.getHand().size(); - for (Card card: player.getHand().getCards(game)) { - if (card != null) { - player.removeFromHand(card, game); - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Map cardsToDraw = new LinkedHashMap<>(); + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null) { + int cardsInHand = player.getHand().size(); + if (cardsInHand > 0) { + cardsToDraw.put(playerId, cardsInHand); } - } - game.informPlayers(player.getLogName() + " shuffles the cards from his or her hand into his or her library"); - player.shuffleLibrary(game); - player.drawCards(count, game); - if (MetalcraftCondition.getInstance().apply(game, source) && !playerId.equals(source.getControllerId())) { - MoltenPsycheWatcher watcher = (MoltenPsycheWatcher) game.getState().getWatchers().get("CardsDrawn"); - player.damage(watcher.getDraws(playerId), source.getSourceId(), game, false, true); + player.moveCards(player.getHand(), Zone.HAND, Zone.LIBRARY, source, game); + player.shuffleLibrary(game); } } + for (UUID playerId : cardsToDraw.keySet()) { + Player player = game.getPlayer(playerId); + if (player != null) { + player.drawCards(cardsToDraw.get(playerId), game); + if (MetalcraftCondition.getInstance().apply(game, source) && !playerId.equals(source.getControllerId())) { + MoltenPsycheWatcher watcher = (MoltenPsycheWatcher) game.getState().getWatchers().get("CardsDrawn"); + player.damage(watcher.getDraws(playerId), source.getSourceId(), game, false, true); + } + } + } + if (MetalcraftCondition.getInstance().apply(game, source)) { + MoltenPsycheWatcher watcher = (MoltenPsycheWatcher) game.getState().getWatchers().get("CardsDrawn"); + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { + Player player = game.getPlayer(playerId); + if (player != null) { + player.damage(watcher.getDraws(playerId), source.getSourceId(), game, false, true); + } + } + } + return true; } - return true; + + return false; } @Override @@ -128,7 +143,7 @@ class MoltenPsycheWatcher extends Watcher { public MoltenPsycheWatcher(final MoltenPsycheWatcher watcher) { super(watcher); - for (Entry entry: watcher.draws.entrySet()) { + for (Entry entry : watcher.draws.entrySet()) { draws.put(entry.getKey(), entry.getValue()); } } diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/MoxOpal.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/MoxOpal.java index d6e2c90023..dc3280e7fb 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/MoxOpal.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/MoxOpal.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,23 @@ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.scarsofmirrodin; -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.abilities.Ability; -import mage.abilities.costs.common.MetalcraftCost; -import mage.cards.CardImpl; - import java.util.UUID; +import mage.abilities.Ability; import mage.abilities.condition.common.MetalcraftCondition; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.AddManaOfAnyColorEffect; import mage.abilities.mana.ActivateIfConditionManaAbility; +import mage.cards.CardImpl; import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.Rarity; import mage.constants.Zone; /** @@ -54,8 +51,8 @@ public class MoxOpal extends CardImpl { this.expansionSetCode = "SOM"; Ability ability = new ActivateIfConditionManaAbility( - Zone.BATTLEFIELD, - new AddManaOfAnyColorEffect(), + Zone.BATTLEFIELD, + new AddManaOfAnyColorEffect(), new TapSourceCost(), MetalcraftCondition.getInstance()); ability.setAbilityWord(AbilityWord.METALCRAFT); diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/ShapeAnew.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/ShapeAnew.java index cef5f23b88..b02ce34d87 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/ShapeAnew.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/ShapeAnew.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.scarsofmirrodin; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Rarity; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.SacrificeTargetEffect; @@ -39,7 +35,9 @@ import mage.cards.Card; 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.predicate.mageobject.CardTypePredicate; @@ -60,16 +58,19 @@ public class ShapeAnew extends CardImpl { filter.add(new CardTypePredicate(CardType.ARTIFACT)); } - public ShapeAnew (UUID ownerId) { + public ShapeAnew(UUID ownerId) { super(ownerId, 43, "Shape Anew", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{U}"); this.expansionSetCode = "SOM"; - this.getSpellAbility().addEffect(new SacrificeTargetEffect()); + // The controller of target artifact sacrifices it, then reveals cards from the top + // of his or her library until he or she reveals an artifact card. That player puts + // that card onto the battlefield, then shuffles all other cards revealed this way into his or her library. + this.getSpellAbility().addEffect(new SacrificeTargetEffect("The controller of target artifact sacrifices it")); this.getSpellAbility().addTarget(new TargetPermanent(filter)); this.getSpellAbility().addEffect(new ShapeAnewEffect()); } - public ShapeAnew (final ShapeAnew card) { + public ShapeAnew(final ShapeAnew card) { super(card); } @@ -82,7 +83,7 @@ public class ShapeAnew extends CardImpl { public ShapeAnewEffect() { super(Outcome.PutCardInPlay); - staticText = "Then reveals cards from the top of his or her library until he or she reveals an artifact card. That player puts that card onto the battlefield, then shuffles all other cards revealed this way into his or her library"; + staticText = ", then reveals cards from the top of his or her library until he or she reveals an artifact card. That player puts that card onto the battlefield, then shuffles all other cards revealed this way into his or her library"; } public ShapeAnewEffect(ShapeAnewEffect effect) { @@ -102,9 +103,9 @@ public class ShapeAnew extends CardImpl { Cards revealed = new CardsImpl(); Card artifactCard = null; Cards nonArtifactCards = new CardsImpl(); - Player player = game.getPlayer(sourcePermanent.getControllerId()); - while (artifactCard == null && player.getLibrary().size() > 0) { - Card card = player.getLibrary().removeFromTop(game); + Player targetController = game.getPlayer(sourcePermanent.getControllerId()); + while (artifactCard == null && targetController.getLibrary().size() > 0) { + Card card = targetController.getLibrary().removeFromTop(game); revealed.add(card); if (card.getCardType().contains(CardType.ARTIFACT)) { artifactCard = card; @@ -112,14 +113,12 @@ public class ShapeAnew extends CardImpl { nonArtifactCards.add(card); } } - player.revealCards("Shape Anew", revealed, game); + targetController.revealCards(sourcePermanent.getIdName(), revealed, game); if (artifactCard != null) { - artifactCard.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), player.getId()); + artifactCard.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), targetController.getId()); } - for (Card cardToMove: nonArtifactCards.getCards(game)) { - cardToMove.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); - } - player.shuffleLibrary(game); + targetController.moveCards(nonArtifactCards, null, Zone.LIBRARY, source, game); + targetController.shuffleLibrary(game); return true; } diff --git a/Mage.Sets/src/mage/sets/scourge/CoastWatcher.java b/Mage.Sets/src/mage/sets/scourge/CoastWatcher.java new file mode 100644 index 0000000000..3f18879838 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/CoastWatcher.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.scourge; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author LoneFox + */ +public class CoastWatcher extends CardImpl { + + private static final FilterCard filter = new FilterCard("green"); + + static { + filter.add(new ColorPredicate(ObjectColor.GREEN)); + } + + public CoastWatcher(UUID ownerId) { + super(ownerId, 30, "Coast Watcher", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "SCG"; + this.subtype.add("Bird"); + this.subtype.add("Soldier"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // protection from green + this.addAbility(new ProtectionAbility(filter)); + } + + public CoastWatcher(final CoastWatcher card) { + super(card); + } + + @Override + public CoastWatcher copy() { + return new CoastWatcher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/scourge/DragonTyrant.java b/Mage.Sets/src/mage/sets/scourge/DragonTyrant.java new file mode 100644 index 0000000000..a38f487903 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/DragonTyrant.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.scourge; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.DoubleStrikeAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; + +/** + * + * @author LoneFox + */ +public class DragonTyrant extends CardImpl { + + public DragonTyrant(UUID ownerId) { + super(ownerId, 88, "Dragon Tyrant", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{8}{R}{R}"); + this.expansionSetCode = "SCG"; + this.subtype.add("Dragon"); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Trample + this.addAbility(TrampleAbility.getInstance()); + // Double strike + this.addAbility(DoubleStrikeAbility.getInstance()); + // At the beginning of your upkeep, sacrifice Dragon Tyrant unless you pay {R}{R}{R}{R}. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ManaCostsImpl("{R}{R}{R}{R}")), TargetController.YOU, false)); + // {R}: Dragon Tyrant gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}"))); + } + + public DragonTyrant(final DragonTyrant card) { + super(card); + } + + @Override + public DragonTyrant copy() { + return new DragonTyrant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/scourge/PemminsAura.java b/Mage.Sets/src/mage/sets/scourge/PemminsAura.java new file mode 100644 index 0000000000..82fb31f25e --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/PemminsAura.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.scourge; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.UntapEnchantedEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ShroudAbility; +import mage.cards.CardImpl; +import mage.choices.Choice; +import mage.choices.ChoiceImpl; +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.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class PemminsAura extends CardImpl { + + public PemminsAura(UUID ownerId) { + super(ownerId, 45, "Pemmin's Aura", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}{U}"); + this.expansionSetCode = "SCG"; + 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); + + // {U}: Untap enchanted creature. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapEnchantedEffect(), new ManaCostsImpl("{U}"))); + + // {U}: Enchanted creature gains flying until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), + AttachmentType.AURA, Duration.EndOfTurn), new ManaCostsImpl("{U}"))); + + // {U}: Enchanted creature gains shroud until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ShroudAbility.getInstance(), + AttachmentType.AURA, Duration.EndOfTurn), new ManaCostsImpl("{U}"))); + + // {1}: Enchanted creature gets +1/-1 or -1/+1 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new PemminsAuraBoostEnchantedEffect(), new ManaCostsImpl("U"))); + } + + public PemminsAura(final PemminsAura card) { + super(card); + } + + @Override + public PemminsAura copy() { + return new PemminsAura(this); + } +} + +class PemminsAuraBoostEnchantedEffect extends OneShotEffect { + + private static String CHOICE_1 = "+1/-1"; + private static String CHOICE_2 = "-1/+1"; + + public PemminsAuraBoostEnchantedEffect() { + super(Outcome.BoostCreature); + this.staticText = "Enchanted creature gets +1/-1 or -1/+1 until end of turn"; + } + + public PemminsAuraBoostEnchantedEffect(final PemminsAuraBoostEnchantedEffect effect) { + super(effect); + } + + @Override + public PemminsAuraBoostEnchantedEffect copy() { + return new PemminsAuraBoostEnchantedEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent enchantment = game.getPermanent(source.getSourceId()); + Permanent creature = game.getPermanent(enchantment.getAttachedTo()); + if (controller != null && creature != null) { + Choice choice = new ChoiceImpl(true); + choice.setMessage("Select how to boost"); + choice.getChoices().add(CHOICE_1); + choice.getChoices().add(CHOICE_2); + while (!choice.isChosen()) { + if (!controller.canRespond()) { + return false; + } + controller.choose(outcome, choice, game); + } + if (choice.getChoice().equals(CHOICE_1)) { + game.addEffect(new BoostEnchantedEffect(+1, -1, Duration.EndOfTurn), source); + } else { + game.addEffect(new BoostEnchantedEffect(-1, +1, Duration.EndOfTurn), source); + } + return true; + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/scourge/ScornfulEgotist.java b/Mage.Sets/src/mage/sets/scourge/ScornfulEgotist.java new file mode 100644 index 0000000000..f5957b2a37 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/ScornfulEgotist.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.scourge; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ScornfulEgotist extends CardImpl { + + public ScornfulEgotist(UUID ownerId) { + super(ownerId, 50, "Scornful Egotist", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{7}{U}"); + this.expansionSetCode = "SCG"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Morph {U} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{U}"))); + } + + public ScornfulEgotist(final ScornfulEgotist card) { + super(card); + } + + @Override + public ScornfulEgotist copy() { + return new ScornfulEgotist(this); + } +} diff --git a/Mage.Sets/src/mage/sets/scourge/TitanicBulvox.java b/Mage.Sets/src/mage/sets/scourge/TitanicBulvox.java new file mode 100644 index 0000000000..aab3a38e80 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/TitanicBulvox.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.scourge; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.TrampleAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class TitanicBulvox extends CardImpl { + + public TitanicBulvox(UUID ownerId) { + super(ownerId, 129, "Titanic Bulvox", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{6}{G}{G}"); + this.expansionSetCode = "SCG"; + this.subtype.add("Beast"); + this.power = new MageInt(7); + this.toughness = new MageInt(4); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + // Morph {4}{G}{G}{G} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{4}{G}{G}{G}"))); + } + + public TitanicBulvox(final TitanicBulvox card) { + super(card); + } + + @Override + public TitanicBulvox copy() { + return new TitanicBulvox(this); + } +} diff --git a/Mage.Sets/src/mage/sets/scourge/ZombieCutthroat.java b/Mage.Sets/src/mage/sets/scourge/ZombieCutthroat.java new file mode 100644 index 0000000000..df1c6374f4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/ZombieCutthroat.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.scourge; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ZombieCutthroat extends CardImpl { + + public ZombieCutthroat(UUID ownerId) { + super(ownerId, 81, "Zombie Cutthroat", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + this.expansionSetCode = "SCG"; + this.subtype.add("Zombie"); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Morph-Pay 5 life. + this.addAbility(new MorphAbility(this, new PayLifeCost(5))); + } + + public ZombieCutthroat(final ZombieCutthroat card) { + super(card); + } + + @Override + public ZombieCutthroat copy() { + return new ZombieCutthroat(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shadowmoor/ImpromptuRaid.java b/Mage.Sets/src/mage/sets/shadowmoor/ImpromptuRaid.java index 95e7154728..690b42690d 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/ImpromptuRaid.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/ImpromptuRaid.java @@ -52,6 +52,7 @@ import mage.filter.FilterCard; 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.targetpointer.FixedTarget; @@ -117,16 +118,19 @@ class ImpromptuRaidEffect extends OneShotEffect { return true; } if (controller.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId())) { - ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn); - effect.setTargetPointer(new FixedTarget(card.getId())); - game.addEffect(effect, source); - SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect(); - sacrificeEffect.setTargetPointer(new FixedTarget(card.getId())); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); + Permanent permanent = game.getPermanent(card.getId()); + if (permanent != null) { + ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn); + effect.setTargetPointer(new FixedTarget(permanent, game)); + game.addEffect(effect, source); + SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("", source.getControllerId()); + sacrificeEffect.setTargetPointer(new FixedTarget(permanent, game)); + DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(game), game); + game.addDelayedTriggeredAbility(delayedAbility); + } return true; } } diff --git a/Mage.Sets/src/mage/sets/shardsofalara/FeralHydra.java b/Mage.Sets/src/mage/sets/shardsofalara/FeralHydra.java index f4d54f31c0..c79740b735 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/FeralHydra.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/FeralHydra.java @@ -28,7 +28,6 @@ package mage.sets.shardsofalara; import java.util.UUID; -import static javax.xml.bind.JAXBIntrospector.getValue; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.SpellAbility; @@ -66,7 +65,7 @@ public class FeralHydra extends CardImpl { // Feral Hydra enters the battlefield with X +1/+1 counters on it. this.addAbility(new EntersBattlefieldAbility(new FeralHydraEffect(), true)); // {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}")); + SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl("{3}")); ability.setMayActivate(TargetController.ANY); ability.addEffect(new InfoEffect("Any player may activate this ability")); this.addAbility(ability); @@ -82,7 +81,6 @@ public class FeralHydra extends CardImpl { } } - class FeralHydraEffect extends OneShotEffect { public FeralHydraEffect() { @@ -99,10 +97,9 @@ class FeralHydraEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { Object obj = getValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { - // 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)obj).getManaCostsToPay().getX(); + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { + int amount = ((SpellAbility) obj).getManaCostsToPay().getX(); if (amount > 0) { permanent.addCounters(CounterType.P1P1.createInstance(amount), game); } @@ -115,4 +112,4 @@ class FeralHydraEffect extends OneShotEffect { public FeralHydraEffect copy() { return new FeralHydraEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/SigilOfDistinction.java b/Mage.Sets/src/mage/sets/shardsofalara/SigilOfDistinction.java index d7cb633473..a5c433e594 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/SigilOfDistinction.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/SigilOfDistinction.java @@ -25,14 +25,9 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.shardsofalara; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.abilities.Ability; import mage.abilities.SpellAbility; import mage.abilities.common.EntersBattlefieldAbility; @@ -44,11 +39,14 @@ import mage.abilities.effects.OneShotEffect; 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.counters.CounterType; import mage.game.Game; import mage.game.permanent.Permanent; - /** * @author Loki */ @@ -82,6 +80,7 @@ public class SigilOfDistinction extends CardImpl { } class SigilOfDistinctionEffect extends OneShotEffect { + public SigilOfDistinctionEffect() { super(Outcome.Benefit); } @@ -95,9 +94,8 @@ class SigilOfDistinctionEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { - // delete to prevent using it again if put into battlefield from other effect - setValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY, null); + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { int amount = ((SpellAbility) obj).getManaCostsToPay().getX(); if (amount > 0) { permanent.addCounters(CounterType.CHARGE.createInstance(amount), game); diff --git a/Mage.Sets/src/mage/sets/stronghold/FlowstoneShambler.java b/Mage.Sets/src/mage/sets/stronghold/FlowstoneShambler.java new file mode 100644 index 0000000000..b64a081c05 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/FlowstoneShambler.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.stronghold; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class FlowstoneShambler extends mage.sets.ninthedition.FlowstoneShambler { + + public FlowstoneShambler(UUID ownerId) { + super(ownerId); + this.cardNumber = 86; + this.expansionSetCode = "STH"; + } + + public FlowstoneShambler(final FlowstoneShambler card) { + super(card); + } + + @Override + public FlowstoneShambler copy() { + return new FlowstoneShambler(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/Heartstone.java b/Mage.Sets/src/mage/sets/stronghold/Heartstone.java index 4b4af5e2c9..0d530dfacd 100644 --- a/Mage.Sets/src/mage/sets/stronghold/Heartstone.java +++ b/Mage.Sets/src/mage/sets/stronghold/Heartstone.java @@ -30,6 +30,7 @@ package mage.sets.stronghold; 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.cards.CardImpl; @@ -99,7 +100,8 @@ class HeartstoneEffect extends CostModificationEffectImpl { @Override public boolean applies(Ability abilityToModify, Ability source, Game game) { - if (abilityToModify.getAbilityType().equals(AbilityType.ACTIVATED)) { + if (abilityToModify.getAbilityType().equals(AbilityType.ACTIVATED) + || (abilityToModify.getAbilityType().equals(AbilityType.MANA) && (abilityToModify instanceof ActivatedAbility))) { // Activated abilities of creatures Permanent permanent = game.getPermanent(abilityToModify.getSourceId()); if (permanent != null && filter.match(permanent, source.getSourceId(), source.getControllerId(), game)) { diff --git a/Mage.Sets/src/mage/sets/stronghold/MindGames.java b/Mage.Sets/src/mage/sets/stronghold/MindGames.java new file mode 100644 index 0000000000..4c8062a91e --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/MindGames.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.abilities.effects.common.TapTargetEffect; +import mage.abilities.keyword.BuybackAbility; +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 fireshoes + */ +public class MindGames extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("artifact, creature, or land"); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.ARTIFACT), + new CardTypePredicate(CardType.CREATURE), + new CardTypePredicate(CardType.LAND))); + } + + public MindGames(UUID ownerId) { + super(ownerId, 38, "Mind Games", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}"); + this.expansionSetCode = "STH"; + + // Buyback {2}{U} + this.addAbility(new BuybackAbility("{3}")); + + // Tap target artifact, creature, or land. + this.getSpellAbility().addEffect(new TapTargetEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + } + + public MindGames(final MindGames card) { + super(card); + } + + @Override + public MindGames copy() { + return new MindGames(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/SkyshroudTroopers.java b/Mage.Sets/src/mage/sets/stronghold/SkyshroudTroopers.java new file mode 100644 index 0000000000..7bcca63757 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/SkyshroudTroopers.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.MageInt; +import mage.abilities.mana.GreenManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class SkyshroudTroopers extends CardImpl { + + public SkyshroudTroopers(UUID ownerId) { + super(ownerId, 65, "Skyshroud Troopers", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "STH"; + this.subtype.add("Elf"); + this.subtype.add("Druid"); + this.subtype.add("Warrior"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {tap}: Add {G} to your mana pool. + this.addAbility(new GreenManaAbility()); + } + + public SkyshroudTroopers(final SkyshroudTroopers card) { + super(card); + } + + @Override + public SkyshroudTroopers copy() { + return new SkyshroudTroopers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/SpindriftDrake.java b/Mage.Sets/src/mage/sets/stronghold/SpindriftDrake.java new file mode 100644 index 0000000000..85e148eca4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/SpindriftDrake.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.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; + +/** + * + * @author LoneFox + */ +public class SpindriftDrake extends CardImpl { + + public SpindriftDrake(UUID ownerId) { + super(ownerId, 44, "Spindrift Drake", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{U}"); + this.expansionSetCode = "STH"; + this.subtype.add("Drake"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // At the beginning of your upkeep, sacrifice Spindrift Drake unless you pay {U}. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ManaCostsImpl("{U}")), TargetController.YOU, false)); + } + + public SpindriftDrake(final SpindriftDrake card) { + super(card); + } + + @Override + public SpindriftDrake copy() { + return new SpindriftDrake(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/TorturedExistence.java b/Mage.Sets/src/mage/sets/stronghold/TorturedExistence.java new file mode 100644 index 0000000000..8c9bb1aea4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/TorturedExistence.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.ReturnFromGraveyardToHandTargetEffect; +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 fireshoes + */ +public class TorturedExistence extends CardImpl { + + public TorturedExistence(UUID ownerId) { + super(ownerId, 24, "Tortured Existence", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{B}"); + this.expansionSetCode = "STH"; + + // {B}, Discard a creature card: Return target creature card from your graveyard to your hand. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToHandTargetEffect(), new ManaCostsImpl("{B}")); + ability.addCost(new DiscardCardCost(new FilterCreatureCard())); + ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))); + this.addAbility(ability); + } + + public TorturedExistence(final TorturedExistence card) { + super(card); + } + + @Override + public TorturedExistence copy() { + return new TorturedExistence(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/CommanderGrevenIlVec.java b/Mage.Sets/src/mage/sets/tempest/CommanderGrevenIlVec.java index 1ca56981e1..b7e5293c30 100644 --- a/Mage.Sets/src/mage/sets/tempest/CommanderGrevenIlVec.java +++ b/Mage.Sets/src/mage/sets/tempest/CommanderGrevenIlVec.java @@ -31,12 +31,11 @@ import java.util.UUID; import mage.constants.CardType; import mage.constants.Rarity; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.common.SacrificeTargetEffect; +import mage.abilities.effects.common.SacrificeControllerEffect; import mage.abilities.keyword.FearAbility; import mage.cards.CardImpl; -import mage.target.common.TargetControlledCreaturePermanent; +import mage.filter.common.FilterCreaturePermanent; /** * @@ -53,10 +52,12 @@ public class CommanderGrevenIlVec extends CardImpl { this.power = new MageInt(7); this.toughness = new MageInt(5); - Ability ability = new EntersBattlefieldTriggeredAbility(new SacrificeTargetEffect(), false); - ability.addTarget(new TargetControlledCreaturePermanent()); - this.addAbility(ability); + + // Fear (This creature can't be blocked except by artifact creatures and/or black creatures.) this.addAbility(FearAbility.getInstance()); + + // When Commander Greven il-Vec enters the battlefield, sacrifice a creature. + this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeControllerEffect(new FilterCreaturePermanent(), 1, ""), false)); } public CommanderGrevenIlVec(final CommanderGrevenIlVec card) { diff --git a/Mage.Sets/src/mage/sets/tempest/HandToHand.java b/Mage.Sets/src/mage/sets/tempest/HandToHand.java new file mode 100644 index 0000000000..0e6ce50ad7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/HandToHand.java @@ -0,0 +1,118 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those 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.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; +import mage.abilities.mana.ManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TurnPhase; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; + +/** + * + * @author fireshoes + */ +public class HandToHand extends CardImpl { + + public HandToHand(UUID ownerId) { + super(ownerId, 180, "Hand to Hand", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); + this.expansionSetCode = "TMP"; + + // During combat, players can't cast instant spells or activate abilities that aren't mana abilities. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new HandToHandEffect())); + } + + public HandToHand(final HandToHand card) { + super(card); + } + + @Override + public HandToHand copy() { + return new HandToHand(this); + } +} + +class HandToHandEffect extends ContinuousRuleModifyingEffectImpl { + + public HandToHandEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment); + staticText = "During combat, players can't cast instant spells or activate abilities that aren't mana abilities"; + } + + public HandToHandEffect(final HandToHandEffect effect) { + super(effect); + } + + @Override + public HandToHandEffect copy() { + return new HandToHandEffect(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 "During combat, players can't cast instant spells or activate abilities that aren't mana abilities (" + mageObject.getLogName() + ")."; + } + return null; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (game.getPhase().getType() == TurnPhase.COMBAT) { + MageObject object = game.getObject(event.getSourceId()); + if (event.getType() == GameEvent.EventType.CAST_SPELL) { + if (object.getCardType().contains(CardType.INSTANT)) { + return true; + } + } + if (event.getType() == GameEvent.EventType.ACTIVATE_ABILITY) { + Ability ability = game.getAbility(event.getTargetId(), event.getSourceId()); + if (ability != null && !(ability instanceof ManaAbility)) { + return true; + } + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/Krakilin.java b/Mage.Sets/src/mage/sets/tempest/Krakilin.java index 08f6c05747..5b7ee1a1c4 100644 --- a/Mage.Sets/src/mage/sets/tempest/Krakilin.java +++ b/Mage.Sets/src/mage/sets/tempest/Krakilin.java @@ -60,7 +60,7 @@ public class Krakilin extends CardImpl { // Krakilin enters the battlefield with X +1/+1 counters on it. this.addAbility(new EntersBattlefieldAbility(new KrakilinEffect())); - + // {1}{G}: Regenerate Krakilin. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{1}{G}"))); } @@ -91,10 +91,9 @@ class KrakilinEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { Object obj = getValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { - // 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)obj).getManaCostsToPay().getX(); + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { + int amount = ((SpellAbility) obj).getManaCostsToPay().getX(); if (amount > 0) { permanent.addCounters(CounterType.P1P1.createInstance(amount), game); } @@ -107,4 +106,4 @@ class KrakilinEffect extends OneShotEffect { public KrakilinEffect copy() { return new KrakilinEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/tempest/Lobotomy.java b/Mage.Sets/src/mage/sets/tempest/Lobotomy.java index f96e3c8b7b..e666c50d0e 100644 --- a/Mage.Sets/src/mage/sets/tempest/Lobotomy.java +++ b/Mage.Sets/src/mage/sets/tempest/Lobotomy.java @@ -46,8 +46,8 @@ import mage.filter.predicate.mageobject.NamePredicate; import mage.filter.predicate.mageobject.SupertypePredicate; import mage.game.Game; import mage.players.Player; +import mage.target.TargetCard; import mage.target.TargetPlayer; -import mage.target.common.TargetCardInHand; import mage.target.common.TargetCardInLibrary; /** @@ -100,13 +100,13 @@ class LobotomyEffect extends OneShotEffect { if (targetPlayer != null && sourceObject != null && controller != null) { // reveal hand of target player - targetPlayer.revealCards(sourceObject.getName(), targetPlayer.getHand(), game); + targetPlayer.revealCards(sourceObject.getIdName(), targetPlayer.getHand(), game); // You choose card other than a basic land card - TargetCardInHand target = new TargetCardInHand(filter); + TargetCard target = new TargetCard(Zone.HAND, filter); target.setNotTarget(true); Card chosenCard = null; - if (controller.choose(Outcome.Benefit, targetPlayer.getHand(), target, game)) { + if (controller.chooseTarget(Outcome.Benefit, targetPlayer.getHand(), target, source, game)) { chosenCard = game.getCard(target.getFirstTarget()); } @@ -115,6 +115,7 @@ class LobotomyEffect extends OneShotEffect { FilterCard filterNamedCards = new FilterCard(); if (chosenCard != null) { filterNamedCards.add(new NamePredicate(chosenCard.getName())); + filterNamedCards.setMessage("cards named " + chosenCard.getName()); } else { filterNamedCards.add(new NamePredicate("----")); // so no card matches } @@ -129,8 +130,8 @@ class LobotomyEffect extends OneShotEffect { } } // search cards in hand - TargetCardInHand targetCardsHand = new TargetCardInHand(0, Integer.MAX_VALUE, filterNamedCards); - controller.chooseTarget(outcome, targetPlayer.getGraveyard(), targetCardsHand, source, game); + TargetCard targetCardsHand = new TargetCard(0, Integer.MAX_VALUE, Zone.HAND, filterNamedCards); + controller.chooseTarget(outcome, targetPlayer.getHand(), targetCardsHand, source, game); for (UUID cardId : targetCardsHand.getTargets()) { Card card = game.getCard(cardId); if (card != null) { @@ -153,7 +154,7 @@ class LobotomyEffect extends OneShotEffect { } if (!cardsToExile.isEmpty()) { - controller.moveCards(cardsToExile, null, Zone.EXILED, source, game, true); + controller.moveCards(cardsToExile, null, Zone.EXILED, source, game); } targetPlayer.shuffleLibrary(game); return true; diff --git a/Mage.Sets/src/mage/sets/tempest/MarbleTitan.java b/Mage.Sets/src/mage/sets/tempest/MarbleTitan.java new file mode 100644 index 0000000000..77aca3a45d --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/MarbleTitan.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.tempest; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.DontUntapInControllersUntapStepAllEffect; +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.Filter; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; + +/** + * + * @author LoneFox + */ +public class MarbleTitan extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures with power 3 or greater"); + + static { + filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 2)); + } + + public MarbleTitan(UUID ownerId) { + super(ownerId, 240, "Marble Titan", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "TMP"; + this.subtype.add("Giant"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Creatures with power 3 or greater don't untap during their controllers' untap steps. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepAllEffect(Duration.WhileOnBattlefield, TargetController.ANY, filter))); + } + + public MarbleTitan(final MarbleTitan card) { + super(card); + } + + @Override + public MarbleTitan copy() { + return new MarbleTitan(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/ScaldingTongs.java b/Mage.Sets/src/mage/sets/tempest/ScaldingTongs.java new file mode 100644 index 0000000000..fd52fed1e1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/ScaldingTongs.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.tempest; + +import java.util.UUID; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.condition.common.CardsInHandCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.target.common.TargetOpponent; + +/** + * + * @author fireshoes + */ +public class ScaldingTongs extends CardImpl { + + public ScaldingTongs(UUID ownerId) { + super(ownerId, 297, "Scalding Tongs", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.expansionSetCode = "TMP"; + + // At the beginning of your upkeep, if you have three or fewer cards in hand, Scalding Tongs deals 1 damage to target opponent. + TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), TargetController.YOU, false); + ability.addTarget(new TargetOpponent()); + CardsInHandCondition condition = new CardsInHandCondition(CardsInHandCondition.CountType.FEWER_THAN, 4); + this.addAbility(new ConditionalTriggeredAbility(ability, condition, "At the beginning of your upkeep, if you have three or fewer cards in hand, {this} deals 1 damage to target opponent.")); + } + + public ScaldingTongs(final ScaldingTongs card) { + super(card); + } + + @Override + public ScaldingTongs copy() { + return new ScaldingTongs(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/ScrollRack.java b/Mage.Sets/src/mage/sets/tempest/ScrollRack.java index 4d5ece4139..db4100fe0e 100644 --- a/Mage.Sets/src/mage/sets/tempest/ScrollRack.java +++ b/Mage.Sets/src/mage/sets/tempest/ScrollRack.java @@ -27,6 +27,7 @@ */ package mage.sets.tempest; +import java.util.Set; import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; @@ -110,7 +111,11 @@ class ScrollRackEffect extends OneShotEffect { } // Put that many cards from the top of your library into your hand. if (amountExiled > 0) { - controller.moveCards(controller.getLibrary().getTopCards(game, amountExiled), null, Zone.HAND, source, game, false); + Set cards = controller.getLibrary().getTopCards(game, amountExiled); + for (Card card : cards) { + card.setFaceDown(true, game); + } + controller.moveCards(cards, null, Zone.HAND, source, game); } // Then look at the exiled cards and put them on top of your library in any order controller.putCardsOnTopOfLibrary(game.getExile().getExileZone(source.getSourceId()), game, source, true); diff --git a/Mage.Sets/src/mage/sets/tempest/ServantOfVolrath.java b/Mage.Sets/src/mage/sets/tempest/ServantOfVolrath.java index ac860ea4ce..7010697b90 100644 --- a/Mage.Sets/src/mage/sets/tempest/ServantOfVolrath.java +++ b/Mage.Sets/src/mage/sets/tempest/ServantOfVolrath.java @@ -29,13 +29,12 @@ package mage.sets.tempest; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.common.LeavesBattlefieldTriggeredAbility; -import mage.abilities.effects.common.SacrificeTargetEffect; +import mage.abilities.effects.common.SacrificeControllerEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.target.common.TargetControlledCreaturePermanent; +import mage.filter.common.FilterCreaturePermanent; /** * @@ -51,11 +50,9 @@ public class ServantOfVolrath extends CardImpl { this.toughness = new MageInt(3); // When Servant of Volrath leaves the battlefield, sacrifice a creature. - Ability ability = new LeavesBattlefieldTriggeredAbility(new SacrificeTargetEffect(), false); - ability.addTarget(new TargetControlledCreaturePermanent()); - this.addAbility(ability); + this.addAbility(new LeavesBattlefieldTriggeredAbility(new SacrificeControllerEffect(new FilterCreaturePermanent(), 1, ""), false)); } - + public ServantOfVolrath(final ServantOfVolrath card) { super(card); } diff --git a/Mage.Sets/src/mage/sets/tempest/SoltariCrusader.java b/Mage.Sets/src/mage/sets/tempest/SoltariCrusader.java new file mode 100644 index 0000000000..18f8c63619 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/SoltariCrusader.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.tempest; + +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.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 SoltariCrusader extends CardImpl { + + public SoltariCrusader(UUID ownerId) { + super(ownerId, 253, "Soltari Crusader", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "TMP"; + this.subtype.add("Soltari"); + this.subtype.add("Knight"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Shadow + this.addAbility(ShadowAbility.getInstance()); + // {1}{W}: Soltari Crusader gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{1}{W}"))); + } + + public SoltariCrusader(final SoltariCrusader card) { + super(card); + } + + @Override + public SoltariCrusader copy() { + return new SoltariCrusader(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/SoltariFootSoldier.java b/Mage.Sets/src/mage/sets/tempest/SoltariFootSoldier.java new file mode 100644 index 0000000000..f0b128975e --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/SoltariFootSoldier.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.tempest; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.ShadowAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class SoltariFootSoldier extends CardImpl { + + public SoltariFootSoldier(UUID ownerId) { + super(ownerId, 255, "Soltari Foot Soldier", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}"); + this.expansionSetCode = "TMP"; + this.subtype.add("Soltari"); + this.subtype.add("Soldier"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Shadow + this.addAbility(ShadowAbility.getInstance()); + } + + public SoltariFootSoldier(final SoltariFootSoldier card) { + super(card); + } + + @Override + public SoltariFootSoldier copy() { + return new SoltariFootSoldier(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/ThalakosSentry.java b/Mage.Sets/src/mage/sets/tempest/ThalakosSentry.java new file mode 100644 index 0000000000..1385e54002 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/ThalakosSentry.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.tempest; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.ShadowAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ThalakosSentry extends CardImpl { + + public ThalakosSentry(UUID ownerId) { + super(ownerId, 95, "Thalakos Sentry", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "TMP"; + this.subtype.add("Thalakos"); + this.subtype.add("Soldier"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Shadow + this.addAbility(ShadowAbility.getInstance()); + } + + public ThalakosSentry(final ThalakosSentry card) { + super(card); + } + + @Override + public ThalakosSentry copy() { + return new ThalakosSentry(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/Thumbscrews.java b/Mage.Sets/src/mage/sets/tempest/Thumbscrews.java new file mode 100644 index 0000000000..0d43d04e3c --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/Thumbscrews.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.abilities.TriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.condition.common.CardsInHandCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.target.common.TargetOpponent; + +/** + * + * @author fireshoes + */ +public class Thumbscrews extends CardImpl { + + public Thumbscrews(UUID ownerId) { + super(ownerId, 302, "Thumbscrews", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.expansionSetCode = "TMP"; + + // At the beginning of your upkeep, if you have five or more cards in hand, Thumbscrews deals 1 damage to target opponent. + TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, + new DamageTargetEffect(1), TargetController.YOU, false); + ability.addTarget(new TargetOpponent()); + CardsInHandCondition condition = new CardsInHandCondition(CardsInHandCondition.CountType.MORE_THAN, 4); + this.addAbility(new ConditionalTriggeredAbility(ability, condition, "At the beginning of your upkeep, if you have five or more cards in hand, {this} deals 1 damage to target opponent.")); + } + + public Thumbscrews(final Thumbscrews card) { + super(card); + } + + @Override + public Thumbscrews copy() { + return new Thumbscrews(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempestremastered/SoltariLancer.java b/Mage.Sets/src/mage/sets/tempestremastered/SoltariLancer.java index 45b9b6bde0..cd106458ba 100644 --- a/Mage.Sets/src/mage/sets/tempestremastered/SoltariLancer.java +++ b/Mage.Sets/src/mage/sets/tempestremastered/SoltariLancer.java @@ -46,8 +46,8 @@ import mage.filter.common.FilterAttackingCreature; * @author fireshoes */ public class SoltariLancer extends CardImpl { - - private static final String rule = "Spirit of the Night has first strike as long as it's attacking"; + + private static final String rule = "{this} has first strike as long as it's attacking"; public SoltariLancer(UUID ownerId) { super(ownerId, 30, "Soltari Lancer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); @@ -59,7 +59,7 @@ public class SoltariLancer extends CardImpl { // Shadow this.addAbility(ShadowAbility.getInstance()); - + // Soltari Lancer has first strike as long as it's attacking. ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()), new SourceMatchesFilterCondition(new FilterAttackingCreature()), rule); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); diff --git a/Mage.Sets/src/mage/sets/tenthedition/BeaconOfImmortality.java b/Mage.Sets/src/mage/sets/tenthedition/BeaconOfImmortality.java index b9a3ecc224..b382e323c5 100644 --- a/Mage.Sets/src/mage/sets/tenthedition/BeaconOfImmortality.java +++ b/Mage.Sets/src/mage/sets/tenthedition/BeaconOfImmortality.java @@ -87,9 +87,9 @@ class BeaconOfImmortalityEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getFirstTarget()); if (player != null) { - int amount = game.getLife(); + int amount = player.getLife(); if (amount < 0) { - player.loseLife(amount, game); + player.loseLife(-amount, game); return true; } if (amount > 0) { diff --git a/Mage.Sets/src/mage/sets/tenthedition/DragonsClaw.java b/Mage.Sets/src/mage/sets/tenthedition/DragonsClaw.java index 86a28f2dd3..918791b2d0 100644 --- a/Mage.Sets/src/mage/sets/tenthedition/DragonsClaw.java +++ b/Mage.Sets/src/mage/sets/tenthedition/DragonsClaw.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,22 @@ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.tenthedition; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.constants.Zone; -import mage.abilities.TriggeredAbilityImpl; +import mage.ObjectColor; +import mage.abilities.common.SpellCastAllTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.game.stack.Spell; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.ColorPredicate; /** * @@ -46,10 +43,18 @@ import mage.game.stack.Spell; */ public class DragonsClaw extends CardImpl { + private final static FilterSpell filter = new FilterSpell("a red spell"); + + static { + filter.add(new ColorPredicate(ObjectColor.RED)); + } + public DragonsClaw(UUID ownerId) { super(ownerId, 322, "Dragon's Claw", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); this.expansionSetCode = "10E"; - this.addAbility(new DragonsClawAbility()); + + // Whenever a player casts a red spell, you may gain 1 life. + this.addAbility(new SpellCastAllTriggeredAbility(new GainLifeEffect(1), filter, true)); } public DragonsClaw(final DragonsClaw card) { @@ -62,36 +67,3 @@ public class DragonsClaw extends CardImpl { } } - -class DragonsClawAbility extends TriggeredAbilityImpl { - - public DragonsClawAbility() { - super(Zone.BATTLEFIELD, new GainLifeEffect(1), true); - } - - public DragonsClawAbility(final DragonsClawAbility ability) { - super(ability); - } - - @Override - public DragonsClawAbility copy() { - return new DragonsClawAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.SPELL_CAST; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - Spell spell = game.getStack().getSpell(event.getTargetId()); - return spell != null && spell.getColor(game).isRed(); - } - - @Override - public String getRule() { - return "Whenever a player casts a red spell, you may gain 1 life."; - } - -} diff --git a/Mage.Sets/src/mage/sets/tenthedition/PhageTheUntouchable.java b/Mage.Sets/src/mage/sets/tenthedition/PhageTheUntouchable.java index b5123c43f4..61e5130d2e 100644 --- a/Mage.Sets/src/mage/sets/tenthedition/PhageTheUntouchable.java +++ b/Mage.Sets/src/mage/sets/tenthedition/PhageTheUntouchable.java @@ -1,84 +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.tenthedition; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.DealsCombatDamageToACreatureTriggeredAbility; -import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.condition.InvertCondition; -import mage.abilities.condition.common.CastFromHandCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.common.DestroyTargetEffect; -import mage.abilities.effects.common.LoseGameSourceControllerEffect; -import mage.abilities.effects.common.LoseGameTargetPlayerEffect; -import mage.cards.CardImpl; -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.watchers.common.CastFromHandWatcher; - -/** - * - * @author LevelX2 - */ -public class PhageTheUntouchable extends CardImpl { - - public PhageTheUntouchable(UUID ownerId) { - super(ownerId, 166, "Phage the Untouchable", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}{B}{B}{B}"); - this.expansionSetCode = "10E"; - this.supertype.add("Legendary"); - this.subtype.add("Zombie"); - this.subtype.add("Minion"); - - this.power = new MageInt(4); - this.toughness = new MageInt(4); - - // When Phage the Untouchable enters the battlefield, if you didn't cast it from your hand, you lose the game. - this.addAbility(new ConditionalTriggeredAbility( - new EntersBattlefieldTriggeredAbility(new LoseGameSourceControllerEffect(), false), - new InvertCondition(new CastFromHandCondition()), - "When {this} enters the battlefield, if you didn't cast it from your hand, you lose the game" - ), new CastFromHandWatcher()); - - // Whenever Phage deals combat damage to a creature, destroy that creature. It can't be regenerated. - this.addAbility(new DealsCombatDamageToACreatureTriggeredAbility(new DestroyTargetEffect(true), false, true)); - - // Whenever Phage deals combat damage to a player, that player loses the game. - this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new LoseGameTargetPlayerEffect(), false, true)); - } - - public PhageTheUntouchable(final PhageTheUntouchable card) { - super(card); - } - - @Override - public PhageTheUntouchable copy() { - return new PhageTheUntouchable(this); - } -} +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.tenthedition; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DealsCombatDamageToACreatureTriggeredAbility; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.InvertCondition; +import mage.abilities.condition.common.CastFromHandCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.LoseGameSourceControllerEffect; +import mage.abilities.effects.common.LoseGameTargetPlayerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.watchers.common.CastFromHandWatcher; + +/** + * + * @author LevelX2 + */ +public class PhageTheUntouchable extends CardImpl { + + public PhageTheUntouchable(UUID ownerId) { + super(ownerId, 166, "Phage the Untouchable", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}{B}{B}{B}"); + this.expansionSetCode = "10E"; + this.supertype.add("Legendary"); + this.subtype.add("Avatar"); + this.subtype.add("Minion"); + + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // When Phage the Untouchable enters the battlefield, if you didn't cast it from your hand, you lose the game. + this.addAbility(new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new LoseGameSourceControllerEffect(), false), + new InvertCondition(new CastFromHandCondition()), + "When {this} enters the battlefield, if you didn't cast it from your hand, you lose the game" + ), new CastFromHandWatcher()); + + // Whenever Phage deals combat damage to a creature, destroy that creature. It can't be regenerated. + this.addAbility(new DealsCombatDamageToACreatureTriggeredAbility(new DestroyTargetEffect(true), false, true)); + + // Whenever Phage deals combat damage to a player, that player loses the game. + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new LoseGameTargetPlayerEffect(), false, true)); + } + + public PhageTheUntouchable(final PhageTheUntouchable card) { + super(card); + } + + @Override + public PhageTheUntouchable copy() { + return new PhageTheUntouchable(this); + } +} diff --git a/Mage.Sets/src/mage/sets/thedark/SistersOfTheFlame.java b/Mage.Sets/src/mage/sets/thedark/SistersOfTheFlame.java new file mode 100644 index 0000000000..ee6a399d24 --- /dev/null +++ b/Mage.Sets/src/mage/sets/thedark/SistersOfTheFlame.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 SistersOfTheFlame extends mage.sets.fourthedition.SistersOfTheFlame { + + public SistersOfTheFlame(UUID ownerId) { + super(ownerId); + this.cardNumber = 73; + this.expansionSetCode = "DRK"; + this.rarity = Rarity.UNCOMMON; + } + + public SistersOfTheFlame(final SistersOfTheFlame card) { + super(card); + } + + @Override + public SistersOfTheFlame copy() { + return new SistersOfTheFlame(this); + } +} diff --git a/Mage.Sets/src/mage/sets/theros/MistcutterHydra.java b/Mage.Sets/src/mage/sets/theros/MistcutterHydra.java index d1586f273b..501b8084e9 100644 --- a/Mage.Sets/src/mage/sets/theros/MistcutterHydra.java +++ b/Mage.Sets/src/mage/sets/theros/MistcutterHydra.java @@ -54,6 +54,7 @@ import mage.game.permanent.Permanent; public class MistcutterHydra extends CardImpl { private static final FilterObject filter = new FilterObject("from blue"); + static { filter.add(new ColorPredicate(ObjectColor.BLUE)); } @@ -102,10 +103,9 @@ class MistcutterHydraEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { Object obj = getValue(mage.abilities.effects.EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { - // 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)obj).getManaCostsToPay().getX(); + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { + int amount = ((SpellAbility) obj).getManaCostsToPay().getX(); if (amount > 0) { permanent.addCounters(CounterType.P1P1.createInstance(amount), game); } diff --git a/Mage.Sets/src/mage/sets/timeshifted/WhispersOfTheMuse.java b/Mage.Sets/src/mage/sets/timeshifted/WhispersOfTheMuse.java new file mode 100644 index 0000000000..f5b7912261 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timeshifted/WhispersOfTheMuse.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.timeshifted; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class WhispersOfTheMuse extends mage.sets.tempest.WhispersOfTheMuse { + + public WhispersOfTheMuse(UUID ownerId) { + super(ownerId); + this.cardNumber = 35; + this.expansionSetCode = "TSB"; + this.rarity = Rarity.SPECIAL; + } + + public WhispersOfTheMuse(final WhispersOfTheMuse card) { + super(card); + } + + @Override + public WhispersOfTheMuse copy() { + return new WhispersOfTheMuse(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/DrifterIlDal.java b/Mage.Sets/src/mage/sets/timespiral/DrifterIlDal.java new file mode 100644 index 0000000000..464fbe54cc --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/DrifterIlDal.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.timespiral; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +import mage.abilities.keyword.ShadowAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; + +/** + * + * @author LoneFox + */ +public class DrifterIlDal extends CardImpl { + + public DrifterIlDal(UUID ownerId) { + super(ownerId, 59, "Drifter il-Dal", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{U}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Shadow + this.addAbility(ShadowAbility.getInstance()); + // At the beginning of your upkeep, sacrifice Drifter il-Dal unless you pay {U}. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ManaCostsImpl("{U}")), TargetController.YOU, false)); + } + + public DrifterIlDal(final DrifterIlDal card) { + super(card); + } + + @Override + public DrifterIlDal copy() { + return new DrifterIlDal(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/GhituFirebreathing.java b/Mage.Sets/src/mage/sets/timespiral/GhituFirebreathing.java new file mode 100644 index 0000000000..e8203ac972 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/GhituFirebreathing.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.timespiral; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ColoredManaCost; +import mage.abilities.costs.mana.ManaCostsImpl; +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.abilities.keyword.FlashAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.ColoredManaSymbol; +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 fireshoes + */ +public class GhituFirebreathing extends CardImpl { + + public GhituFirebreathing(UUID ownerId) { + super(ownerId, 158, "Ghitu Firebreathing", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Aura"); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // 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); + + // {R}: Enchanted creature gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 0, Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.R))); + + // {R}: Return Ghitu Firebreathing to its owner's hand. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ManaCostsImpl("{R}"))); + } + + public GhituFirebreathing(final GhituFirebreathing card) { + super(card); + } + + @Override + public GhituFirebreathing copy() { + return new GhituFirebreathing(this); + } +} diff --git a/Mage.Sets/src/mage/sets/torment/CephalidVandal.java b/Mage.Sets/src/mage/sets/torment/CephalidVandal.java new file mode 100644 index 0000000000..6aa724c628 --- /dev/null +++ b/Mage.Sets/src/mage/sets/torment/CephalidVandal.java @@ -0,0 +1,105 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.torment; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +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; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class CephalidVandal extends CardImpl { + + public CephalidVandal(UUID ownerId) { + super(ownerId, 31, "Cephalid Vandal", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "TOR"; + this.subtype.add("Cephalid"); + this.subtype.add("Rogue"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // At the beginning of your upkeep, put a shred counter on Cephalid Vandal. Then put the top card of your library into your graveyard for each shred counter on Cephalid Vandal. + Effect effect = new CephalidVandalEffect(); + Ability ability = new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.SHRED.createInstance(), false), TargetController.YOU, false); + ability.addEffect(effect); + this.addAbility(ability); + } + + public CephalidVandal(final CephalidVandal card) { + super(card); + } + + @Override + public CephalidVandal copy() { + return new CephalidVandal(this); + } +} + +class CephalidVandalEffect extends OneShotEffect { + + public CephalidVandalEffect() { + super(Outcome.Neutral); + staticText = "Then put the top card of your library into your graveyard for each shred counter on {this}"; + } + + public CephalidVandalEffect(final CephalidVandalEffect effect) { + super(effect); + } + + @Override + public CephalidVandalEffect copy() { + return new CephalidVandalEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null && controller != null) { + int amount = permanent.getCounters().getCount(CounterType.SHRED); + controller.moveCards(controller.getLibrary().getTopCards(game, amount), Zone.LIBRARY, Zone.GRAVEYARD, source, game); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/urzasdestiny/VoiceOfDuty.java b/Mage.Sets/src/mage/sets/urzasdestiny/VoiceOfDuty.java new file mode 100644 index 0000000000..125c9a9d5c --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzasdestiny/VoiceOfDuty.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.urzasdestiny; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; +/** + * + * @author LoneFox + */ +public class VoiceOfDuty extends CardImpl { + + private static final FilterCard filter = new FilterCard("green"); + + static { + filter.add(new ColorPredicate(ObjectColor.GREEN)); + } + + public VoiceOfDuty(UUID ownerId) { + super(ownerId, 23, "Voice of Duty", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "UDS"; + this.subtype.add("Angel"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // protection from green + this.addAbility(new ProtectionAbility(filter)); + } + + public VoiceOfDuty(final VoiceOfDuty card) { + super(card); + } + + @Override + public VoiceOfDuty copy() { + return new VoiceOfDuty(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzasdestiny/VoiceOfReason.java b/Mage.Sets/src/mage/sets/urzasdestiny/VoiceOfReason.java new file mode 100644 index 0000000000..30a7390a5b --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzasdestiny/VoiceOfReason.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.urzasdestiny; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author LoneFox + */ +public class VoiceOfReason extends CardImpl { + + private static final FilterCard filter = new FilterCard("blue"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLUE)); + } + + public VoiceOfReason(UUID ownerId) { + super(ownerId, 24, "Voice of Reason", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "UDS"; + this.subtype.add("Angel"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // protection from blue + this.addAbility(new ProtectionAbility(filter)); + } + + public VoiceOfReason(final VoiceOfReason card) { + super(card); + } + + @Override + public VoiceOfReason copy() { + return new VoiceOfReason(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzaslegacy/AngelsTrumpet.java b/Mage.Sets/src/mage/sets/urzaslegacy/AngelsTrumpet.java new file mode 100644 index 0000000000..0ae0bd87bc --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzaslegacy/AngelsTrumpet.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.urzaslegacy; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.VigilanceAbility; +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.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.watchers.common.AttackedThisTurnWatcher; + +/** + * + * @author fireshoes + */ +public class AngelsTrumpet extends CardImpl { + + public AngelsTrumpet(UUID ownerId) { + super(ownerId, 121, "Angel's Trumpet", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}"); + this.expansionSetCode = "ULG"; + + // All creatures have vigilance. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent()))); + + // At the beginning of each player's end step, tap all untapped creatures that player controls that didn't attack this turn. Angel's Trumpet deals damage to the player equal to the number of creatures tapped this way. + this.addAbility(new BeginningOfEndStepTriggeredAbility(new AngelsTrumpetTapEffect(), TargetController.ANY, false), new AttackedThisTurnWatcher()); + } + + public AngelsTrumpet(final AngelsTrumpet card) { + super(card); + } + + @Override + public AngelsTrumpet copy() { + return new AngelsTrumpet(this); + } +} + +class AngelsTrumpetTapEffect extends OneShotEffect { + + AngelsTrumpetTapEffect() { + super(Outcome.Tap); + this.staticText = "tap all untapped creatures that player controls that didn't attack this turn. Angel's Trumpet deals damage to the player equal to the number of creatures tapped this way"; + } + + AngelsTrumpetTapEffect(final AngelsTrumpetTapEffect effect) { + super(effect); + } + + @Override + public AngelsTrumpetTapEffect copy() { + return new AngelsTrumpetTapEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(game.getActivePlayerId()); + int count = 0; + if (player != null) { + for (Permanent creature : game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), player.getId(), game)) { + // Untapped creatures are safe. + if (creature.isTapped()) { + continue; + } + // Creatures that attacked are safe. + AttackedThisTurnWatcher watcher = (AttackedThisTurnWatcher) game.getState().getWatchers().get("AttackedThisTurn"); + if (watcher != null && watcher.getAttackedThisTurnCreatures().contains(creature.getId())) { + continue; + } + // Tap the rest. + creature.tap(game); + count++; + } + if (count > 0) { + player.damage(count, source.getSourceId(), game, false, true); + } + return true; + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/urzassaga/FaultLine.java b/Mage.Sets/src/mage/sets/urzassaga/FaultLine.java new file mode 100644 index 0000000000..be9be70988 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/FaultLine.java @@ -0,0 +1,105 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those 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.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +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; + +/** + * + * @author fireshoes + */ +public class FaultLine extends CardImpl { + + public FaultLine(UUID ownerId) { + super(ownerId, 185, "Fault Line", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{X}{R}{R}"); + this.expansionSetCode = "USG"; + + // Fault Line deals X damage to each creature without flying and each player. + this.getSpellAbility().addEffect(new FaultLineEffect()); + } + + public FaultLine(final FaultLine card) { + super(card); + } + + @Override + public FaultLine copy() { + return new FaultLine(this); + } +} + +class FaultLineEffect extends OneShotEffect { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); + + static { + filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); + } + + public FaultLineEffect() { + super(Outcome.Damage); + staticText = "{this} deals X damage to each creature without flying and each player"; + } + + public FaultLineEffect(final FaultLineEffect effect) { + super(effect); + } + + @Override + public FaultLineEffect copy() { + return new FaultLineEffect(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; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/urzassaga/FieryMantle.java b/Mage.Sets/src/mage/sets/urzassaga/FieryMantle.java new file mode 100644 index 0000000000..483bbd2fa3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/FieryMantle.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.urzassaga; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ColoredManaCost; +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.ColoredManaSymbol; +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 fireshoes + */ +public class FieryMantle extends CardImpl { + + public FieryMantle(UUID ownerId) { + super(ownerId, 186, "Fiery Mantle", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); + 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); + + // {R}: Enchanted creature gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 0, Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.R))); + + // When Fiery Mantle is put into a graveyard from the battlefield, return Fiery Mantle to its owner's hand. + this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new ReturnToHandSourceEffect())); + } + + public FieryMantle(final FieryMantle card) { + super(card); + } + + @Override + public FieryMantle copy() { + return new FieryMantle(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/ImaginaryPet.java b/Mage.Sets/src/mage/sets/urzassaga/ImaginaryPet.java new file mode 100644 index 0000000000..69a4a490c4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/ImaginaryPet.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.urzassaga; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.condition.common.CardsInHandCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; + +/** + * + * @author LoneFox + */ +public class ImaginaryPet extends CardImpl { + + public ImaginaryPet(UUID ownerId) { + super(ownerId, 81, "Imaginary Pet", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "USG"; + this.subtype.add("Illusion"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // At the beginning of your upkeep, if you have a card in hand, return Imaginary Pet to its owner's hand. + TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new ReturnToHandSourceEffect(true), TargetController.YOU, false); + this.addAbility(new ConditionalTriggeredAbility(ability, new CardsInHandCondition(CardsInHandCondition.CountType.MORE_THAN, 0), + "At the beginning of your upkeep, if you have a card in hand, return {this} to its owner's hand.")); + } + + public ImaginaryPet(final ImaginaryPet card) { + super(card); + } + + @Override + public ImaginaryPet copy() { + return new ImaginaryPet(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/SanctumGuardian.java b/Mage.Sets/src/mage/sets/urzassaga/SanctumGuardian.java new file mode 100644 index 0000000000..2b40cfa1a6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/SanctumGuardian.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.urzassaga; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class SanctumGuardian extends mage.sets.ninthedition.SanctumGuardian { + + public SanctumGuardian(UUID ownerId) { + super(ownerId); + this.cardNumber = 43; + this.expansionSetCode = "USG"; + } + + public SanctumGuardian(final SanctumGuardian card) { + super(card); + } + + @Override + public SanctumGuardian copy() { + return new SanctumGuardian(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/SneakAttack.java b/Mage.Sets/src/mage/sets/urzassaga/SneakAttack.java index 1b447cb9f4..3720511de4 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/SneakAttack.java +++ b/Mage.Sets/src/mage/sets/urzassaga/SneakAttack.java @@ -62,7 +62,6 @@ public class SneakAttack extends CardImpl { super(ownerId, 218, "Sneak Attack", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}"); this.expansionSetCode = "USG"; - // {R}: You may put a creature card from your hand onto the battlefield. That creature gains haste. Sacrifice the creature at the beginning of the next end step. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new SneakAttackEffect(), new ManaCostsImpl("{R}"))); } @@ -78,23 +77,23 @@ public class SneakAttack extends CardImpl { } class SneakAttackEffect extends OneShotEffect { - + private static final String choiceText = "Put a creature card from your hand onto the battlefield?"; - + public SneakAttackEffect() { super(Outcome.Benefit); this.staticText = "You may put a creature card from your hand onto the battlefield. That creature gains haste. Sacrifice the creature at the beginning of the next end step"; } - + public SneakAttackEffect(final SneakAttackEffect effect) { super(effect); } - + @Override public SneakAttackEffect copy() { return new SneakAttackEffect(this); } - + @Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); @@ -106,20 +105,21 @@ class SneakAttackEffect extends OneShotEffect { if (card != null) { if (player.putOntoBattlefieldWithInfo(card, game, Zone.HAND, source.getSourceId())) { Permanent permanent = game.getPermanent(card.getId()); - ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.Custom); - effect.setTargetPointer(new FixedTarget(permanent.getId())); - game.addEffect(effect, source); - - SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice " + card.getName()); - sacrificeEffect.setTargetPointer(new FixedTarget(card.getId())); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); - + if (permanent != null) { + ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.Custom); + effect.setTargetPointer(new FixedTarget(permanent, game)); + game.addEffect(effect, source); + + SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice " + card.getName(), source.getControllerId()); + sacrificeEffect.setTargetPointer(new FixedTarget(permanent, game)); + DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(game), game); + game.addDelayedTriggeredAbility(delayedAbility); + } return true; - } + } } return false; } diff --git a/Mage.Sets/src/mage/sets/urzassaga/Sunder.java b/Mage.Sets/src/mage/sets/urzassaga/Sunder.java new file mode 100644 index 0000000000..ee8ff76100 --- /dev/null +++ b/Mage.Sets/src/mage/sets/urzassaga/Sunder.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.urzassaga; + +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.constants.Zone; +import mage.filter.common.FilterLandPermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author fireshoes + */ +public class Sunder extends CardImpl { + + public Sunder(UUID ownerId) { + super(ownerId, 101, "Sunder", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{3}{U}"); + this.expansionSetCode = "USG"; + + // Return all lands to their owners' hands. + this.getSpellAbility().addEffect(new SunderEffect()); + } + + public Sunder(final Sunder card) { + super(card); + } + + @Override + public Sunder copy() { + return new Sunder(this); + } +} + +class SunderEffect extends OneShotEffect { + + public SunderEffect() { + super(Outcome.ReturnToHand); + staticText = "Return all lands to their owners' hands"; + } + + public SunderEffect(final SunderEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + for (Permanent land : game.getBattlefield().getActivePermanents(new FilterLandPermanent(), source.getControllerId(), source.getSourceId(), game)) { + land.moveToZone(Zone.HAND, source.getSourceId(), game, true); + } + return true; + } + + @Override + public SunderEffect copy() { + return new SunderEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/TimeSpiral.java b/Mage.Sets/src/mage/sets/urzassaga/TimeSpiral.java index 1b19a82819..fff482faff 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/TimeSpiral.java +++ b/Mage.Sets/src/mage/sets/urzassaga/TimeSpiral.java @@ -28,15 +28,17 @@ package mage.sets.urzassaga; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; import mage.abilities.Ability; +import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DrawCardAllEffect; import mage.abilities.effects.common.ExileSpellEffect; import mage.abilities.effects.common.UntapLandsEffect; 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.players.Player; @@ -51,12 +53,15 @@ public class TimeSpiral extends CardImpl { super(ownerId, 103, "Time Spiral", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{4}{U}{U}"); this.expansionSetCode = "USG"; - // Exile Time Spiral. Each player shuffles his or her graveyard and hand into his or her library, then draws seven cards. You untap up to six lands. this.getSpellAbility().addEffect(ExileSpellEffect.getInstance()); this.getSpellAbility().addEffect(new TimeSpiralEffect()); + Effect effect = new DrawCardAllEffect(7); + effect.setText(", then draws seven cards"); + this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(new UntapLandsEffect(6)); } + public TimeSpiral(final TimeSpiral card) { super(card); } @@ -71,7 +76,7 @@ class TimeSpiralEffect extends OneShotEffect { public TimeSpiralEffect() { super(Outcome.Neutral); - staticText = "Each player shuffles his or her hand and graveyard into his or her library, then draws seven cards"; + staticText = "Each player shuffles his or her hand and graveyard into his or her library"; } public TimeSpiralEffect(final TimeSpiralEffect effect) { @@ -81,17 +86,16 @@ class TimeSpiralEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player sourcePlayer = game.getPlayer(source.getControllerId()); - for (UUID playerId: sourcePlayer.getInRange()) { + for (UUID playerId : sourcePlayer.getInRange()) { Player player = game.getPlayer(playerId); if (player != null) { - for (Card card: player.getHand().getCards(game)) { + for (Card card : player.getHand().getCards(game)) { card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); - } - for (Card card: player.getGraveyard().getCards(game)) { + } + for (Card card : player.getGraveyard().getCards(game)) { card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true); - } + } player.shuffleLibrary(game); - player.drawCards(7, game); } } return true; @@ -102,4 +106,4 @@ class TimeSpiralEffect extends OneShotEffect { return new TimeSpiralEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/urzassaga/Windfall.java b/Mage.Sets/src/mage/sets/urzassaga/Windfall.java index 4b398342cf..c6f2b14192 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/Windfall.java +++ b/Mage.Sets/src/mage/sets/urzassaga/Windfall.java @@ -48,7 +48,6 @@ public class Windfall extends CardImpl { super(ownerId, 111, "Windfall", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{U}"); this.expansionSetCode = "USG"; - // Each player discards his or her hand, then draws cards equal to the greatest number of cards a player discarded this way. this.getSpellAbility().addEffect(new WindfallEffect()); } @@ -64,6 +63,7 @@ public class Windfall extends CardImpl { } class WindfallEffect extends OneShotEffect { + WindfallEffect() { super(Outcome.Discard); staticText = "Each player discards his or her hand, then draws cards equal to the greatest number of cards a player discarded this way."; @@ -76,11 +76,11 @@ class WindfallEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { int maxDiscarded = 0; - Player sourcePlayer = game.getPlayer(source.getControllerId()); - if (sourcePlayer == null) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller == null) { return false; } - for (UUID playerId : sourcePlayer.getInRange()) { + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { int discarded = 0; @@ -94,7 +94,7 @@ class WindfallEffect extends OneShotEffect { } } } - for (UUID playerId : sourcePlayer.getInRange()) { + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { player.drawCards(maxDiscarded, game); @@ -107,4 +107,4 @@ class WindfallEffect extends OneShotEffect { public WindfallEffect copy() { return new WindfallEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/venservskoth/Lithophage.java b/Mage.Sets/src/mage/sets/venservskoth/Lithophage.java new file mode 100644 index 0000000000..d7c256cbec --- /dev/null +++ b/Mage.Sets/src/mage/sets/venservskoth/Lithophage.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.venservskoth; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Lithophage extends mage.sets.mercadianmasques.Lithophage { + + public Lithophage(UUID ownerId) { + super(ownerId); + this.cardNumber = 57; + this.expansionSetCode = "DDI"; + } + + public Lithophage(final Lithophage card) { + super(card); + } + + @Override + public Lithophage copy() { + return new Lithophage(this); + } +} diff --git a/Mage.Sets/src/mage/sets/visions/FirestormHellkite.java b/Mage.Sets/src/mage/sets/visions/FirestormHellkite.java new file mode 100644 index 0000000000..b8c1bb96e0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/FirestormHellkite.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.visions; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class FirestormHellkite extends CardImpl { + + public FirestormHellkite(UUID ownerId) { + super(ownerId, 130, "Firestorm Hellkite", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{U}{R}"); + this.expansionSetCode = "VIS"; + this.subtype.add("Dragon"); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Trample + this.addAbility(TrampleAbility.getInstance()); + // Cumulative upkeep {U}{R} + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{U}{R}"))); + } + + public FirestormHellkite(final FirestormHellkite card) { + super(card); + } + + @Override + public FirestormHellkite copy() { + return new FirestormHellkite(this); + } +} diff --git a/Mage.Sets/src/mage/sets/visions/PhyrexianMarauder.java b/Mage.Sets/src/mage/sets/visions/PhyrexianMarauder.java index 3079b7ca4d..96c5998fc5 100644 --- a/Mage.Sets/src/mage/sets/visions/PhyrexianMarauder.java +++ b/Mage.Sets/src/mage/sets/visions/PhyrexianMarauder.java @@ -97,7 +97,8 @@ class PhyrexianMarauderEntersEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null && !permanent.isFaceDown(game)) { Object obj = getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY); - if (obj != null && obj instanceof SpellAbility) { + if (obj != null && obj instanceof SpellAbility + && permanent.getZoneChangeCounter(game) - 1 == ((SpellAbility) obj).getSourceObjectZoneChangeCounter()) { int amount = ((Ability) obj).getManaCostsToPay().getX(); if (amount > 0) { permanent.addCounters(CounterType.P1P1.createInstance(amount), game); diff --git a/Mage.Sets/src/mage/sets/visions/RainbowEfreet.java b/Mage.Sets/src/mage/sets/visions/RainbowEfreet.java new file mode 100644 index 0000000000..654cb7b4e1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/RainbowEfreet.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.visions; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.PhaseOutSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class RainbowEfreet extends CardImpl { + + public RainbowEfreet(UUID ownerId) { + super(ownerId, 41, "Rainbow Efreet", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "VIS"; + this.subtype.add("Efreet"); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // {U}{U}: Rainbow Efreet phases out. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new PhaseOutSourceEffect(), new ManaCostsImpl("{U}{U}"))); + } + + public RainbowEfreet(final RainbowEfreet card) { + super(card); + } + + @Override + public RainbowEfreet copy() { + return new RainbowEfreet(this); + } +} diff --git a/Mage.Sets/src/mage/sets/visions/TeferisHonorGuard.java b/Mage.Sets/src/mage/sets/visions/TeferisHonorGuard.java new file mode 100644 index 0000000000..8b8d79bf05 --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/TeferisHonorGuard.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.visions; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.PhaseOutSourceEffect; +import mage.abilities.keyword.FlankingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class TeferisHonorGuard extends CardImpl { + + public TeferisHonorGuard(UUID ownerId) { + super(ownerId, 122, "Teferi's Honor Guard", Rarity.UNCOMMON, 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()); + + // {U}{U}: Teferi's Honor Guard phases out. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new PhaseOutSourceEffect(), new ManaCostsImpl("{U}{U}"))); + } + + public TeferisHonorGuard(final TeferisHonorGuard card) { + super(card); + } + + @Override + public TeferisHonorGuard copy() { + return new TeferisHonorGuard(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/Abeyance.java b/Mage.Sets/src/mage/sets/weatherlight/Abeyance.java new file mode 100644 index 0000000000..fe3b4d4f6e --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/Abeyance.java @@ -0,0 +1,121 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those 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.MageObject; +import mage.abilities.Ability; +import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.mana.ManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.target.TargetPlayer; + +/** + * + * @author fireshoes + */ +public class Abeyance extends CardImpl { + + public Abeyance(UUID ownerId) { + super(ownerId, 117, "Abeyance", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{1}{W}"); + this.expansionSetCode = "WTH"; + + // 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)); + } + + public Abeyance(final Abeyance card) { + super(card); + } + + @Override + public Abeyance copy() { + return new Abeyance(this); + } +} + +class AbeyanceEffect extends ContinuousRuleModifyingEffectImpl { + + public AbeyanceEffect() { + super(Duration.EndOfTurn, Outcome.Detriment); + staticText = "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"; + } + + public AbeyanceEffect(final AbeyanceEffect effect) { + super(effect); + } + + @Override + public AbeyanceEffect copy() { + return new AbeyanceEffect(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 instant or sorcery spells or activate abilities that aren't mana abilities this turn (" + mageObject.getLogName() + ")."; + } + return null; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getPlayerId().equals(source.getFirstTarget())) { + MageObject object = game.getObject(event.getSourceId()); + if (event.getType() == GameEvent.EventType.CAST_SPELL) { + if (object.getCardType().contains(CardType.INSTANT) || object.getCardType().contains(CardType.SORCERY)) { + return true; + } + } + if (event.getType() == GameEvent.EventType.ACTIVATE_ABILITY) { + Ability ability = game.getAbility(event.getTargetId(), event.getSourceId()); + if (ability != null && !(ability instanceof ManaAbility)) { + return true; + } + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/Alms.java b/Mage.Sets/src/mage/sets/weatherlight/Alms.java new file mode 100644 index 0000000000..d9f4aaf541 --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/Alms.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.weatherlight; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.ExileTopCardOfGraveyardCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.PreventDamageToTargetEffect; +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 fireshoes + */ +public class Alms extends CardImpl { + + public Alms(UUID ownerId) { + super(ownerId, 119, "Alms", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{W}"); + this.expansionSetCode = "WTH"; + + // {1}, Exile the top card of your graveyard: Prevent the next 1 damage that would be dealt to target creature this turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new GenericManaCost(1)); + ability.addCost(new ExileTopCardOfGraveyardCost(1)); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public Alms(final Alms card) { + super(card); + } + + @Override + public Alms copy() { + return new Alms(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/ArcticWolves.java b/Mage.Sets/src/mage/sets/weatherlight/ArcticWolves.java new file mode 100644 index 0000000000..7cf903a34f --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/ArcticWolves.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.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ArcticWolves extends CardImpl { + + public ArcticWolves(UUID ownerId) { + super(ownerId, 60, "Arctic Wolves", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + this.expansionSetCode = "WTH"; + this.subtype.add("Wolf"); + this.power = new MageInt(4); + this.toughness = new MageInt(5); + + // Cumulative upkeep {2} + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{2}"))); + // When Arctic Wolves enters the battlefield, draw a card. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1))); + } + + public ArcticWolves(final ArcticWolves card) { + super(card); + } + + @Override + public ArcticWolves copy() { + return new ArcticWolves(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/BarrowGhoul.java b/Mage.Sets/src/mage/sets/weatherlight/BarrowGhoul.java new file mode 100644 index 0000000000..24451a04e2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/BarrowGhoul.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.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.costs.common.ExileTopCreatureCardOfGraveyardCost; +import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; + +/** + * + * @author fireshoes + */ +public class BarrowGhoul extends CardImpl { + + public BarrowGhoul(UUID ownerId) { + super(ownerId, 3, "Barrow Ghoul", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "WTH"; + this.subtype.add("Zombie"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // At the beginning of your upkeep, sacrifice Barrow Ghoul unless you exile the top creature card of your graveyard. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ExileTopCreatureCardOfGraveyardCost(1)), TargetController.YOU, false)); + } + + public BarrowGhoul(final BarrowGhoul card) { + super(card); + } + + @Override + public BarrowGhoul copy() { + return new BarrowGhoul(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/DuskriderFalcon.java b/Mage.Sets/src/mage/sets/weatherlight/DuskriderFalcon.java new file mode 100644 index 0000000000..b28e6fd8de --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/DuskriderFalcon.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.MageInt; +import mage.ObjectColor; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author LoneFox + */ +public class DuskriderFalcon extends CardImpl { + + private static final FilterCard filter = new FilterCard("black"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLACK)); + } + + public DuskriderFalcon(UUID ownerId) { + super(ownerId, 128, "Duskrider Falcon", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "WTH"; + this.subtype.add("Bird"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // protection from black + this.addAbility(new ProtectionAbility(filter)); + } + + public DuskriderFalcon(final DuskriderFalcon card) { + super(card); + } + + @Override + public DuskriderFalcon copy() { + return new DuskriderFalcon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/NaturesKiss.java b/Mage.Sets/src/mage/sets/weatherlight/NaturesKiss.java index c0f1bbeec5..abf514ddc8 100644 --- a/Mage.Sets/src/mage/sets/weatherlight/NaturesKiss.java +++ b/Mage.Sets/src/mage/sets/weatherlight/NaturesKiss.java @@ -30,20 +30,17 @@ package mage.sets.weatherlight; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.CostImpl; +import mage.abilities.costs.common.ExileTopCardOfGraveyardCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.continuous.BoostEnchantedEffect; import mage.abilities.keyword.EnchantAbility; -import mage.cards.Card; 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.players.Player; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -66,7 +63,7 @@ public class NaturesKiss extends CardImpl { // {1}, Exile the top card of your graveyard: Enchanted creature gets +1/+1 until end of turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl("{1}")); - ability.addCost(new ExileFromTopOfGraveyardCost(1)); + ability.addCost(new ExileTopCardOfGraveyardCost(1)); this.addAbility(ability); } @@ -79,48 +76,3 @@ public class NaturesKiss extends CardImpl { return new NaturesKiss(this); } } - -class ExileFromTopOfGraveyardCost extends CostImpl { - - private final int amount; - - public ExileFromTopOfGraveyardCost(int amount) { - this.amount = amount; - this.text = "Exile the top card of your graveyard"; - } - - public ExileFromTopOfGraveyardCost(ExileFromTopOfGraveyardCost cost) { - super(cost); - this.amount = cost.amount; - } - - @Override - public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { - Player controller = game.getPlayer(controllerId); - if(controller == null) { - return false; - } - return controller.getGraveyard().size() >= amount; - } - - @Override - public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) { - Player controller = game.getPlayer(controllerId); - if(controller != null) { - Card topCard = null; - for (Card card :controller.getGraveyard().getCards(game)) { - topCard = card; - } - if (topCard != null) { - controller.moveCardToExileWithInfo(topCard, null, "", ability.getSourceId(), game, Zone.GRAVEYARD, true); - paid = true; - } - } - return paid; - } - - @Override - public ExileFromTopOfGraveyardCost copy() { - return new ExileFromTopOfGraveyardCost(this); - } -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/weatherlight/Necratog.java b/Mage.Sets/src/mage/sets/weatherlight/Necratog.java new file mode 100644 index 0000000000..24dbc5189d --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/Necratog.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.weatherlight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.ExileTopCreatureCardOfGraveyardCost; +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 fireshoes + */ +public class Necratog extends CardImpl { + + public Necratog(UUID ownerId) { + super(ownerId, 18, "Necratog", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); + this.expansionSetCode = "WTH"; + this.subtype.add("Atog"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Exile the top creature card of your graveyard: Necratog gets +2/+2 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.EndOfTurn), new ExileTopCreatureCardOfGraveyardCost(1))); + } + + public Necratog(final Necratog card) { + super(card); + } + + @Override + public Necratog copy() { + return new Necratog(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/weatherlight/VodalianIllusionist.java b/Mage.Sets/src/mage/sets/weatherlight/VodalianIllusionist.java new file mode 100644 index 0000000000..8684a6b2bd --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/VodalianIllusionist.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.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.PhaseOutTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class VodalianIllusionist extends CardImpl { + + public VodalianIllusionist(UUID ownerId) { + super(ownerId, 58, "Vodalian Illusionist", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "WTH"; + this.subtype.add("Merfolk"); + this.subtype.add("Wizard"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {U}{U}, {tap}: Target creature phases out. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PhaseOutTargetEffect(), new ManaCostsImpl("{U}{U}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public VodalianIllusionist(final VodalianIllusionist card) { + super(card); + } + + @Override + public VodalianIllusionist copy() { + return new VodalianIllusionist(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/ZombieScavengers.java b/Mage.Sets/src/mage/sets/weatherlight/ZombieScavengers.java new file mode 100644 index 0000000000..126280485b --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/ZombieScavengers.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.SimpleActivatedAbility; +import mage.abilities.costs.common.ExileTopCreatureCardOfGraveyardCost; +import mage.abilities.effects.common.RegenerateSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class ZombieScavengers extends CardImpl { + + public ZombieScavengers(UUID ownerId) { + super(ownerId, 29, "Zombie Scavengers", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "WTH"; + this.subtype.add("Zombie"); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // Exile the top creature card of your graveyard: Regenerate Zombie Scavengers. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ExileTopCreatureCardOfGraveyardCost(1))); + } + + public ZombieScavengers(final ZombieScavengers card) { + super(card); + } + + @Override + public ZombieScavengers copy() { + return new ZombieScavengers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikar/ChandraAblaze.java b/Mage.Sets/src/mage/sets/zendikar/ChandraAblaze.java index 9ccf7a83cf..a64697b581 100644 --- a/Mage.Sets/src/mage/sets/zendikar/ChandraAblaze.java +++ b/Mage.Sets/src/mage/sets/zendikar/ChandraAblaze.java @@ -33,6 +33,7 @@ import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.LoyaltyAbility; import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DrawCardAllEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; @@ -65,7 +66,6 @@ public class ChandraAblaze extends CardImpl { this.expansionSetCode = "ZEN"; this.subtype.add("Chandra"); - this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(5)), false)); // +1: Discard a card. If a red card is discarded this way, Chandra Ablaze deals 4 damage to target creature or player. @@ -75,7 +75,9 @@ public class ChandraAblaze extends CardImpl { this.addAbility(ability); // -2: Each player discards his or her hand, then draws three cards. ability = new LoyaltyAbility(new DiscardHandAllEffect(), -2); - ability.addEffect(new ChandraAblazeEffect4()); + Effect effect = new DrawCardAllEffect(3); + effect.setText(", then draws three cards"); + ability.addEffect(effect); this.addAbility(ability); // -7: Cast any number of red instant and/or sorcery cards from your graveyard without paying their mana costs. ability = new LoyaltyAbility(new ChandraAblazeEffect5(), -7); @@ -162,23 +164,6 @@ class ChandraAblazeEffect2 extends OneShotEffect { } } -class ChandraAblazeEffect4 extends DrawCardAllEffect { - - public ChandraAblazeEffect4() { - super(3); - this.staticText = "Then draws three cards"; - } - - public ChandraAblazeEffect4(final ChandraAblazeEffect4 effect) { - super(effect); - } - - @Override - public ChandraAblazeEffect4 copy() { - return new ChandraAblazeEffect4(this); - } -} - class ChandraAblazeEffect5 extends OneShotEffect { public ChandraAblazeEffect5() { diff --git a/Mage.Sets/src/mage/sets/zendikar/RuinousMinotaur.java b/Mage.Sets/src/mage/sets/zendikar/RuinousMinotaur.java index 84d78b7cc1..9942935f68 100644 --- a/Mage.Sets/src/mage/sets/zendikar/RuinousMinotaur.java +++ b/Mage.Sets/src/mage/sets/zendikar/RuinousMinotaur.java @@ -30,16 +30,11 @@ package mage.sets.zendikar; import java.util.UUID; import mage.constants.CardType; import mage.constants.Rarity; -import mage.constants.Zone; import mage.MageInt; -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.effects.common.SacrificeTargetEffect; +import mage.abilities.common.DealsDamageToOpponentTriggeredAbility; +import mage.abilities.effects.common.SacrificeControllerEffect; import mage.cards.CardImpl; -import mage.filter.common.FilterControlledLandPermanent; -import mage.filter.common.FilterControlledPermanent; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.target.common.TargetControlledPermanent; +import mage.filter.common.FilterLandPermanent; /** * @@ -57,7 +52,8 @@ public class RuinousMinotaur extends CardImpl { this.toughness = new MageInt(2); // Whenever Ruinous Minotaur deals damage to an opponent, sacrifice a land. - this.addAbility(new RuinousMinotaurTriggeredAbility()); + this.addAbility(new DealsDamageToOpponentTriggeredAbility(new SacrificeControllerEffect(new FilterLandPermanent(), 1, ""), false, false)); + } public RuinousMinotaur(final RuinousMinotaur card) { @@ -69,38 +65,3 @@ public class RuinousMinotaur extends CardImpl { return new RuinousMinotaur(this); } } - -class RuinousMinotaurTriggeredAbility extends TriggeredAbilityImpl { - - private static final FilterControlledPermanent filter = new FilterControlledLandPermanent(); - - public RuinousMinotaurTriggeredAbility() { - super(Zone.BATTLEFIELD, new SacrificeTargetEffect(), false); - this.addTarget(new TargetControlledPermanent(filter)); - } - - public RuinousMinotaurTriggeredAbility(final RuinousMinotaurTriggeredAbility ability) { - super(ability); - } - - @Override - public RuinousMinotaurTriggeredAbility copy() { - return new RuinousMinotaurTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.DAMAGED_PLAYER; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - return event.getSourceId().equals(this.sourceId) - && game.getOpponents(this.getControllerId()).contains(event.getTargetId()); - } - - @Override - public String getRule() { - return "Whenever {this} deals damage to an opponent, sacrifice a land."; - } -} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/AffaGuardHound.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/AffaGuardHound.java new file mode 100644 index 0000000000..5124a2cef4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/AffaGuardHound.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class AffaGuardHound extends mage.sets.riseoftheeldrazi.AffaGuardHound { + + public AffaGuardHound(UUID ownerId) { + super(ownerId); + this.cardNumber = 2; + this.expansionSetCode = "DDP"; + } + + public AffaGuardHound(final AffaGuardHound card) { + super(card); + } + + @Override + public AffaGuardHound copy() { + return new AffaGuardHound(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/AkoumRefuge.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/AkoumRefuge.java new file mode 100644 index 0000000000..b1224e4e78 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/AkoumRefuge.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class AkoumRefuge extends mage.sets.zendikar.AkoumRefuge { + + public AkoumRefuge(UUID ownerId) { + super(ownerId); + this.cardNumber = 67; + this.expansionSetCode = "DDP"; + } + + public AkoumRefuge(final AkoumRefuge card) { + super(card); + } + + @Override + public AkoumRefuge copy() { + return new AkoumRefuge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/ArtisanOfKozilek.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/ArtisanOfKozilek.java new file mode 100644 index 0000000000..50e551ec19 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/ArtisanOfKozilek.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ArtisanOfKozilek extends mage.sets.riseoftheeldrazi.ArtisanOfKozilek { + + public ArtisanOfKozilek(UUID ownerId) { + super(ownerId); + this.cardNumber = 42; + this.expansionSetCode = "DDP"; + } + + public ArtisanOfKozilek(final ArtisanOfKozilek card) { + super(card); + } + + @Override + public ArtisanOfKozilek copy() { + return new ArtisanOfKozilek(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/AvengerOfZendikar.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/AvengerOfZendikar.java new file mode 100644 index 0000000000..8a943c4719 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/AvengerOfZendikar.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class AvengerOfZendikar extends mage.sets.worldwake.AvengerOfZendikar { + + public AvengerOfZendikar(UUID ownerId) { + super(ownerId); + this.cardNumber = 1; + this.expansionSetCode = "DDP"; + } + + public AvengerOfZendikar(final AvengerOfZendikar card) { + super(card); + } + + @Override + public AvengerOfZendikar copy() { + return new AvengerOfZendikar(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/BeastbreakerOfBalaGed.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/BeastbreakerOfBalaGed.java new file mode 100644 index 0000000000..c6186f3bac --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/BeastbreakerOfBalaGed.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BeastbreakerOfBalaGed extends mage.sets.riseoftheeldrazi.BeastbreakerOfBalaGed { + + public BeastbreakerOfBalaGed(UUID ownerId) { + super(ownerId); + this.cardNumber = 10; + this.expansionSetCode = "DDP"; + } + + public BeastbreakerOfBalaGed(final BeastbreakerOfBalaGed card) { + super(card); + } + + @Override + public BeastbreakerOfBalaGed copy() { + return new BeastbreakerOfBalaGed(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/BloodriteInvoker.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/BloodriteInvoker.java new file mode 100644 index 0000000000..6882416b53 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/BloodriteInvoker.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BloodriteInvoker extends mage.sets.riseoftheeldrazi.BloodriteInvoker { + + public BloodriteInvoker(UUID ownerId) { + super(ownerId); + this.cardNumber = 45; + this.expansionSetCode = "DDP"; + } + + public BloodriteInvoker(final BloodriteInvoker card) { + super(card); + } + + @Override + public BloodriteInvoker copy() { + return new BloodriteInvoker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/BloodthroneVampire.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/BloodthroneVampire.java new file mode 100644 index 0000000000..df217b22dc --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/BloodthroneVampire.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class BloodthroneVampire extends mage.sets.riseoftheeldrazi.BloodthroneVampire { + + public BloodthroneVampire(UUID ownerId) { + super(ownerId); + this.cardNumber = 46; + this.expansionSetCode = "DDP"; + } + + public BloodthroneVampire(final BloodthroneVampire card) { + super(card); + } + + @Override + public BloodthroneVampire copy() { + return new BloodthroneVampire(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/ButcherOfMalakir.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/ButcherOfMalakir.java new file mode 100644 index 0000000000..b6cc30b4eb --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/ButcherOfMalakir.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ButcherOfMalakir extends mage.sets.worldwake.ButcherOfMalakir { + + public ButcherOfMalakir(UUID ownerId) { + super(ownerId); + this.cardNumber = 47; + this.expansionSetCode = "DDP"; + } + + public ButcherOfMalakir(final ButcherOfMalakir card) { + super(card); + } + + @Override + public ButcherOfMalakir copy() { + return new ButcherOfMalakir(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/CadaverImp.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/CadaverImp.java new file mode 100644 index 0000000000..b29ded2282 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/CadaverImp.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class CadaverImp extends mage.sets.riseoftheeldrazi.CadaverImp { + + public CadaverImp(UUID ownerId) { + super(ownerId); + this.cardNumber = 48; + this.expansionSetCode = "DDP"; + } + + public CadaverImp(final CadaverImp card) { + super(card); + } + + @Override + public CadaverImp copy() { + return new CadaverImp(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/CaravanEscort.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/CaravanEscort.java new file mode 100644 index 0000000000..ca835f7380 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/CaravanEscort.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class CaravanEscort extends mage.sets.riseoftheeldrazi.CaravanEscort { + + public CaravanEscort(UUID ownerId) { + super(ownerId); + this.cardNumber = 3; + this.expansionSetCode = "DDP"; + } + + public CaravanEscort(final CaravanEscort card) { + super(card); + } + + @Override + public CaravanEscort copy() { + return new CaravanEscort(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/ConsumeTheMeek.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/ConsumeTheMeek.java new file mode 100644 index 0000000000..f0ab133945 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/ConsumeTheMeek.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ConsumeTheMeek extends mage.sets.riseoftheeldrazi.ConsumeTheMeek { + + public ConsumeTheMeek(UUID ownerId) { + super(ownerId); + this.cardNumber = 49; + this.expansionSetCode = "DDP"; + } + + public ConsumeTheMeek(final ConsumeTheMeek card) { + super(card); + } + + @Override + public ConsumeTheMeek copy() { + return new ConsumeTheMeek(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/Corpsehatch.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Corpsehatch.java new file mode 100644 index 0000000000..d773fac09f --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Corpsehatch.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Corpsehatch extends mage.sets.riseoftheeldrazi.Corpsehatch { + + public Corpsehatch(UUID ownerId) { + super(ownerId); + this.cardNumber = 50; + this.expansionSetCode = "DDP"; + } + + public Corpsehatch(final Corpsehatch card) { + super(card); + } + + @Override + public Corpsehatch copy() { + return new Corpsehatch(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/DaggerbackBasilisk.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/DaggerbackBasilisk.java new file mode 100644 index 0000000000..12a2bf2ecf --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/DaggerbackBasilisk.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DaggerbackBasilisk extends mage.sets.riseoftheeldrazi.DaggerbackBasilisk { + + public DaggerbackBasilisk(UUID ownerId) { + super(ownerId); + this.cardNumber = 11; + this.expansionSetCode = "DDP"; + } + + public DaggerbackBasilisk(final DaggerbackBasilisk card) { + super(card); + } + + @Override + public DaggerbackBasilisk copy() { + return new DaggerbackBasilisk(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/EldraziTemple.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/EldraziTemple.java new file mode 100644 index 0000000000..c8e18c7664 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/EldraziTemple.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.zendikarvseldrazi; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class EldraziTemple extends mage.sets.riseoftheeldrazi.EldraziTemple { + + public EldraziTemple(UUID ownerId) { + super(ownerId); + this.cardNumber = 68; + this.expansionSetCode = "DDP"; + this.rarity = Rarity.UNCOMMON; + } + + public EldraziTemple(final EldraziTemple card) { + super(card); + } + + @Override + public EldraziTemple copy() { + return new EldraziTemple(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/EmrakulsHatcher.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/EmrakulsHatcher.java new file mode 100644 index 0000000000..2f19778d32 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/EmrakulsHatcher.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class EmrakulsHatcher extends mage.sets.riseoftheeldrazi.EmrakulsHatcher { + + public EmrakulsHatcher(UUID ownerId) { + super(ownerId); + this.cardNumber = 59; + this.expansionSetCode = "DDP"; + } + + public EmrakulsHatcher(final EmrakulsHatcher card) { + super(card); + } + + @Override + public EmrakulsHatcher copy() { + return new EmrakulsHatcher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/EvolvingWilds.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/EvolvingWilds.java new file mode 100644 index 0000000000..e958eaa429 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/EvolvingWilds.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class EvolvingWilds extends mage.sets.riseoftheeldrazi.EvolvingWilds { + + public EvolvingWilds(UUID ownerId) { + super(ownerId); + this.cardNumber = 31; + this.expansionSetCode = "DDP"; + } + + public EvolvingWilds(final EvolvingWilds card) { + super(card); + } + + @Override + public EvolvingWilds copy() { + return new EvolvingWilds(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/ExplorersScope.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/ExplorersScope.java new file mode 100644 index 0000000000..2a2ea95697 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/ExplorersScope.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.zendikarvseldrazi; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class ExplorersScope extends mage.sets.zendikar.ExplorersScope { + + public ExplorersScope(UUID ownerId) { + super(ownerId); + this.cardNumber = 28; + this.expansionSetCode = "DDP"; + this.rarity = Rarity.UNCOMMON; + } + + public ExplorersScope(final ExplorersScope card) { + super(card); + } + + @Override + public ExplorersScope copy() { + return new ExplorersScope(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/Forest1.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Forest1.java new file mode 100644 index 0000000000..9d8e5d4a4d --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Forest1.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Forest1 extends mage.cards.basiclands.Forest { + + public Forest1(UUID ownerId) { + super(ownerId, 38); + this.expansionSetCode = "DDP"; + } + + public Forest1(final Forest1 card) { + super(card); + } + + @Override + public Forest1 copy() { + return new Forest1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/Forest2.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Forest2.java new file mode 100644 index 0000000000..f85611bd15 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Forest2.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Forest2 extends mage.cards.basiclands.Forest { + + public Forest2(UUID ownerId) { + super(ownerId, 39); + this.expansionSetCode = "DDP"; + } + + public Forest2(final Forest2 card) { + super(card); + } + + @Override + public Forest2 copy() { + return new Forest2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/Forest3.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Forest3.java new file mode 100644 index 0000000000..b65992fa0c --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Forest3.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Forest3 extends mage.cards.basiclands.Forest { + + public Forest3(UUID ownerId) { + super(ownerId, 40); + this.expansionSetCode = "DDP"; + } + + public Forest3(final Forest3 card) { + super(card); + } + + @Override + public Forest3 copy() { + return new Forest3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/ForkedBolt.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/ForkedBolt.java new file mode 100644 index 0000000000..3722dea752 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/ForkedBolt.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ForkedBolt extends mage.sets.riseoftheeldrazi.ForkedBolt { + + public ForkedBolt(UUID ownerId) { + super(ownerId); + this.cardNumber = 60; + this.expansionSetCode = "DDP"; + } + + public ForkedBolt(final ForkedBolt card) { + super(card); + } + + @Override + public ForkedBolt copy() { + return new ForkedBolt(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/FrontierGuide.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/FrontierGuide.java new file mode 100644 index 0000000000..b4843dd070 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/FrontierGuide.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class FrontierGuide extends mage.sets.zendikar.FrontierGuide { + + public FrontierGuide(UUID ownerId) { + super(ownerId); + this.cardNumber = 12; + this.expansionSetCode = "DDP"; + } + + public FrontierGuide(final FrontierGuide card) { + super(card); + } + + @Override + public FrontierGuide copy() { + return new FrontierGuide(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/GraypeltHunter.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/GraypeltHunter.java new file mode 100644 index 0000000000..c173909d57 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/GraypeltHunter.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class GraypeltHunter extends mage.sets.worldwake.GraypeltHunter { + + public GraypeltHunter(UUID ownerId) { + super(ownerId); + this.cardNumber = 13; + this.expansionSetCode = "DDP"; + } + + public GraypeltHunter(final GraypeltHunter card) { + super(card); + } + + @Override + public GraypeltHunter copy() { + return new GraypeltHunter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/GraypeltRefuge.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/GraypeltRefuge.java new file mode 100644 index 0000000000..62ed8e05e3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/GraypeltRefuge.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class GraypeltRefuge extends mage.sets.zendikar.GraypeltRefuge { + + public GraypeltRefuge(UUID ownerId) { + super(ownerId); + this.cardNumber = 32; + this.expansionSetCode = "DDP"; + } + + public GraypeltRefuge(final GraypeltRefuge card) { + super(card); + } + + @Override + public GraypeltRefuge copy() { + return new GraypeltRefuge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/GrazingGladehart.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/GrazingGladehart.java new file mode 100644 index 0000000000..67aad1851b --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/GrazingGladehart.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class GrazingGladehart extends mage.sets.zendikar.GrazingGladehart { + + public GrazingGladehart(UUID ownerId) { + super(ownerId); + this.cardNumber = 14; + this.expansionSetCode = "DDP"; + } + + public GrazingGladehart(final GrazingGladehart card) { + super(card); + } + + @Override + public GrazingGladehart copy() { + return new GrazingGladehart(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/Groundswell.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Groundswell.java new file mode 100644 index 0000000000..0744ac7192 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Groundswell.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Groundswell extends mage.sets.worldwake.Groundswell { + + public Groundswell(UUID ownerId) { + super(ownerId); + this.cardNumber = 15; + this.expansionSetCode = "DDP"; + } + + public Groundswell(final Groundswell card) { + super(card); + } + + @Override + public Groundswell copy() { + return new Groundswell(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/Harrow.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Harrow.java new file mode 100644 index 0000000000..d8fa9e400f --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Harrow.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Harrow extends mage.sets.zendikar.Harrow { + + public Harrow(UUID ownerId) { + super(ownerId); + this.cardNumber = 16; + this.expansionSetCode = "DDP"; + } + + public Harrow(final Harrow card) { + super(card); + } + + @Override + public Harrow copy() { + return new Harrow(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/HeartstabberMosquito.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/HeartstabberMosquito.java new file mode 100644 index 0000000000..7951e57aed --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/HeartstabberMosquito.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class HeartstabberMosquito extends mage.sets.zendikar.HeartstabberMosquito { + + public HeartstabberMosquito(UUID ownerId) { + super(ownerId); + this.cardNumber = 52; + this.expansionSetCode = "DDP"; + } + + public HeartstabberMosquito(final HeartstabberMosquito card) { + super(card); + } + + @Override + public HeartstabberMosquito copy() { + return new HeartstabberMosquito(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/HellionEruption.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/HellionEruption.java new file mode 100644 index 0000000000..0144b2c535 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/HellionEruption.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class HellionEruption extends mage.sets.riseoftheeldrazi.HellionEruption { + + public HellionEruption(UUID ownerId) { + super(ownerId); + this.cardNumber = 61; + this.expansionSetCode = "DDP"; + } + + public HellionEruption(final HellionEruption card) { + super(card); + } + + @Override + public HellionEruption copy() { + return new HellionEruption(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/InduceDespair.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/InduceDespair.java new file mode 100644 index 0000000000..976002758b --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/InduceDespair.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class InduceDespair extends mage.sets.riseoftheeldrazi.InduceDespair { + + public InduceDespair(UUID ownerId) { + super(ownerId); + this.cardNumber = 53; + this.expansionSetCode = "DDP"; + } + + public InduceDespair(final InduceDespair card) { + super(card); + } + + @Override + public InduceDespair copy() { + return new InduceDespair(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/ItThatBetrays.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/ItThatBetrays.java new file mode 100644 index 0000000000..bb8f9ec715 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/ItThatBetrays.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ItThatBetrays extends mage.sets.riseoftheeldrazi.ItThatBetrays { + + public ItThatBetrays(UUID ownerId) { + super(ownerId); + this.cardNumber = 43; + this.expansionSetCode = "DDP"; + } + + public ItThatBetrays(final ItThatBetrays card) { + super(card); + } + + @Override + public ItThatBetrays copy() { + return new ItThatBetrays(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/JoragaBard.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/JoragaBard.java new file mode 100644 index 0000000000..77ef10b33e --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/JoragaBard.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class JoragaBard extends mage.sets.zendikar.JoragaBard { + + public JoragaBard(UUID ownerId) { + super(ownerId); + this.cardNumber = 17; + this.expansionSetCode = "DDP"; + } + + public JoragaBard(final JoragaBard card) { + super(card); + } + + @Override + public JoragaBard copy() { + return new JoragaBard(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/KabiraVindicator.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/KabiraVindicator.java new file mode 100644 index 0000000000..82aecd4d55 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/KabiraVindicator.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class KabiraVindicator extends mage.sets.riseoftheeldrazi.KabiraVindicator { + + public KabiraVindicator(UUID ownerId) { + super(ownerId); + this.cardNumber = 4; + this.expansionSetCode = "DDP"; + } + + public KabiraVindicator(final KabiraVindicator card) { + super(card); + } + + @Override + public KabiraVindicator copy() { + return new KabiraVindicator(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/KhalniHeartExpedition.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/KhalniHeartExpedition.java new file mode 100644 index 0000000000..7364cfa8cf --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/KhalniHeartExpedition.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class KhalniHeartExpedition extends mage.sets.zendikar.KhalniHeartExpedition { + + public KhalniHeartExpedition(UUID ownerId) { + super(ownerId); + this.cardNumber = 18; + this.expansionSetCode = "DDP"; + } + + public KhalniHeartExpedition(final KhalniHeartExpedition card) { + super(card); + } + + @Override + public KhalniHeartExpedition copy() { + return new KhalniHeartExpedition(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/KnightOfCliffhaven.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/KnightOfCliffhaven.java new file mode 100644 index 0000000000..3ba6d8f6b5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/KnightOfCliffhaven.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class KnightOfCliffhaven extends mage.sets.riseoftheeldrazi.KnightOfCliffhaven { + + public KnightOfCliffhaven(UUID ownerId) { + super(ownerId); + this.cardNumber = 5; + this.expansionSetCode = "DDP"; + } + + public KnightOfCliffhaven(final KnightOfCliffhaven card) { + super(card); + } + + @Override + public KnightOfCliffhaven copy() { + return new KnightOfCliffhaven(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/Magmaw.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Magmaw.java new file mode 100644 index 0000000000..54a13892c1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Magmaw.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Magmaw extends mage.sets.riseoftheeldrazi.Magmaw { + + public Magmaw(UUID ownerId) { + super(ownerId); + this.cardNumber = 62; + this.expansionSetCode = "DDP"; + } + + public Magmaw(final Magmaw card) { + super(card); + } + + @Override + public Magmaw copy() { + return new Magmaw(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/MakindiGriffin.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/MakindiGriffin.java new file mode 100644 index 0000000000..9b932dc326 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/MakindiGriffin.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class MakindiGriffin extends mage.sets.riseoftheeldrazi.MakindiGriffin { + + public MakindiGriffin(UUID ownerId) { + super(ownerId); + this.cardNumber = 6; + this.expansionSetCode = "DDP"; + } + + public MakindiGriffin(final MakindiGriffin card) { + super(card); + } + + @Override + public MakindiGriffin copy() { + return new MakindiGriffin(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/MarshCasualties.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/MarshCasualties.java new file mode 100644 index 0000000000..d0e6f06ba6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/MarshCasualties.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class MarshCasualties extends mage.sets.zendikar.MarshCasualties { + + public MarshCasualties(UUID ownerId) { + super(ownerId); + this.cardNumber = 54; + this.expansionSetCode = "DDP"; + } + + public MarshCasualties(final MarshCasualties card) { + super(card); + } + + @Override + public MarshCasualties copy() { + return new MarshCasualties(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/MindStone.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/MindStone.java new file mode 100644 index 0000000000..c6188c788b --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/MindStone.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class MindStone extends mage.sets.tenthedition.MindStone { + + public MindStone(UUID ownerId) { + super(ownerId); + this.cardNumber = 65; + this.expansionSetCode = "DDP"; + } + + public MindStone(final MindStone card) { + super(card); + } + + @Override + public MindStone copy() { + return new MindStone(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/Mountain1.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Mountain1.java new file mode 100644 index 0000000000..ca96eaf663 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Mountain1.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Mountain1 extends mage.cards.basiclands.Mountain { + + public Mountain1(UUID ownerId) { + super(ownerId, 73); + this.expansionSetCode = "DDP"; + } + + public Mountain1(final Mountain1 card) { + super(card); + } + + @Override + public Mountain1 copy() { + return new Mountain1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/Mountain2.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Mountain2.java new file mode 100644 index 0000000000..d111d89f00 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Mountain2.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Mountain2 extends mage.cards.basiclands.Mountain { + + public Mountain2(UUID ownerId) { + super(ownerId, 74); + this.expansionSetCode = "DDP"; + } + + public Mountain2(final Mountain2 card) { + super(card); + } + + @Override + public Mountain2 copy() { + return new Mountain2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/Mountain3.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Mountain3.java new file mode 100644 index 0000000000..0989f3b195 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Mountain3.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Mountain3 extends mage.cards.basiclands.Mountain { + + public Mountain3(UUID ownerId) { + super(ownerId, 75); + this.expansionSetCode = "DDP"; + } + + public Mountain3(final Mountain3 card) { + super(card); + } + + @Override + public Mountain3 copy() { + return new Mountain3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/OnduGiant.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/OnduGiant.java new file mode 100644 index 0000000000..fcd3f7da7d --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/OnduGiant.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class OnduGiant extends mage.sets.riseoftheeldrazi.OnduGiant { + + public OnduGiant(UUID ownerId) { + super(ownerId); + this.cardNumber = 19; + this.expansionSetCode = "DDP"; + } + + public OnduGiant(final OnduGiant card) { + super(card); + } + + @Override + public OnduGiant copy() { + return new OnduGiant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/Oust.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Oust.java new file mode 100644 index 0000000000..4c697dae8b --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Oust.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Oust extends mage.sets.riseoftheeldrazi.Oust { + + public Oust(UUID ownerId) { + super(ownerId); + this.cardNumber = 7; + this.expansionSetCode = "DDP"; + } + + public Oust(final Oust card) { + super(card); + } + + @Override + public Oust copy() { + return new Oust(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/PawnOfUlamog.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/PawnOfUlamog.java new file mode 100644 index 0000000000..a21afa97ad --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/PawnOfUlamog.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class PawnOfUlamog extends mage.sets.riseoftheeldrazi.PawnOfUlamog { + + public PawnOfUlamog(UUID ownerId) { + super(ownerId); + this.cardNumber = 55; + this.expansionSetCode = "DDP"; + } + + public PawnOfUlamog(final PawnOfUlamog card) { + super(card); + } + + @Override + public PawnOfUlamog copy() { + return new PawnOfUlamog(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/Plains1.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Plains1.java new file mode 100644 index 0000000000..1ae9c56ab7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Plains1.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Plains1 extends mage.cards.basiclands.Plains { + + public Plains1(UUID ownerId) { + super(ownerId, 35); + this.expansionSetCode = "DDP"; + } + + public Plains1(final Plains1 card) { + super(card); + } + + @Override + public Plains1 copy() { + return new Plains1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/Plains2.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Plains2.java new file mode 100644 index 0000000000..2637e408be --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Plains2.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Plains2 extends mage.cards.basiclands.Plains { + + public Plains2(UUID ownerId) { + super(ownerId, 36); + this.expansionSetCode = "DDP"; + } + + public Plains2(final Plains2 card) { + super(card); + } + + @Override + public Plains2 copy() { + return new Plains2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/Plains3.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Plains3.java new file mode 100644 index 0000000000..93ab89238a --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Plains3.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Plains3 extends mage.cards.basiclands.Plains { + + public Plains3(UUID ownerId) { + super(ownerId, 37); + this.expansionSetCode = "DDP"; + } + + public Plains3(final Plains3 card) { + super(card); + } + + @Override + public Plains3 copy() { + return new Plains3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/PrimalCommand.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/PrimalCommand.java new file mode 100644 index 0000000000..c4972bf4ee --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/PrimalCommand.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class PrimalCommand extends mage.sets.lorwyn.PrimalCommand { + + public PrimalCommand(UUID ownerId) { + super(ownerId); + this.cardNumber = 20; + this.expansionSetCode = "DDP"; + } + + public PrimalCommand(final PrimalCommand card) { + super(card); + } + + @Override + public PrimalCommand copy() { + return new PrimalCommand(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/ReadTheBones.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/ReadTheBones.java new file mode 100644 index 0000000000..501b0e742e --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/ReadTheBones.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ReadTheBones extends mage.sets.theros.ReadTheBones { + + public ReadTheBones(UUID ownerId) { + super(ownerId); + this.cardNumber = 56; + this.expansionSetCode = "DDP"; + } + + public ReadTheBones(final ReadTheBones card) { + super(card); + } + + @Override + public ReadTheBones copy() { + return new ReadTheBones(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/RepelTheDarkness.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/RepelTheDarkness.java new file mode 100644 index 0000000000..f81bb35304 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/RepelTheDarkness.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class RepelTheDarkness extends mage.sets.riseoftheeldrazi.RepelTheDarkness { + + public RepelTheDarkness(UUID ownerId) { + super(ownerId); + this.cardNumber = 8; + this.expansionSetCode = "DDP"; + } + + public RepelTheDarkness(final RepelTheDarkness card) { + super(card); + } + + @Override + public RepelTheDarkness copy() { + return new RepelTheDarkness(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/RetreatToKazandu.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/RetreatToKazandu.java new file mode 100644 index 0000000000..07b4496292 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/RetreatToKazandu.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.zendikarvseldrazi; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.common.LandfallAbility; +import mage.abilities.effects.common.GainLifeEffect; +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 fireshoes + */ +public class RetreatToKazandu extends CardImpl { + + public RetreatToKazandu(UUID ownerId) { + super(ownerId, 21, "Retreat to Kazandu", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + this.expansionSetCode = "DDP"; + + // 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. + LandfallAbility ability = new LandfallAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), false); + ability.addTarget(new TargetCreaturePermanent()); + Mode mode = new Mode(); + mode.getEffects().add(new GainLifeEffect(2)); + ability.addMode(mode); + this.addAbility(ability); + } + + public RetreatToKazandu(final RetreatToKazandu card) { + super(card); + } + + @Override + public RetreatToKazandu copy() { + return new RetreatToKazandu(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/RockyTarPit.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/RockyTarPit.java new file mode 100644 index 0000000000..993dcce4f9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/RockyTarPit.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class RockyTarPit extends mage.sets.mirage.RockyTarPit { + + public RockyTarPit(UUID ownerId) { + super(ownerId); + this.cardNumber = 69; + this.expansionSetCode = "DDP"; + } + + public RockyTarPit(final RockyTarPit card) { + super(card); + } + + @Override + public RockyTarPit copy() { + return new RockyTarPit(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/RunedServitor.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/RunedServitor.java new file mode 100644 index 0000000000..9def3c5dff --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/RunedServitor.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class RunedServitor extends mage.sets.riseoftheeldrazi.RunedServitor { + + public RunedServitor(UUID ownerId) { + super(ownerId); + this.cardNumber = 66; + this.expansionSetCode = "DDP"; + } + + public RunedServitor(final RunedServitor card) { + super(card); + } + + @Override + public RunedServitor copy() { + return new RunedServitor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/ScuteMob.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/ScuteMob.java new file mode 100644 index 0000000000..5e469dcb1d --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/ScuteMob.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ScuteMob extends mage.sets.zendikar.ScuteMob { + + public ScuteMob(UUID ownerId) { + super(ownerId); + this.cardNumber = 22; + this.expansionSetCode = "DDP"; + } + + public ScuteMob(final ScuteMob card) { + super(card); + } + + @Override + public ScuteMob copy() { + return new ScuteMob(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/SeersSundial.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/SeersSundial.java new file mode 100644 index 0000000000..f62a7e72f9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/SeersSundial.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SeersSundial extends mage.sets.worldwake.SeersSundial { + + public SeersSundial(UUID ownerId) { + super(ownerId); + this.cardNumber = 29; + this.expansionSetCode = "DDP"; + } + + public SeersSundial(final SeersSundial card) { + super(card); + } + + @Override + public SeersSundial copy() { + return new SeersSundial(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/Smother.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Smother.java new file mode 100644 index 0000000000..be12e7e00e --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Smother.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Smother extends mage.sets.worldwake.Smother { + + public Smother(UUID ownerId) { + super(ownerId); + this.cardNumber = 57; + this.expansionSetCode = "DDP"; + } + + public Smother(final Smother card) { + super(card); + } + + @Override + public Smother copy() { + return new Smother(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/StirringWildwood.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/StirringWildwood.java new file mode 100644 index 0000000000..10277a1dc7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/StirringWildwood.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class StirringWildwood extends mage.sets.worldwake.StirringWildwood { + + public StirringWildwood(UUID ownerId) { + super(ownerId); + this.cardNumber = 33; + this.expansionSetCode = "DDP"; + } + + public StirringWildwood(final StirringWildwood card) { + super(card); + } + + @Override + public StirringWildwood copy() { + return new StirringWildwood(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/StoneworkPuma.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/StoneworkPuma.java new file mode 100644 index 0000000000..131308063a --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/StoneworkPuma.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class StoneworkPuma extends mage.sets.zendikar.StoneworkPuma { + + public StoneworkPuma(UUID ownerId) { + super(ownerId); + this.cardNumber = 30; + this.expansionSetCode = "DDP"; + } + + public StoneworkPuma(final StoneworkPuma card) { + super(card); + } + + @Override + public StoneworkPuma copy() { + return new StoneworkPuma(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/Swamp1.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Swamp1.java new file mode 100644 index 0000000000..7affb99410 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Swamp1.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Swamp1 extends mage.cards.basiclands.Swamp { + + public Swamp1(UUID ownerId) { + super(ownerId, 70); + this.expansionSetCode = "DDP"; + } + + public Swamp1(final Swamp1 card) { + super(card); + } + + @Override + public Swamp1 copy() { + return new Swamp1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/Swamp2.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Swamp2.java new file mode 100644 index 0000000000..bbd6709546 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Swamp2.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Swamp2 extends mage.cards.basiclands.Swamp { + + public Swamp2(UUID ownerId) { + super(ownerId, 71); + this.expansionSetCode = "DDP"; + } + + public Swamp2(final Swamp2 card) { + super(card); + } + + @Override + public Swamp2 copy() { + return new Swamp2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/Swamp3.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Swamp3.java new file mode 100644 index 0000000000..f33970248b --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/Swamp3.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Swamp3 extends mage.cards.basiclands.Swamp { + + public Swamp3(UUID ownerId) { + super(ownerId, 72); + this.expansionSetCode = "DDP"; + } + + public Swamp3(final Swamp3 card) { + super(card); + } + + @Override + public Swamp3 copy() { + return new Swamp3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/TajuruArcher.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/TajuruArcher.java new file mode 100644 index 0000000000..ee274b7ed7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/TajuruArcher.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class TajuruArcher extends mage.sets.zendikar.TajuruArcher { + + public TajuruArcher(UUID ownerId) { + super(ownerId); + this.cardNumber = 23; + this.expansionSetCode = "DDP"; + } + + public TajuruArcher(final TajuruArcher card) { + super(card); + } + + @Override + public TajuruArcher copy() { + return new TajuruArcher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/TerritorialBaloth.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/TerritorialBaloth.java new file mode 100644 index 0000000000..3cf3a4057c --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class TerritorialBaloth extends mage.sets.zendikar.TerritorialBaloth { + + public TerritorialBaloth(UUID ownerId) { + super(ownerId); + this.cardNumber = 24; + this.expansionSetCode = "DDP"; + } + + public TerritorialBaloth(final TerritorialBaloth card) { + super(card); + } + + @Override + public TerritorialBaloth copy() { + return new TerritorialBaloth(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/TorchSlinger.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/TorchSlinger.java new file mode 100644 index 0000000000..e3b0961677 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/TorchSlinger.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class TorchSlinger extends mage.sets.zendikar.TorchSlinger { + + public TorchSlinger(UUID ownerId) { + super(ownerId); + this.cardNumber = 63; + this.expansionSetCode = "DDP"; + } + + public TorchSlinger(final TorchSlinger card) { + super(card); + } + + @Override + public TorchSlinger copy() { + return new TorchSlinger(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/TurntimberBasilisk.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/TurntimberBasilisk.java new file mode 100644 index 0000000000..9cd597887d --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/TurntimberBasilisk.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class TurntimberBasilisk extends mage.sets.zendikar.TurntimberBasilisk { + + public TurntimberBasilisk(UUID ownerId) { + super(ownerId); + this.cardNumber = 25; + this.expansionSetCode = "DDP"; + } + + public TurntimberBasilisk(final TurntimberBasilisk card) { + super(card); + } + + @Override + public TurntimberBasilisk copy() { + return new TurntimberBasilisk(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/TurntimberGrove.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/TurntimberGrove.java new file mode 100644 index 0000000000..ee78b72004 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/TurntimberGrove.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class TurntimberGrove extends mage.sets.zendikar.TurntimberGrove { + + public TurntimberGrove(UUID ownerId) { + super(ownerId); + this.cardNumber = 34; + this.expansionSetCode = "DDP"; + } + + public TurntimberGrove(final TurntimberGrove card) { + super(card); + } + + @Override + public TurntimberGrove copy() { + return new TurntimberGrove(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/UlamogsCrusher.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/UlamogsCrusher.java new file mode 100644 index 0000000000..d9955f5181 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/UlamogsCrusher.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class UlamogsCrusher extends mage.sets.riseoftheeldrazi.UlamogsCrusher { + + public UlamogsCrusher(UUID ownerId) { + super(ownerId); + this.cardNumber = 44; + this.expansionSetCode = "DDP"; + } + + public UlamogsCrusher(final UlamogsCrusher card) { + super(card); + } + + @Override + public UlamogsCrusher copy() { + return new UlamogsCrusher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/VampireNighthawk.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/VampireNighthawk.java new file mode 100644 index 0000000000..62f3c0a0fa --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/VampireNighthawk.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class VampireNighthawk extends mage.sets.zendikar.VampireNighthawk { + + public VampireNighthawk(UUID ownerId) { + super(ownerId); + this.cardNumber = 58; + this.expansionSetCode = "DDP"; + } + + public VampireNighthawk(final VampireNighthawk card) { + super(card); + } + + @Override + public VampireNighthawk copy() { + return new VampireNighthawk(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/VeteranWarleader.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/VeteranWarleader.java new file mode 100644 index 0000000000..234e3e4a15 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/VeteranWarleader.java @@ -0,0 +1,158 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.zendikarvseldrazi; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapTargetCost; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +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.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author fireshoes + */ +public class VeteranWarleader extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another untapped Ally"); + + static { + filter.add(new AnotherPredicate()); + filter.add(new SubtypePredicate("Ally")); + } + + public VeteranWarleader(UUID ownerId) { + super(ownerId, 27, "Veteran Warleader", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{G}{W}"); + this.expansionSetCode = "DDP"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.subtype.add("Ally"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // 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, + new VeteranWarleaderEffect(), new TapTargetCost(new TargetControlledPermanent(1, 1, filter, true)))); + } + + public VeteranWarleader(final VeteranWarleader card) { + super(card); + } + + @Override + public VeteranWarleader copy() { + return new VeteranWarleader(this); + } +} + +class VeteranWarleaderEffect extends OneShotEffect { + VeteranWarleaderEffect() { + super(Outcome.AddAbility); + staticText = "{this} gains your choice of first strike, vigilance, or trample until end of turn"; + } + + VeteranWarleaderEffect(final VeteranWarleaderEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (sourceObject != null && controller != null) { + Choice abilityChoice = new ChoiceImpl(); + abilityChoice.setMessage("Choose an ability to add"); + + Set abilities = new HashSet<>(); + abilities.add(FirstStrikeAbility.getInstance().getRule()); + abilities.add(VigilanceAbility.getInstance().getRule()); + abilities.add(TrampleAbility.getInstance().getRule()); + abilityChoice.setChoices(abilities); + while (!abilityChoice.isChosen()) { + controller.choose(Outcome.AddAbility, abilityChoice, game); + if (!controller.canRespond()) { + return false; + } + } + + String chosen = abilityChoice.getChoice(); + Ability ability = null; + if (FirstStrikeAbility.getInstance().getRule().equals(chosen)) { + ability = FirstStrikeAbility.getInstance(); + } else if (VigilanceAbility.getInstance().getRule().equals(chosen)) { + ability = VigilanceAbility.getInstance(); + } else if (TrampleAbility.getInstance().getRule().equals(chosen)) { + ability = TrampleAbility.getInstance(); + } + + if (ability != null) { + game.informPlayers(sourceObject.getLogName() + ": " + controller.getLogName() + " has chosen: " + chosen); + ContinuousEffect effect = new GainAbilitySourceEffect(ability, Duration.EndOfTurn); + game.addEffect(effect, source); + return true; + } + } + return false; + } + + @Override + public VeteranWarleaderEffect copy() { + return new VeteranWarleaderEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/zendikarvseldrazi/WildheartInvoker.java b/Mage.Sets/src/mage/sets/zendikarvseldrazi/WildheartInvoker.java new file mode 100644 index 0000000000..a2d95524a8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikarvseldrazi/WildheartInvoker.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.zendikarvseldrazi; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class WildheartInvoker extends mage.sets.riseoftheeldrazi.WildheartInvoker { + + public WildheartInvoker(UUID ownerId) { + super(ownerId); + this.cardNumber = 26; + this.expansionSetCode = "DDP"; + } + + public WildheartInvoker(final WildheartInvoker card) { + super(card); + } + + @Override + public WildheartInvoker copy() { + return new WildheartInvoker(this); + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/MorphTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/MorphTest.java index 60991689d7..0e045507f5 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/MorphTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/MorphTest.java @@ -612,4 +612,34 @@ public class MorphTest extends CardTestPlayerBase { assertPermanentCount(playerA, "", 1); } + + /** + * Linvala, Keep of Silence is preventing morph creatures from turning face + * up Turning face up is a special ability not an active ability. This + * should not be prevented by the loss of active abilities. + */ + @Test + public void testTurnFaceUpWithLinvala() { + addCard(Zone.HAND, playerA, "Pine Walker"); + addCard(Zone.BATTLEFIELD, playerA, "Forest", 5); + + addCard(Zone.BATTLEFIELD, playerB, "Linvala, Keeper of Silence", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Pine Walker"); + setChoice(playerA, "Yes"); // cast it face down as 2/2 creature + + attack(3, playerA, ""); + + activateAbility(3, PhaseStep.POSTCOMBAT_MAIN, playerA, "{4}{G}: Turn this face-down permanent face up."); + setStopAt(3, PhaseStep.END_TURN); + execute(); + + assertLife(playerB, 18); + + assertPermanentCount(playerA, "", 0); + assertPermanentCount(playerA, "Pine Walker", 1); + assertPowerToughness(playerA, "Pine Walker", 5, 5); + assertTapped("Pine Walker", false); + + } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/PersistTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/PersistTest.java index 5f2859f6c1..a5c8ac0099 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/PersistTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/PersistTest.java @@ -3,7 +3,6 @@ * To change this template file, choose Tools | Templates * and open the template in the editor. */ - package org.mage.test.cards.abilities.keywords; import mage.constants.PhaseStep; @@ -15,33 +14,32 @@ import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; /** - * 702.78. Persist - * 702.78a Persist is a triggered ability. "Persist" means "When this permanent is put into a graveyard - * from the battlefield, 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." + * 702.78. Persist 702.78a Persist is a triggered ability. "Persist" means "When + * this permanent is put into a graveyard from the battlefield, 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." * * @author LevelX2 */ - public class PersistTest extends CardTestPlayerBase { /** - * Tests Safehold Elite don't returns from Persist if already a -1/-1 counter - * was put on it from another source + * Tests Safehold Elite don't returns from Persist if already a -1/-1 + * counter was put on it from another source * */ @Test public void testUndyingdoesntTriggerWithMinusCounter() { - + // Safehold Elite 2/2 {1}{G/W} // Creature - Elf Scout - // + // // Persist addCard(Zone.BATTLEFIELD, playerA, "Safehold Elite"); // Put a -1/-1 counter on target creature. When that creature dies this turn, its controller gets a poison counter. - addCard(Zone.HAND, playerB, "Virulent Wound",1); - addCard(Zone.HAND, playerB, "Lightning Bolt",1); + addCard(Zone.HAND, playerB, "Virulent Wound", 1); + addCard(Zone.HAND, playerB, "Lightning Bolt", 1); addCard(Zone.BATTLEFIELD, playerB, "Swamp", 1); addCard(Zone.BATTLEFIELD, playerB, "Mountain", 1); @@ -58,9 +56,9 @@ public class PersistTest extends CardTestPlayerBase { Assert.assertEquals(1, playerA.getCounters().getCount(CounterType.POISON)); } - /** - * If a card with persist is removed from a graveyard before the persist ability resolves, persist will do nothing. + * If a card with persist is removed from a graveyard before the persist + * ability resolves, persist will do nothing. */ @Test public void testWontTriggerIfPersistCardIsRemovedFromGraveyard() { @@ -72,14 +70,14 @@ public class PersistTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Safehold Elite"); // Exile target card from a graveyard. You gain 3 life. - addCard(Zone.HAND, playerB, "Lightning Bolt",1); - addCard(Zone.HAND, playerB, "Shadowfeed",1); + addCard(Zone.HAND, playerB, "Lightning Bolt", 1); + addCard(Zone.HAND, playerB, "Shadowfeed", 1); addCard(Zone.BATTLEFIELD, playerB, "Swamp", 1); addCard(Zone.BATTLEFIELD, playerB, "Mountain", 1); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Lightning Bolt", "Safehold Elite"); - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Shadowfeed", "Safehold Elite","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.)"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Shadowfeed", "Safehold Elite", "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.)"); setStopAt(1, PhaseStep.END_TURN); execute(); @@ -103,11 +101,11 @@ public class PersistTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Kitchen Finks", 1); /** - * Deathtouch, lifelink - * When Wurmcoil Engine dies, put a 3/3 colorless Wurm artifact creature token with - * deathtouch and a 3/3 colorless Wurm artifact creature token with lifelink onto the battlefield. + * Deathtouch, lifelink When Wurmcoil Engine dies, put a 3/3 colorless + * Wurm artifact creature token with deathtouch and a 3/3 colorless Wurm + * artifact creature token with lifelink onto the battlefield. */ - addCard(Zone.BATTLEFIELD, playerB, "Wurmcoil Engine",1); + addCard(Zone.BATTLEFIELD, playerB, "Wurmcoil Engine", 1); attack(2, playerB, "Wurmcoil Engine"); block(2, playerA, "Kitchen Finks", "Wurmcoil Engine"); @@ -117,14 +115,13 @@ public class PersistTest extends CardTestPlayerBase { assertPermanentCount(playerB, "Wurmcoil Engine", 1); assertPermanentCount(playerA, "Kitchen Finks", 1); - assertPowerToughness(playerA, "Kitchen Finks", 2,1); + assertPowerToughness(playerA, "Kitchen Finks", 2, 1); assertLife(playerA, 22); // Kitchen Finks +2 life assertLife(playerB, 26); // Wurmcoil Engine +6 ife } - @Test public void testInteractionWithToporOrb() { @@ -137,12 +134,12 @@ public class PersistTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Kitchen Finks", 2); /** - * Deathtouch, lifelink - * When Wurmcoil Engine dies, put a 3/3 colorless Wurm artifact creature token with - * deathtouch and a 3/3 colorless Wurm artifact creature token with lifelink onto the battlefield. + * Deathtouch, lifelink When Wurmcoil Engine dies, put a 3/3 colorless + * Wurm artifact creature token with deathtouch and a 3/3 colorless Wurm + * artifact creature token with lifelink onto the battlefield. */ - addCard(Zone.BATTLEFIELD, playerB, "Wurmcoil Engine",1); - addCard(Zone.BATTLEFIELD, playerB, "Torpor Orb",1); + addCard(Zone.BATTLEFIELD, playerB, "Wurmcoil Engine", 1); + addCard(Zone.BATTLEFIELD, playerB, "Torpor Orb", 1); attack(2, playerB, "Wurmcoil Engine"); block(2, playerA, "Kitchen Finks", "Wurmcoil Engine"); @@ -161,9 +158,44 @@ public class PersistTest extends CardTestPlayerBase { assertPermanentCount(playerB, "Wurm", 2); assertPermanentCount(playerA, "Kitchen Finks", 2); assertPowerToughness(playerA, "Kitchen Finks", 2, 1, Filter.ComparisonScope.All); - + } + /** + * Situation: Clever Impersonator is copying ". Opponent casts Supreme + * Verdict. Persist on the clone of Glen Elendra Archmage triggers and goes + * on the stack, and I am asked to put triggers on the stack. Problem: No + * options pop up. I tried pressing many buttons, but the game was + * deadlocked. + */ + @Test + public void testCopiedCreatureWithPersists() { - // some tests were moved to LastKnownInformationTest + // Flying + // {U}, Sacrifice Glen Elendra Archmage: Counter target noncreature spell. + // Persist + addCard(Zone.BATTLEFIELD, playerB, "Glen Elendra Archmage", 1); // 2/2 + addCard(Zone.BATTLEFIELD, playerB, "Plains", 2); + addCard(Zone.BATTLEFIELD, playerB, "Island", 2); + // Supreme Verdict can't be countered. + // Destroy all creatures. + addCard(Zone.HAND, playerB, "Supreme Verdict", 1); // {1}{W}{W}{U} + + // You may have Clever Impersonator enter the battlefield as a copy of any nonland permanent on the battlefield. + addCard(Zone.HAND, playerA, "Clever Impersonator", 1); + addCard(Zone.BATTLEFIELD, playerA, "Island", 4); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Clever Impersonator"); + setChoice(playerA, "Glen Elendra Archmage"); + + castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Supreme Verdict"); + + setStopAt(2, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerB, "Glen Elendra Archmage", 1); + assertPowerToughness(playerB, "Glen Elendra Archmage", 1, 1); + assertPermanentCount(playerA, "Glen Elendra Archmage", 1); + assertPowerToughness(playerA, "Glen Elendra Archmage", 1, 1); + } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/TransmuteTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/TransmuteTest.java index 0720c51cbe..7010f8e260 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/TransmuteTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/TransmuteTest.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 org.mage.test.cards.abilities.keywords; import mage.constants.PhaseStep; @@ -35,30 +34,34 @@ import org.mage.test.serverside.base.CardTestPlayerBase; /** * - * 702.52. Transmute + * 702.52. Transmute * - * 702.52a Transmute is an activated ability that functions only while the card with transmute is - * in a player’s hand. “Transmute [cost]” means “[Cost], Discard this card: Search your library for - * a card with the same converted mana cost as the discarded card, reveal that card, and put it into - * your hand. Then shuffle your library. Play this ability only any time you could play a sorcery.” + * 702.52a Transmute is an activated ability that functions only while the card + * with transmute is in a player’s hand. “Transmute [cost]” means “[Cost], + * Discard this card: Search your library for a card with the same converted + * mana cost as the discarded card, reveal that card, and put it into your hand. + * Then shuffle your library. Play this ability only any time you could play a + * sorcery.” * - * 702.52b Although the transmute ability is playable only if the card is in a player’s hand, it - * continues to exist while the object is in play and in all other zones. Therefore objects with - * transmute will be affected by effects that depend on objects having one or more activated abilities. + * 702.52b Although the transmute ability is playable only if the card is in a + * player’s hand, it continues to exist while the object is in play and in all + * other zones. Therefore objects with transmute will be affected by effects + * that depend on objects having one or more activated abilities. * * @author LevelX2 */ - -public class TransmuteTest extends CardTestPlayerBase{ +public class TransmuteTest extends CardTestPlayerBase { @Test public void searchSimpleOneManaCmcSpell() { addCard(Zone.BATTLEFIELD, playerA, "Island", 3); + // Target creature gets -3/-0 until end of turn. + // Transmute {1}{U}{U} addCard(Zone.HAND, playerA, "Dizzy Spell"); addCard(Zone.LIBRARY, playerA, "Lightning Bolt"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Transmute {1}{U}{U} ({1}{U}{U}, Discard this card: Search your library for a card with the same converted mana cost as this card, reveal it, and put it into your hand. Then shuffle your library. Transmute only as a sorcery.)"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Transmute {1}{U}{U}"); setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); @@ -74,7 +77,7 @@ public class TransmuteTest extends CardTestPlayerBase{ addCard(Zone.LIBRARY, playerA, "Wear // Tear"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Transmute {1}{U}{U} ({1}{U}{U}, Discard this card: Search your library for a card with the same converted mana cost as this card, reveal it, and put it into your hand. Then shuffle your library. Transmute only as a sorcery.)"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Transmute {1}{U}{U}"); setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); @@ -84,4 +87,4 @@ public class TransmuteTest extends CardTestPlayerBase{ assertHandCount(playerA, "Tear", 1); // Filter search can only search for one side of a split card } -} \ No newline at end of file +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/BoostEnchantedTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/BoostEnchantedTest.java new file mode 100644 index 0000000000..f7db7fd18d --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/BoostEnchantedTest.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 org.mage.test.cards.continuous; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class BoostEnchantedTest extends CardTestPlayerBase { + + @Test + public void testFirebreathingNormal() { + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2); + addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 1); + // {R}: Enchanted creature gets +1/+0 until end of turn. + addCard(Zone.HAND, playerA, "Firebreathing"); // {R} Enchantment - Aura + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Firebreathing", "Silvercoat Lion"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{R}: Enchanted creature"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "Firebreathing", 1); + assertPowerToughness(playerA, "Silvercoat Lion", 3, 2); + } + + /** + * On Ghitu Firebreathing (and probably other similar cards), when you + * activate the ability to give +1/0 to the enchanted creature and the + * return Ghitu Firebreathing to your hand, the +1/0 goes away on the + * creature. If you re-cast Ghitu Firebreathing onto the creature, the boost + * returns. + * + * Gatherer Rulings: 9/25/2006 If you return Ghitu Firebreathing to its + * owner's hand while the +1/+0 ability is on the stack, that ability will + * still give the creature that was last enchanted by Ghitu Firebreathing + * +1/+0. + * + */ + @Test + public void testFirebreathingReturnToHand() { + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2); + addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 1); + // {R}: Enchanted creature gets +1/+0 until end of turn. + addCard(Zone.HAND, playerA, "Firebreathing"); // {R} Enchantment - Aura + + addCard(Zone.BATTLEFIELD, playerB, "Island", 2); + addCard(Zone.HAND, playerB, "Boomerang"); // {U}{U} Instant + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Firebreathing", "Silvercoat Lion"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Boomerang", "Firebreathing"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{R}: Enchanted creature", NO_TARGET, "Boomerang"); + + setStopAt(1, PhaseStep.END_COMBAT); + execute(); + + assertHandCount(playerA, "Firebreathing", 1); + assertGraveyardCount(playerB, "Boomerang", 1); + assertPowerToughness(playerA, "Silvercoat Lion", 3, 2); + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/PlatinumEmperionTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/PlatinumEmperionTest.java new file mode 100644 index 0000000000..c6051d9e32 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/PlatinumEmperionTest.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 org.mage.test.cards.continuous; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class PlatinumEmperionTest extends CardTestPlayerBase { + + @Test + public void testLifeGain() { + // Your life total can't change. + addCard(Zone.BATTLEFIELD, playerA, "Platinum Emperion", 1); + addCard(Zone.BATTLEFIELD, playerA, "Plains", 3); + // You gain 3 life. + // Draw a card. + addCard(Zone.HAND, playerA, "Reviving Dose"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Reviving Dose"); + + setStopAt(2, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, "Reviving Dose", 1); + assertHandCount(playerA, 1); + + assertLife(playerA, 20); + } + + @Test + public void testLifeLoose() { + // Your life total can't change. + addCard(Zone.BATTLEFIELD, playerA, "Platinum Emperion", 1); + // You draw two cards and you lose 2 life. + addCard(Zone.HAND, playerA, "Night's Whisper"); + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 2); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Night's Whisper"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, "Night's Whisper", 1); + assertHandCount(playerA, 2); + + assertLife(playerA, 20); + } + + /** + * Swords to Plowshares and Platinum Emperion doesn't work + */ + @Test + public void testSwordsToPlowshares() { + // Your life total can't change. + addCard(Zone.BATTLEFIELD, playerA, "Platinum Emperion", 1); + addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 1); + // Exile target creature. + // Its controller gains life equal to its power. + addCard(Zone.HAND, playerB, "Swords to Plowshares"); + addCard(Zone.BATTLEFIELD, playerB, "Plains", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Swords to Plowshares", "Silvercoat Lion"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerB, "Swords to Plowshares", 1); + assertExileCount("Silvercoat Lion", 1); + + assertLife(playerA, 20); + } + +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/KikiJikiMirrorBreakerTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/KikiJikiMirrorBreakerTest.java index ac9048c91a..d252e8a6a7 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/copy/KikiJikiMirrorBreakerTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/KikiJikiMirrorBreakerTest.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 org.mage.test.cards.copy; import mage.constants.PhaseStep; @@ -79,6 +78,7 @@ public class KikiJikiMirrorBreakerTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Voice of Resurgence", 1); addCard(Zone.BATTLEFIELD, playerB, "Mountain", 3); + // Flamebreak deals 3 damage to each creature without flying and each player. Creatures dealt damage this way can't be regenerated this turn. addCard(Zone.HAND, playerB, "Flamebreak"); activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Put a token that's a copy of target nonlegendary creature you control onto the battlefield. That token has haste. Sacrifice it at the beginning of the next end step."); @@ -97,7 +97,41 @@ public class KikiJikiMirrorBreakerTest extends CardTestPlayerBase { assertPermanentCount(playerA, "Elemental", 2); - } -} \ No newline at end of file + /** + * Kiki-Jiki, Mirror Breaker creates a copy of Humble Defector, activate + * Humble defector, token gets sacrificed while under opponents control. + */ + @Test + public void testTokenNotSacrificedIfNotControlled() { + addCard(Zone.BATTLEFIELD, playerA, "Island", 1); + // Tap target creature you don't control. + // Overload {3}{U} + addCard(Zone.HAND, playerA, "Blustersquall", 1); + + addCard(Zone.BATTLEFIELD, playerB, "Kiki-Jiki, Mirror Breaker", 1); + // {T}: Draw two cards. Target opponent gains control of Humble Defector. Activate this ability only during your turn. + addCard(Zone.BATTLEFIELD, playerB, "Humble Defector", 1); + + castSpell(2, PhaseStep.UPKEEP, playerA, "Blustersquall", "Humble Defector"); // Tap nontoken Defector so only the Token can be used later + + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{T}: Put a token that's a copy of target nonlegendary creature you control onto the battlefield. That token has haste. Sacrifice it at the beginning of the next end step."); + + activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "{T}: Draw two cards. Target opponent gains control"); + + setStopAt(3, PhaseStep.UPKEEP); + execute(); + + assertLife(playerA, 20); + assertLife(playerB, 20); + + assertHandCount(playerB, 3); // normal 1 draw of turn two + 2 from Defector + + assertGraveyardCount(playerA, "Blustersquall", 1); + assertPermanentCount(playerB, "Humble Defector", 1); + assertPermanentCount(playerA, "Humble Defector", 1); + + } + +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/DrawEffectsTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/DrawEffectsTest.java index e5141680ac..05811424a5 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/DrawEffectsTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/DrawEffectsTest.java @@ -82,4 +82,32 @@ public class DrawEffectsTest extends CardTestPlayerBase { assertHandCount(playerB, 1); } + /** + * Notion thief and Reforge the Soul - opponent got 0 cards - ok but I got + * only 7 cards (should be 14) + */ + @Test + public void testNotionThief2() { + addCard(Zone.LIBRARY, playerA, "Silvercoat Lion", 3); + skipInitShuffling(); + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5); + // Flash + // If an opponent would draw a card except the first one he or she draws in each of his or her draw steps, instead that player skips that draw and you draw a card. + addCard(Zone.BATTLEFIELD, playerA, "Notion Thief", 1); + // Each player discards his or her hand, then draws seven cards. + // Miracle {1}{R} + addCard(Zone.HAND, playerA, "Reforge the Soul", 1); + + addCard(Zone.HAND, playerB, "Mountain", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Reforge the Soul"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, "Reforge the Soul", 1); + assertGraveyardCount(playerB, "Mountain", 1); + assertHandCount(playerA, 14); + assertHandCount(playerB, 0); + } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/ColorCausedTriggerTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/ColorCausedTriggerTest.java new file mode 100644 index 0000000000..2934460301 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/ColorCausedTriggerTest.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 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 ColorCausedTriggerTest extends CardTestPlayerBase { + + @Test + public void testGhostfire() { + // Whenever a player casts a red spell, you may gain 1 life. + addCard(Zone.BATTLEFIELD, playerA, "Dragon's Claw", 1); + + // Ghostfire deals 3 damage to target creature or player. + addCard(Zone.HAND, playerA, "Ghostfire", 1); // {2}{R} + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Ghostfire", playerB); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, "Ghostfire", 1); + + assertLife(playerA, 20); + assertLife(playerB, 17); + } + +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/EntersTheBattlefieldTriggerTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/EntersTheBattlefieldTriggerTest.java new file mode 100644 index 0000000000..fbeebe9d6e --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/EntersTheBattlefieldTriggerTest.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 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 EntersTheBattlefieldTriggerTest extends CardTestPlayerBase { + + @Test + public void testDrawCardsAddedCounters() { + addCard(Zone.BATTLEFIELD, playerA, "Plains", 1); + addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 1); + addCard(Zone.HAND, playerA, "Soul Warden"); + + // You may have Clever Impersonator enter the battlefield as a copy of any nonland permanent on the battlefield. + addCard(Zone.HAND, playerB, "Clever Impersonator", 1); + addCard(Zone.BATTLEFIELD, playerB, "Island", 4); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Soul Warden"); + + castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Clever Impersonator"); + setChoice(playerB, "Silvercoat Lion"); + + setStopAt(2, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "Soul Warden", 1); + assertPermanentCount(playerA, "Silvercoat Lion", 1); + assertPermanentCount(playerB, "Silvercoat Lion", 1); + + assertLife(playerA, 21); + assertLife(playerB, 20); + } + +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/OblivionRingTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/OblivionRingTest.java index 8ff5563c5b..1324dee059 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/OblivionRingTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/OblivionRingTest.java @@ -8,13 +8,15 @@ import org.mage.test.serverside.base.CardTestPlayerBase; /** * @author noxx * - * Card: When Oblivion Ring enters the battlefield, exile another target nonland permanent. - * When Oblivion Ring leaves the battlefield, return the exiled card to the battlefield under its owner's control. + * Card: When Oblivion Ring enters the battlefield, exile another target nonland + * permanent. When Oblivion Ring leaves the battlefield, return the exiled card + * to the battlefield under its owner's control. */ public class OblivionRingTest extends CardTestPlayerBase { /** - * When Oblivion Ring enters the battlefield, exile another target nonland permanent. + * When Oblivion Ring enters the battlefield, exile another target nonland + * permanent. */ @Test public void testFirstTriggeredAbility() { @@ -24,7 +26,7 @@ public class OblivionRingTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Oblivion Ring"); - setStopAt(2, PhaseStep.END_TURN); + setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); assertLife(playerA, 20); @@ -34,7 +36,8 @@ public class OblivionRingTest extends CardTestPlayerBase { } /** - * When Oblivion Ring leaves the battlefield, return the exiled card to the battlefield under its owner's control. + * When Oblivion Ring leaves the battlefield, return the exiled card to the + * battlefield under its owner's control. */ @Test public void testSecondTriggeredAbility() { @@ -79,7 +82,8 @@ public class OblivionRingTest extends CardTestPlayerBase { } /** - * Tests that when Oblivion Ring gets destroyed planeswalker returns with new counters and can be used second time at the same turn + * Tests that when Oblivion Ring gets destroyed planeswalker returns with + * new counters and can be used second time at the same turn */ @Test public void testExilePlaneswalker() { @@ -100,4 +104,36 @@ public class OblivionRingTest extends CardTestPlayerBase { assertPermanentCount(playerA, "Jace Beleren", 1); // returns back assertHandCount(playerA, 2); // can use ability twice } + + /** + * Oblivion Ring leaves from battlefield Effect brings Hangarback Walker + * back with counters. But with rules it should come back with no counters + */ + @Test + public void testReturningHangarbackWalker() { + addCard(Zone.BATTLEFIELD, playerA, "Forest", 4); + // Hangarback Walker enters the battlefield with X +1/+1 counters on it. + // 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. + // {1}, {t}: Put a +1/+1 counter on Hangarback Walker. + addCard(Zone.HAND, playerA, "Hangarback Walker"); // {X}{X} + addCard(Zone.HAND, playerA, "Naturalize"); + + addCard(Zone.BATTLEFIELD, playerB, "Plains", 3); + addCard(Zone.HAND, playerB, "Oblivion Ring"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Hangarback Walker"); + setChoice(playerA, "X=2"); + + castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Oblivion Ring"); + + castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Naturalize", "Oblivion Ring"); + setStopAt(3, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerB, "Oblivion Ring", 0); + assertGraveyardCount(playerB, "Oblivion Ring", 1); + assertPermanentCount(playerA, "Hangarback Walker", 0); + assertGraveyardCount(playerA, "Hangarback Walker", 1); + + } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/SpellskiteTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/SpellskiteTest.java index 083a193605..0eed350bc6 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/SpellskiteTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/SpellskiteTest.java @@ -36,11 +36,11 @@ import org.mage.test.serverside.base.CardTestPlayerBase; * * @author LevelX2 */ - public class SpellskiteTest extends CardTestPlayerBase { /** - * Tests that Wild Defiance triggers for Spellskite if spell target is changed to Spellskite + * Tests that Wild Defiance triggers for Spellskite if spell target is + * changed to Spellskite */ @Test public void testDisabledEffectOnChangeZone() { @@ -64,19 +64,22 @@ public class SpellskiteTest extends CardTestPlayerBase { assertLife(playerB, 20); assertPowerToughness(playerA, "Spellskite", 3, 7); - + } /** - * If Spellskite changes controller, its activated ability can activate but doesn't resolve properly. - * - * The specific instance was a Spellskite controlled by Vedalken Shackles. Land was targeted by Frost Titan, - * controller (not owner) of Spellskite paid the redirection cost, ability went on the stack, seemed to resolve, + * If Spellskite changes controller, its activated ability can activate but + * doesn't resolve properly. + * + * The specific instance was a Spellskite controlled by Vedalken Shackles. + * Land was targeted by Frost Titan, controller (not owner) of Spellskite + * paid the redirection cost, ability went on the stack, seemed to resolve, * target never changed. - * + * */ /** - * TODO: This test fails sometimes when building the complete Test Project -> Find the reason + * TODO: This test fails sometimes when building the complete Test Project + * -> Find the reason */ @Test public void testAfterChangeOfController() { @@ -88,17 +91,17 @@ public class SpellskiteTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerB, "Island", 6); // {UP}: Change a target of target spell or ability to Spellskite. - addCard(Zone.BATTLEFIELD, playerB, "Spellskite", 1); + addCard(Zone.BATTLEFIELD, playerB, "Spellskite", 1); // {4}{U}{U} - // Whenever Frost Titan becomes the target of a spell or ability an opponent controls, counter that spell or ability unless its controller pays 2. + // Whenever Frost Titan becomes the target of a spell or ability an opponent controls, counter that spell or ability unless its controller pays 2. // Whenever Frost Titan enters the battlefield or attacks, tap target permanent. It doesn't untap during its controller's next untap step. addCard(Zone.HAND, playerB, "Frost Titan", 1); - + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}: Gain control", "Spellskite"); castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Frost Titan"); addTarget(playerB, "Silvercoat Lion"); - + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerA, "{UP}: Change a target", "stack ability (Whenever {this} enters "); setStopAt(2, PhaseStep.BEGIN_COMBAT); @@ -106,13 +109,13 @@ public class SpellskiteTest extends CardTestPlayerBase { assertPermanentCount(playerA, "Spellskite", 1); assertPermanentCount(playerB, "Frost Titan", 1); - + assertTapped("Spellskite", true); // (Battlefield) Tapped state is not equal (Silvercoat Lion) expected: but was: assertTapped("Silvercoat Lion", false); - - } - + + } + /** * Spellskite fails to redirect Cryptic Command on itself */ @@ -123,21 +126,21 @@ public class SpellskiteTest extends CardTestPlayerBase { // Counter target spell; // or return target permanent to its owner's hand; // or tap all creatures your opponents control; - // or draw a card. + // or draw a card. addCard(Zone.HAND, playerA, "Cryptic Command"); - + addCard(Zone.BATTLEFIELD, playerB, "Spellskite", 1); addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1); addCard(Zone.BATTLEFIELD, playerB, "Mountain", 1); addCard(Zone.BATTLEFIELD, playerB, "Island", 1); addCard(Zone.HAND, playerB, "Lightning Bolt", 1); - + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Lightning Bolt", playerA); - - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cryptic Command", "mode=1Lightning Bolt^mode=2Silvercoat Lion", "Lightning Bolt"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cryptic Command", "mode=1Lightning Bolt^mode=2Silvercoat Lion", "Lightning Bolt"); setModeChoice(playerA, "1"); // Counter target spell - setModeChoice(playerA, "2"); // return target permanent to its owner's hand - + setModeChoice(playerA, "2"); // return target permanent to its owner's hand + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerB, "{UP}: Change a target of target spell or ability to {this}.", "Cryptic Command"); setStopAt(1, PhaseStep.BEGIN_COMBAT); @@ -146,12 +149,52 @@ public class SpellskiteTest extends CardTestPlayerBase { assertGraveyardCount(playerB, "Lightning Bolt", 1); assertGraveyardCount(playerA, "Cryptic Command", 1); - + assertHandCount(playerB, "Spellskite", 1); assertPermanentCount(playerB, "Silvercoat Lion", 1); assertLife(playerA, 20); assertLife(playerB, 20); - - } -} \ No newline at end of file + + } + + /** + * My opponent cast Cryptic Command tapping all of my creatures and bouncing + * a Blade Splicer token I had. I activated a Spellskite but got an error + * stating that Spellskite is not a legal target. + */ + @Test + public void testSpellskite2() { + addCard(Zone.BATTLEFIELD, playerA, "Island", 4); + // Choose two - + // Counter target spell; + // or return target permanent to its owner's hand; + // or tap all creatures your opponents control; + // or draw a card. + addCard(Zone.HAND, playerA, "Cryptic Command"); + + addCard(Zone.BATTLEFIELD, playerB, "Spellskite", 1); + addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1); + + addCard(Zone.BATTLEFIELD, playerB, "Island", 1); + + castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerA, "Cryptic Command", "mode=2Silvercoat Lion"); + setModeChoice(playerA, "2"); // return target permanent to its owner's hand + setModeChoice(playerA, "3"); // tap all creatures your opponents control + + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{UP}: Change a target of target spell or ability to {this}.", "Cryptic Command"); + + setStopAt(2, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, "Cryptic Command", 1); + + assertHandCount(playerB, "Spellskite", 1); + assertPermanentCount(playerB, "Silvercoat Lion", 1); + assertTapped("Silvercoat Lion", true); + + assertLife(playerA, 20); + assertLife(playerB, 20); + + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/SidisiBroodTyrantTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/SidisiBroodTyrantTest.java index eaaefeed1d..63a43d8006 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/SidisiBroodTyrantTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies/SidisiBroodTyrantTest.java @@ -112,4 +112,48 @@ public class SidisiBroodTyrantTest extends CardTestPlayerBase { assertPermanentCount(playerA, "Zombie", 2); } + + /* + Sidisi's zombie trigger still resolves even with Anafenza on the battle field. + + Steps: + Cast Anafenza + Pass + Cast Sidisi, mill creature. + Zombie is still created. + + Due to replacement effect of exiling creatures, the second phase of sidisi is null with Anafenza out. + + */ + @Test + public void testWithAnafenza() { + addCard(Zone.BATTLEFIELD, playerA, "Island"); + addCard(Zone.BATTLEFIELD, playerA, "Swamp"); + addCard(Zone.BATTLEFIELD, playerA, "Forest", 4); + // {1}{B}{G}{U} + // Whenever Sidisi, Brood Tyrant enters the battlefield or attacks, put the top three cards of your library into your graveyard + // Whenever one or more creature cards are put into your graveyard from your library, put a 2/2 black Zombie creature token onto the battlefield. + addCard(Zone.HAND, playerA, "Sidisi, Brood Tyrant"); // 2/2 {1}{B}{G}{U} + addCard(Zone.LIBRARY, playerA, "Silvercoat Lion", 1); + addCard(Zone.LIBRARY, playerA, "Swamp", 1); + addCard(Zone.LIBRARY, playerA, "Silvercoat Lion", 1); + skipInitShuffling(); + + // Whenever Anafenza, the Foremost attacks, put a +1/+1 counter on another target tapped creature you control. + // If a creature card would be put into an opponent's graveyard from anywhere, exile it instead. + addCard(Zone.BATTLEFIELD, playerB, "Anafenza, the Foremost"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Sidisi, Brood Tyrant"); + + setStopAt(1, PhaseStep.END_TURN); + execute(); + + assertPermanentCount(playerA, "Sidisi, Brood Tyrant", 1); + assertGraveyardCount(playerA, "Swamp", 1); + assertGraveyardCount(playerA, "Silvercoat Lion", 0); + assertExileCount("Silvercoat Lion", 2); + assertPermanentCount(playerA, "Zombie", 0); + + } + } diff --git a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java index e76f6cc21e..1b7945ff26 100644 --- a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java +++ b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java @@ -1358,6 +1358,11 @@ public class TestPlayer implements Player { computerPlayer.resetPassed(); } + @Override + public void resetPlayerPassedActions() { + computerPlayer.resetPlayerPassedActions(); + } + @Override public void quit(Game game) { computerPlayer.quit(game); @@ -1608,8 +1613,8 @@ public class TestPlayer implements Player { } @Override - public void revealFaceDownCard(Card card, Game game) { - computerPlayer.revealFaceDownCard(card, game); + public boolean lookAtFaceDownCard(Card card, Game game) { + return computerPlayer.lookAtFaceDownCard(card, game); } @Override @@ -1677,21 +1682,20 @@ public class TestPlayer implements Player { return computerPlayer.moveCards(cards, fromZone, toZone, source, game); } - @Override - public boolean moveCards(Cards cards, Zone fromZone, Zone toZone, Ability source, Game game, boolean withName) { - return computerPlayer.moveCards(cards, fromZone, toZone, source, game); - } - - @Override - public boolean moveCards(Card card, Zone fromZone, Zone toZone, Ability source, Game game, boolean withName) { - return computerPlayer.moveCards(card, fromZone, toZone, source, game); - } - - @Override - public boolean moveCards(Set cards, Zone fromZone, Zone toZone, Ability source, Game game, boolean withName) { - return computerPlayer.moveCards(cards, fromZone, toZone, source, game); - } - +// @Override +// public boolean moveCards(Cards cards, Zone fromZone, Zone toZone, Ability source, Game game, boolean withName) { +// return computerPlayer.moveCards(cards, fromZone, toZone, source, game); +// } +// +// @Override +// public boolean moveCards(Card card, Zone fromZone, Zone toZone, Ability source, Game game, boolean withName) { +// return computerPlayer.moveCards(card, fromZone, toZone, source, game); +// } +// +// @Override +// public boolean moveCards(Set cards, Zone fromZone, Zone toZone, Ability source, Game game, boolean withName) { +// return computerPlayer.moveCards(cards, fromZone, toZone, source, game); +// } @Override public boolean moveCardToHandWithInfo(Card card, UUID sourceId, Game game) { return computerPlayer.moveCardToHandWithInfo(card, sourceId, game); @@ -1702,13 +1706,18 @@ public class TestPlayer implements Player { return computerPlayer.moveCardToHandWithInfo(card, sourceId, game, withName); } + @Override + public boolean moveCardsToExile(Card card, Ability source, Game game, boolean withName, UUID exileId, String exileZoneName) { + return computerPlayer.moveCardsToExile(card, source, game, withName, exileId, exileZoneName); + } + @Override public boolean moveCardsToExile(Set cards, Ability source, Game game, boolean withName, UUID exileId, String exileZoneName) { return computerPlayer.moveCardsToExile(cards, source, game, withName, exileId, exileZoneName); } @Override - public boolean moveCardsToGraveyardWithInfo(Set allCards, Ability source, Game game, Zone fromZone) { + public Set moveCardsToGraveyardWithInfo(Set allCards, Ability source, Game game, Zone fromZone) { return computerPlayer.moveCardsToGraveyardWithInfo(allCards, source, game, fromZone); } diff --git a/Mage/src/mage/abilities/common/DealsDamageToOpponentTriggeredAbility.java b/Mage/src/mage/abilities/common/DealsDamageToOpponentTriggeredAbility.java index 2641d757ed..811b091401 100644 --- a/Mage/src/mage/abilities/common/DealsDamageToOpponentTriggeredAbility.java +++ b/Mage/src/mage/abilities/common/DealsDamageToOpponentTriggeredAbility.java @@ -31,7 +31,6 @@ import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; import mage.constants.Zone; import mage.game.Game; -import mage.game.events.DamagePlayerEvent; import mage.game.events.DamagedPlayerEvent; import mage.game.events.GameEvent; import mage.target.targetpointer.FixedTarget; @@ -45,7 +44,7 @@ public class DealsDamageToOpponentTriggeredAbility extends TriggeredAbilityImpl public DealsDamageToOpponentTriggeredAbility(Effect effect) { this(effect, false, false); - } + } public DealsDamageToOpponentTriggeredAbility(Effect effect, boolean optional) { this(effect, optional, false); diff --git a/Mage/src/mage/abilities/costs/common/ExileTopCardOfGraveyardCost.java b/Mage/src/mage/abilities/costs/common/ExileTopCardOfGraveyardCost.java new file mode 100644 index 0000000000..997753dc72 --- /dev/null +++ b/Mage/src/mage/abilities/costs/common/ExileTopCardOfGraveyardCost.java @@ -0,0 +1,63 @@ +/* + * 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.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class ExileTopCardOfGraveyardCost extends CostImpl { + + private final int amount; + + public ExileTopCardOfGraveyardCost(int amount) { + this.amount = amount; + this.text = "Exile the top card of your graveyard"; + } + + public ExileTopCardOfGraveyardCost(ExileTopCardOfGraveyardCost cost) { + super(cost); + this.amount = cost.amount; + } + + @Override + public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { + Player controller = game.getPlayer(controllerId); + if(controller == null) { + return false; + } + return controller.getGraveyard().size() >= amount; + } + + @Override + public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) { + Player controller = game.getPlayer(controllerId); + if(controller != null) { + Card topCard = null; + for (Card card :controller.getGraveyard().getCards(game)) { + topCard = card; + } + if (topCard != null) { + controller.moveCardToExileWithInfo(topCard, null, "", ability.getSourceId(), game, Zone.GRAVEYARD, true); + paid = true; + } + } + return paid; + } + + @Override + public ExileTopCardOfGraveyardCost copy() { + return new ExileTopCardOfGraveyardCost(this); + } +} \ No newline at end of file diff --git a/Mage/src/mage/abilities/costs/common/ExileTopCreatureCardOfGraveyardCost.java b/Mage/src/mage/abilities/costs/common/ExileTopCreatureCardOfGraveyardCost.java new file mode 100644 index 0000000000..00f0b18eef --- /dev/null +++ b/Mage/src/mage/abilities/costs/common/ExileTopCreatureCardOfGraveyardCost.java @@ -0,0 +1,66 @@ +/* + * 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.CardType; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class ExileTopCreatureCardOfGraveyardCost extends CostImpl { + + private final int amount; + + public ExileTopCreatureCardOfGraveyardCost(int amount) { + this.amount = amount; + this.text = "Exile the top creature card of your graveyard"; + } + + public ExileTopCreatureCardOfGraveyardCost(ExileTopCreatureCardOfGraveyardCost cost) { + super(cost); + this.amount = cost.amount; + } + + @Override + public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { + Player controller = game.getPlayer(controllerId); + if(controller == null) { + return false; + } + return controller.getGraveyard().size() >= amount; + } + + @Override + public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) { + Player controller = game.getPlayer(controllerId); + if(controller != null) { + Card topCard = null; + for (Card card :controller.getGraveyard().getCards(game)) { + if (card.getCardType().contains(CardType.CREATURE)) { + topCard = card; + } + } + if (topCard != null) { + controller.moveCardToExileWithInfo(topCard, null, "", ability.getSourceId(), game, Zone.GRAVEYARD, true); + paid = true; + } + } + return paid; + } + + @Override + public ExileTopCreatureCardOfGraveyardCost copy() { + return new ExileTopCreatureCardOfGraveyardCost(this); + } +} diff --git a/Mage/src/mage/abilities/dynamicvalue/common/UrzaTerrainValue.java b/Mage/src/mage/abilities/dynamicvalue/common/UrzaTerrainValue.java index 3db1e5f9aa..d3dd6be074 100644 --- a/Mage/src/mage/abilities/dynamicvalue/common/UrzaTerrainValue.java +++ b/Mage/src/mage/abilities/dynamicvalue/common/UrzaTerrainValue.java @@ -18,21 +18,24 @@ public class UrzaTerrainValue implements DynamicValue { @Override public int calculate(Game game, Ability sourceAbility, Effect effect) { FilterControlledPermanent pp = new FilterControlledPermanent("Urza's Power Plant"); - pp.add(new SubtypePredicate("Urza's Power-Plant")); + pp.add(new SubtypePredicate("Urza's")); + pp.add(new SubtypePredicate("Power-Plant")); PermanentsOnBattlefieldCount ppP = new PermanentsOnBattlefieldCount(pp); if (ppP.calculate(game, sourceAbility, effect) < 1) { return 1; } FilterControlledPermanent to = new FilterControlledPermanent("Urza's Tower"); - to.add(new SubtypePredicate("Urza's Tower")); + to.add(new SubtypePredicate("Urza's")); + to.add(new SubtypePredicate("Tower")); PermanentsOnBattlefieldCount toP = new PermanentsOnBattlefieldCount(to); if (toP.calculate(game, sourceAbility, effect) < 1) { return 1; } FilterControlledPermanent mi = new FilterControlledPermanent("Urza's Mine"); - mi.add(new SubtypePredicate("Urza's Mine")); + mi.add(new SubtypePredicate("Urza's")); + mi.add(new SubtypePredicate("Mine")); PermanentsOnBattlefieldCount miP = new PermanentsOnBattlefieldCount(mi); if (miP.calculate(game, sourceAbility, effect) < 1) { return 1; diff --git a/Mage/src/mage/abilities/effects/ContinuousEffectImpl.java b/Mage/src/mage/abilities/effects/ContinuousEffectImpl.java index a360320332..e793058a81 100644 --- a/Mage/src/mage/abilities/effects/ContinuousEffectImpl.java +++ b/Mage/src/mage/abilities/effects/ContinuousEffectImpl.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.abilities.effects; import java.util.ArrayList; @@ -69,7 +68,7 @@ public abstract class ContinuousEffectImpl extends EffectImpl implements Continu protected boolean affectedObjectsSet = false; protected List affectedObjectList = new ArrayList<>(); protected boolean temporary = false; - + // until your next turn protected int startingTurn; protected UUID startingControllerId; @@ -96,7 +95,7 @@ public abstract class ContinuousEffectImpl extends EffectImpl implements Continu this.used = effect.used; this.discarded = effect.discarded; this.affectedObjectsSet = effect.affectedObjectsSet; - this.affectedObjectList.addAll(effect.affectedObjectList); + this.affectedObjectList.addAll(effect.affectedObjectList); this.temporary = effect.temporary; this.startingTurn = effect.startingTurn; this.startingControllerId = effect.startingControllerId; @@ -148,8 +147,8 @@ public abstract class ContinuousEffectImpl extends EffectImpl implements Continu } /** - * Sets the discarded state of the effect. So it - * will be removed on next check. + * Sets the discarded state of the effect. So it will be removed on next + * check. */ @Override public void discard() { @@ -160,7 +159,7 @@ public abstract class ContinuousEffectImpl extends EffectImpl implements Continu public void init(Ability source, Game game) { targetPointer.init(game, source); //20100716 - 611.2c - if (AbilityType.ACTIVATED.equals(source.getAbilityType()) + if (AbilityType.ACTIVATED.equals(source.getAbilityType()) || AbilityType.SPELL.equals(source.getAbilityType()) || AbilityType.TRIGGERED.equals(source.getAbilityType())) { if (layer != null) { @@ -174,11 +173,10 @@ public abstract class ContinuousEffectImpl extends EffectImpl implements Continu case PTChangingEffects_7: this.affectedObjectsSet = true; } - } - else { - if (hasLayer(Layer.CopyEffects_1) || hasLayer(Layer.ControlChangingEffects_2) || hasLayer(Layer.TextChangingEffects_3) || - hasLayer(Layer.TypeChangingEffects_4) || hasLayer(Layer.ColorChangingEffects_5) || hasLayer(Layer.AbilityAddingRemovingEffects_6) || - hasLayer(Layer.PTChangingEffects_7)) { + } else { + if (hasLayer(Layer.CopyEffects_1) || hasLayer(Layer.ControlChangingEffects_2) || hasLayer(Layer.TextChangingEffects_3) + || hasLayer(Layer.TypeChangingEffects_4) || hasLayer(Layer.ColorChangingEffects_5) || hasLayer(Layer.AbilityAddingRemovingEffects_6) + || hasLayer(Layer.PTChangingEffects_7)) { this.affectedObjectsSet = true; } } @@ -226,7 +224,7 @@ public abstract class ContinuousEffectImpl extends EffectImpl implements Continu return true; } if (toughness instanceof DomainValue) { - return ((DomainValue)toughness).getAmount() < 0; + return ((DomainValue) toughness).getAmount() < 0; } return false; } @@ -237,8 +235,10 @@ public abstract class ContinuousEffectImpl extends EffectImpl implements Continu } /** - * Returns the status if the effect is temporary added to the ContinuousEffects - * @return + * Returns the status if the effect is temporary added to the + * ContinuousEffects + * + * @return */ @Override public boolean isTemporary() { diff --git a/Mage/src/mage/abilities/effects/common/ChooseLandTypeEffect.java b/Mage/src/mage/abilities/effects/common/ChooseLandTypeEffect.java new file mode 100644 index 0000000000..0480effa49 --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/ChooseLandTypeEffect.java @@ -0,0 +1,61 @@ +/* + * 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.effects.common; + +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.repository.CardRepository; +import mage.choices.Choice; +import mage.choices.ChoiceImpl; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.util.CardUtil; + +/** + * + * @author fireshoes + */ +public class ChooseLandTypeEffect extends OneShotEffect { + + public ChooseLandTypeEffect(Outcome outcome) { + super(outcome); + staticText = "choose a land type"; + } + + public ChooseLandTypeEffect(final ChooseLandTypeEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanent(source.getSourceId()); + if (controller != null && permanent != null) { + Choice typeChoice = new ChoiceImpl(true); + typeChoice.setMessage("Choose land type"); + typeChoice.setChoices(CardRepository.instance.getLandTypes()); + while (!controller.choose(outcome, typeChoice, game)) { + if (!controller.canRespond()) { + return false; + } + } + if (!game.isSimulation()) { + game.informPlayers(permanent.getName() + ": " + controller.getLogName() + " has chosen " + typeChoice.getChoice()); + } + game.getState().setValue(permanent.getId() + "_type", typeChoice.getChoice()); + permanent.addInfo("chosen type", CardUtil.addToolTipMarkTags("Chosen type: " + typeChoice.getChoice()), game); + } + return false; + } + + @Override + public ChooseLandTypeEffect copy() { + return new ChooseLandTypeEffect(this); + } + +} diff --git a/Mage/src/mage/abilities/effects/common/CreateTokenTargetEffect.java b/Mage/src/mage/abilities/effects/common/CreateTokenTargetEffect.java index 9c0e72eef9..91fcdb1c40 100644 --- a/Mage/src/mage/abilities/effects/common/CreateTokenTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/CreateTokenTargetEffect.java @@ -1,23 +1,20 @@ package mage.abilities.effects.common; -import java.util.Locale; 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.constants.Zone; import mage.game.Game; import mage.game.permanent.token.Token; -import mage.players.Player; import mage.util.CardUtil; /** * @author Loki */ - public class CreateTokenTargetEffect extends OneShotEffect { + private Token token; private DynamicValue amount; private boolean tapped; @@ -59,14 +56,10 @@ public class CreateTokenTargetEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { int value = amount.calculate(game, source, this); - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - if (value < 1) { - return true; - } + if (value > 0) { return token.putOntoBattlefield(value, game, source.getSourceId(), targetPointer.getFirst(game, source), tapped, attacking); } - return false; + return true; } @Override diff --git a/Mage/src/mage/abilities/effects/common/DamageMultiEffect.java b/Mage/src/mage/abilities/effects/common/DamageMultiEffect.java index 0ee8bdf727..61baaaa19d 100644 --- a/Mage/src/mage/abilities/effects/common/DamageMultiEffect.java +++ b/Mage/src/mage/abilities/effects/common/DamageMultiEffect.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,21 +20,20 @@ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * The views and conclusions contained in the software and documentation are 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.constants.Outcome; 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.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; @@ -71,12 +70,11 @@ public class DamageMultiEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { if (source.getTargets().size() > 0) { Target multiTarget = source.getTargets().get(0); - for (UUID target: multiTarget.getTargets()) { + for (UUID target : multiTarget.getTargets()) { Permanent permanent = game.getPermanent(target); if (permanent != null) { permanent.damage(multiTarget.getTargetAmount(target), source.getSourceId(), game, false, true); - } - else { + } else { Player player = game.getPlayer(target); if (player != null) { player.damage(multiTarget.getTargetAmount(target), source.getSourceId(), game, false, true); @@ -92,9 +90,6 @@ public class DamageMultiEffect extends OneShotEffect { if (staticText != null && !staticText.isEmpty()) { return staticText; } - StringBuilder sb = new StringBuilder(); - sb.append("{source} deals ").append(amount.toString()); - sb.append(" damage divided as you choose among any number of target ").append(mode.getTargets().get(0).getTargetName()); - return sb.toString(); + return "{source} deals " + amount.toString() + " damage divided as you choose among any number of target " + mode.getTargets().get(0).getTargetName(); } } diff --git a/Mage/src/mage/abilities/effects/common/DoIfCostPaid.java b/Mage/src/mage/abilities/effects/common/DoIfCostPaid.java index 000ee2e275..35ff9555c6 100644 --- a/Mage/src/mage/abilities/effects/common/DoIfCostPaid.java +++ b/Mage/src/mage/abilities/effects/common/DoIfCostPaid.java @@ -53,6 +53,7 @@ public class DoIfCostPaid extends OneShotEffect { effectText = effectText.substring(0, effectText.length() - 1); } message = getCostText() + " and " + effectText + "?"; + message = Character.toUpperCase(message.charAt(0)) + message.substring(1); } else { message = chooseUseText; } diff --git a/Mage/src/mage/abilities/effects/common/PhaseOutSourceEffect.java b/Mage/src/mage/abilities/effects/common/PhaseOutSourceEffect.java new file mode 100644 index 0000000000..1df8ff9ff3 --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/PhaseOutSourceEffect.java @@ -0,0 +1,44 @@ +/* + * 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.effects.common; + +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author fireshoes + */ +public class PhaseOutSourceEffect extends OneShotEffect { + + public PhaseOutSourceEffect() { + super(Outcome.Detriment); + this.staticText = "{this} phases out"; + } + + public PhaseOutSourceEffect(final PhaseOutSourceEffect effect) { + super(effect); + } + + @Override + public PhaseOutSourceEffect copy() { + return new PhaseOutSourceEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + MageObject sourceObject = source.getSourceObjectIfItStillExists(game); + if (sourceObject instanceof Permanent) { + Permanent permanent = (Permanent) sourceObject; + return permanent.phaseOut(game); + } + return false; + } +} diff --git a/Mage/src/mage/abilities/effects/common/PhaseOutTargetEffect.java b/Mage/src/mage/abilities/effects/common/PhaseOutTargetEffect.java new file mode 100644 index 0000000000..68383139cf --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/PhaseOutTargetEffect.java @@ -0,0 +1,68 @@ +/* + * 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.effects.common; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.effects.OneShotEffect; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.Target; +import mage.util.CardUtil; + +/** + * + * @author fireshoes + */ +public class PhaseOutTargetEffect extends OneShotEffect { + + public PhaseOutTargetEffect() { + super(Outcome.Detriment); + } + + public PhaseOutTargetEffect(final PhaseOutTargetEffect effect) { + super(effect); + } + + @Override + public PhaseOutTargetEffect copy() { + return new PhaseOutTargetEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + for (UUID target : targetPointer.getTargets(game, source)) { + Permanent permanent = game.getPermanent(target); + if (permanent != null) { + permanent.phaseOut(game); + } + } + return true; + } + + @Override + public String getText(Mode mode) { + if (staticText.length() > 0) { + return staticText + " phases out"; + } + + Target target = mode.getTargets().get(0); + if (target.getMaxNumberOfTargets() > 1) { + if (target.getMaxNumberOfTargets() == target.getNumberOfTargets()) { + return CardUtil.numberToText(target.getNumberOfTargets()) + " target " + target.getTargetName() + "s phase out"; + } else { + return "up to " + CardUtil.numberToText(target.getMaxNumberOfTargets()) + " target " + target.getTargetName() + "s phase out"; + } + } else if (target.getMaxNumberOfTargets() == 0){ + return "X target " + mode.getTargets().get(0).getTargetName() + " phase out"; + } else { + return "target " + mode.getTargets().get(0).getTargetName() + " phase out"; + } + } + +} \ No newline at end of file diff --git a/Mage/src/mage/abilities/effects/common/SacrificeTargetEffect.java b/Mage/src/mage/abilities/effects/common/SacrificeTargetEffect.java index 0421dd32f1..024b3a856c 100644 --- a/Mage/src/mage/abilities/effects/common/SacrificeTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/SacrificeTargetEffect.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.abilities.effects.common; import java.util.UUID; -import mage.constants.Outcome; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.effects.OneShotEffect; +import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; @@ -42,17 +41,31 @@ import mage.game.permanent.Permanent; */ public class SacrificeTargetEffect extends OneShotEffect { + protected UUID playerIdThatHasToSacrifice; + public SacrificeTargetEffect() { - super(Outcome.Sacrifice); + this(""); } public SacrificeTargetEffect(String text) { - this(); + this(text, null); + } + + /** + * + * @param text use this text as rule text for the effect + * @param playerIdThatHasToSacrifice only this playerId has to sacrifice + * (others can't) + */ + public SacrificeTargetEffect(String text, UUID playerIdThatHasToSacrifice) { + super(Outcome.Sacrifice); + this.playerIdThatHasToSacrifice = playerIdThatHasToSacrifice; staticText = text; } public SacrificeTargetEffect(final SacrificeTargetEffect effect) { super(effect); + this.playerIdThatHasToSacrifice = effect.playerIdThatHasToSacrifice; } @Override @@ -65,7 +78,7 @@ public class SacrificeTargetEffect extends OneShotEffect { int affectedTargets = 0; for (UUID permanentId : targetPointer.getTargets(game, source)) { Permanent permanent = game.getPermanent(permanentId); - if (permanent != null) { + if (permanent != null && (playerIdThatHasToSacrifice == null || playerIdThatHasToSacrifice.equals(permanent.getControllerId()))) { permanent.sacrifice(source.getSourceId(), game); affectedTargets++; } diff --git a/Mage/src/mage/abilities/effects/common/SetPlayerLifeAllEffect.java b/Mage/src/mage/abilities/effects/common/SetPlayerLifeAllEffect.java new file mode 100644 index 0000000000..5f54db0126 --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/SetPlayerLifeAllEffect.java @@ -0,0 +1,99 @@ +/* + * 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.effects.common; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.OneShotEffect; +import mage.constants.Outcome; +import mage.constants.TargetController; +import static mage.constants.TargetController.ANY; +import static mage.constants.TargetController.OPPONENT; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class SetPlayerLifeAllEffect extends OneShotEffect { + + private TargetController targetController; + protected DynamicValue amount; + + public SetPlayerLifeAllEffect(int amount) { + this(amount, TargetController.ANY); + } + + public SetPlayerLifeAllEffect(DynamicValue amount) { + this(amount, TargetController.ANY); + } + + public SetPlayerLifeAllEffect(int amount, TargetController targetController) { + this(new StaticValue(amount), targetController); + } + + public SetPlayerLifeAllEffect(DynamicValue amount, TargetController targetController) { + super(Outcome.DrawCard); + this.amount = amount; + this.targetController = targetController; + staticText = setText(); + } + + public SetPlayerLifeAllEffect(final SetPlayerLifeAllEffect effect) { + super(effect); + this.amount = effect.amount; + this.targetController = effect.targetController; + } + + @Override + public SetPlayerLifeAllEffect copy() { + return new SetPlayerLifeAllEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player sourcePlayer = game.getPlayer(source.getControllerId()); + switch (targetController) { + case ANY: + for (UUID playerId : sourcePlayer.getInRange()) { + Player player = game.getPlayer(playerId); + if (player != null) { + player.setLife(amount.calculate(game, source, this), game); + } + } + break; + case OPPONENT: + for (UUID playerId : game.getOpponents(sourcePlayer.getId())) { + Player player = game.getPlayer(playerId); + if (player != null) { + player.setLife(amount.calculate(game, source, this), game); + } + } + break; + } + return true; + } + + private String setText() { + StringBuilder sb = new StringBuilder("Each "); + switch (targetController) { + case ANY: + sb.append("player"); + break; + case OPPONENT: + sb.append("opponent"); + break; + default: + throw new UnsupportedOperationException("Not supported value for targetController"); + } + sb.append(" 's life total becomes "); + sb.append(amount.toString()); + return sb.toString(); + } +} diff --git a/Mage/src/mage/abilities/effects/common/combat/CantBlockAttachedEffect.java b/Mage/src/mage/abilities/effects/common/combat/CantBlockAttachedEffect.java index d58293e927..b42d9e082b 100644 --- a/Mage/src/mage/abilities/effects/common/combat/CantBlockAttachedEffect.java +++ b/Mage/src/mage/abilities/effects/common/combat/CantBlockAttachedEffect.java @@ -27,12 +27,13 @@ */ package mage.abilities.effects.common.combat; -import mage.constants.AttachmentType; -import mage.constants.Duration; import mage.abilities.Ability; import mage.abilities.effects.RestrictionEffect; +import mage.constants.AttachmentType; +import mage.constants.Duration; import mage.game.Game; import mage.game.permanent.Permanent; +import mage.target.targetpointer.FixedTarget; /** * @@ -62,8 +63,22 @@ public class CantBlockAttachedEffect extends RestrictionEffect { super(effect); } + @Override + public void init(Ability source, Game game) { + super.init(source, game); + if (affectedObjectsSet) { + Permanent equipment = game.getPermanent(source.getSourceId()); + if (equipment != null && equipment.getAttachedTo() != null) { + this.setTargetPointer(new FixedTarget(equipment.getAttachedTo(), game.getState().getZoneChangeCounter(equipment.getAttachedTo()))); + } + } + } + @Override public boolean applies(Permanent permanent, Ability source, Game game) { + if (affectedObjectsSet) { + return targetPointer.getFirst(game, source).equals(permanent.getId()); + } return permanent.getAttachments().contains(source.getSourceId()); } diff --git a/Mage/src/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java b/Mage/src/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java index f806ef6541..0f60a80c17 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java +++ b/Mage/src/mage/abilities/effects/common/continuous/BoostEnchantedEffect.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,24 +20,24 @@ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * The views and conclusions contained in the software and documentation are 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.continuous; -import mage.constants.Duration; -import mage.constants.Layer; -import mage.constants.Outcome; -import mage.constants.SubLayer; import mage.abilities.Ability; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.ContinuousEffectImpl; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.SubLayer; import mage.game.Game; import mage.game.permanent.Permanent; +import mage.target.targetpointer.FixedTarget; /** * @@ -79,15 +79,37 @@ public class BoostEnchantedEffect extends ContinuousEffectImpl { } @Override - public boolean apply(Game game, Ability source) { - Permanent enchantment = game.getPermanent(source.getSourceId()); - if (enchantment != null && enchantment.getAttachedTo() != null) { - Permanent creature = game.getPermanent(enchantment.getAttachedTo()); - if (creature != null) { - creature.addPower(power.calculate(game, source, this)); - creature.addToughness(toughness.calculate(game, source, this)); + public void init(Ability source, Game game) { + super.init(source, game); + 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()); + if (equipment != null && equipment.getAttachedTo() != null) { + this.setTargetPointer(new FixedTarget(equipment.getAttachedTo(), game.getState().getZoneChangeCounter(equipment.getAttachedTo()))); } } + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = null; + if (affectedObjectsSet) { + permanent = game.getPermanent(targetPointer.getFirst(game, source)); + if (permanent == null) { + discard(); + return true; + } + } else { + Permanent equipment = game.getPermanent(source.getSourceId()); + if (equipment != null && equipment.getAttachedTo() != null) { + permanent = game.getPermanent(equipment.getAttachedTo()); + } + } + if (permanent != null) { + permanent.addPower(power.calculate(game, source, this)); + permanent.addToughness(toughness.calculate(game, source, this)); + } return true; } @@ -95,16 +117,15 @@ public class BoostEnchantedEffect extends ContinuousEffectImpl { StringBuilder sb = new StringBuilder(); sb.append("Enchanted creature gets "); String p = power.toString(); - if(!p.startsWith("-")) { + if (!p.startsWith("-")) { sb.append("+"); } sb.append(p).append("/"); String t = toughness.toString(); - if(!t.startsWith("-")){ - if(p.startsWith("-")) { + if (!t.startsWith("-")) { + if (p.startsWith("-")) { sb.append("-"); - } - else { + } else { sb.append("+"); } } diff --git a/Mage/src/mage/abilities/effects/common/continuous/GainAbilityAttachedEffect.java b/Mage/src/mage/abilities/effects/common/continuous/GainAbilityAttachedEffect.java index 3029a00fc1..9120ccb551 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/GainAbilityAttachedEffect.java +++ b/Mage/src/mage/abilities/effects/common/continuous/GainAbilityAttachedEffect.java @@ -45,35 +45,36 @@ public class GainAbilityAttachedEffect extends ContinuousEffectImpl { protected Ability ability; protected AttachmentType attachmentType; - protected boolean fixedTarget = false; + protected boolean independentEffect; + + public GainAbilityAttachedEffect(Ability ability, AttachmentType attachmentType) { + this(ability, attachmentType, Duration.WhileOnBattlefield); + } + + public GainAbilityAttachedEffect(Ability ability, AttachmentType attachmentType, Duration duration) { + this(ability, attachmentType, duration, null); + } public GainAbilityAttachedEffect(Ability ability, AttachmentType attachmentType, Duration duration, String rule) { super(duration, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility); this.ability = ability; this.attachmentType = attachmentType; - this.duration = duration; - if (duration == Duration.EndOfTurn) { - fixedTarget = true; + switch (duration) { + case WhileOnBattlefield: + case WhileInGraveyard: + case WhileOnStack: + independentEffect = false; + break; + default: + // such effects exist independent from the enchantment that created the effect + independentEffect = true; } - this.staticText = rule; - } - public GainAbilityAttachedEffect(Ability ability, AttachmentType attachmentType, Duration duration) { - super(duration, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility); - this.ability = ability; - this.attachmentType = attachmentType; - this.duration = duration; - if (duration == Duration.EndOfTurn) { - fixedTarget = true; + if (rule == null) { + setText(); + } else { + this.staticText = rule; } - setText(); - } - - public GainAbilityAttachedEffect(Ability ability, AttachmentType attachmentType) { - super(Duration.WhileOnBattlefield, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility); - this.ability = ability; - this.attachmentType = attachmentType; - setText(); } public GainAbilityAttachedEffect(final GainAbilityAttachedEffect effect) { @@ -81,7 +82,7 @@ public class GainAbilityAttachedEffect extends ContinuousEffectImpl { this.ability = effect.ability.copy(); ability.newId(); // This is needed if the effect is copied e.g. by a clone so the ability can be added multiple times to permanents this.attachmentType = effect.attachmentType; - this.fixedTarget = effect.fixedTarget; + this.independentEffect = effect.independentEffect; } @Override @@ -92,27 +93,31 @@ public class GainAbilityAttachedEffect extends ContinuousEffectImpl { @Override public void init(Ability source, Game game) { super.init(source, game); - if (fixedTarget) { + if (affectedObjectsSet) { Permanent equipment = game.getPermanent(source.getSourceId()); if (equipment != null && equipment.getAttachedTo() != null) { - this.setTargetPointer(new FixedTarget(equipment.getAttachedTo())); + this.setTargetPointer(new FixedTarget(equipment.getAttachedTo(), game.getState().getZoneChangeCounter(equipment.getAttachedTo()))); } } } @Override public boolean apply(Game game, Ability source) { - Permanent creature = null; - if (fixedTarget) { - creature = game.getPermanent(targetPointer.getFirst(game, source)); + Permanent permanent = null; + if (affectedObjectsSet) { + permanent = game.getPermanent(targetPointer.getFirst(game, source)); + if (permanent == null) { + discard(); + return true; + } } else { Permanent equipment = game.getPermanent(source.getSourceId()); if (equipment != null && equipment.getAttachedTo() != null) { - creature = game.getPermanent(equipment.getAttachedTo()); + permanent = game.getPermanent(equipment.getAttachedTo()); } } - if (creature != null) { - creature.addAbility(ability, source.getSourceId(), game, false); + if (permanent != null) { + permanent.addAbility(ability, source.getSourceId(), game, false); } return true; } diff --git a/Mage/src/mage/abilities/effects/common/continuous/LifeTotalCantChangeControllerEffect.java b/Mage/src/mage/abilities/effects/common/continuous/LifeTotalCantChangeControllerEffect.java index e27955e1b3..b3e1f0386a 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/LifeTotalCantChangeControllerEffect.java +++ b/Mage/src/mage/abilities/effects/common/continuous/LifeTotalCantChangeControllerEffect.java @@ -1,39 +1,38 @@ /* -* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without modification, are -* permitted provided that the following conditions are met: -* -* 1. Redistributions of source code must retain the above copyright notice, this list of -* conditions and the following disclaimer. -* -* 2. Redistributions in binary form must reproduce the above copyright notice, this list -* of conditions and the following disclaimer in the documentation and/or other materials -* provided with the distribution. -* -* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED -* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR -* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* The views and conclusions contained in the software and 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.continuous; +import mage.abilities.Ability; +import mage.abilities.effects.ContinuousEffectImpl; import mage.constants.Duration; import mage.constants.Layer; import mage.constants.Outcome; import mage.constants.SubLayer; -import mage.abilities.Ability; -import mage.abilities.effects.ContinuousEffectImpl; import mage.game.Game; import mage.players.Player; @@ -44,7 +43,7 @@ public class LifeTotalCantChangeControllerEffect extends ContinuousEffectImpl { public LifeTotalCantChangeControllerEffect(Duration duration) { super(duration, Layer.PlayerEffects, SubLayer.NA, Outcome.Benefit); - setText(); + staticText = "Your life total can't change. (You can't gain or lose life. You can't pay any amount of life except 0.)"; } public LifeTotalCantChangeControllerEffect(final LifeTotalCantChangeControllerEffect effect) { @@ -66,8 +65,4 @@ public class LifeTotalCantChangeControllerEffect extends ContinuousEffectImpl { return true; } - private void setText() { - staticText = "Your life total can't change. (You can't gain or lose life. You can't pay any amount of life except 0.)"; - } - -} \ No newline at end of file +} diff --git a/Mage/src/mage/abilities/effects/common/continuous/LoseAbilitySourceEffect.java b/Mage/src/mage/abilities/effects/common/continuous/LoseAbilitySourceEffect.java index fcfafd3dca..2c898399a0 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/LoseAbilitySourceEffect.java +++ b/Mage/src/mage/abilities/effects/common/continuous/LoseAbilitySourceEffect.java @@ -1,54 +1,54 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ -package mage.abilities.effects.common.continuous; - -import mage.abilities.Ability; -import mage.abilities.effects.ContinuousEffectImpl; -import mage.constants.Duration; -import mage.constants.Layer; -import mage.constants.Outcome; -import mage.constants.SubLayer; -import mage.game.Game; -import mage.game.permanent.Permanent; -/** - * - * @author Noahsark - */ -public class LoseAbilitySourceEffect extends ContinuousEffectImpl{ - - protected Ability ability; - - public LoseAbilitySourceEffect(Ability ability){ - this(ability, Duration.WhileOnBattlefield); - } - - public LoseAbilitySourceEffect(Ability ability, Duration duration){ - super(duration, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.LoseAbility); - this.ability = ability; - staticText = "{this} loses \"" + ability.getRule() + "\"" + duration.toString(); - } - - public LoseAbilitySourceEffect(final LoseAbilitySourceEffect effect){ - super(effect); - this.ability = effect.ability.copy(); - } - - @Override - public LoseAbilitySourceEffect copy(){ - return new LoseAbilitySourceEffect(this); - } - - @Override - public boolean apply(Game game, Ability source){ - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null){ - // 112.10 - while (permanent.getAbilities().remove(ability)) { - - } - } - return true; - } -} +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package mage.abilities.effects.common.continuous; + +import mage.abilities.Ability; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.SubLayer; +import mage.game.Game; +import mage.game.permanent.Permanent; +/** + * + * @author Noahsark + */ +public class LoseAbilitySourceEffect extends ContinuousEffectImpl{ + + protected Ability ability; + + public LoseAbilitySourceEffect(Ability ability){ + this(ability, Duration.WhileOnBattlefield); + } + + public LoseAbilitySourceEffect(Ability ability, Duration duration){ + super(duration, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.LoseAbility); + this.ability = ability; + staticText = "{this} loses " + ability.getRule() + duration.toString(); + } + + public LoseAbilitySourceEffect(final LoseAbilitySourceEffect effect){ + super(effect); + this.ability = effect.ability.copy(); + } + + @Override + public LoseAbilitySourceEffect copy(){ + return new LoseAbilitySourceEffect(this); + } + + @Override + public boolean apply(Game game, Ability source){ + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null){ + // 112.10 + while (permanent.getAbilities().remove(ability)) { + + } + } + return true; + } +} diff --git a/Mage/src/mage/abilities/keyword/HideawayAbility.java b/Mage/src/mage/abilities/keyword/HideawayAbility.java index 124e7eec05..57ff119d39 100644 --- a/Mage/src/mage/abilities/keyword/HideawayAbility.java +++ b/Mage/src/mage/abilities/keyword/HideawayAbility.java @@ -139,7 +139,7 @@ class HideawayExileEffect extends OneShotEffect { class HideawayLookAtFaceDownCardEffect extends AsThoughEffectImpl { public HideawayLookAtFaceDownCardEffect() { - super(AsThoughEffectType.REVEAL_FACE_DOWN, Duration.EndOfGame, Outcome.Benefit); + super(AsThoughEffectType.LOOK_AT_FACE_DOWN, Duration.EndOfGame, Outcome.Benefit); staticText = "You may look at cards exiled with {this}"; } diff --git a/Mage/src/mage/abilities/keyword/MorphAbility.java b/Mage/src/mage/abilities/keyword/MorphAbility.java index cba284786e..fbc7a76bcc 100644 --- a/Mage/src/mage/abilities/keyword/MorphAbility.java +++ b/Mage/src/mage/abilities/keyword/MorphAbility.java @@ -237,7 +237,7 @@ public class MorphAbility extends StaticAbility implements AlternativeSourceCost if (player != null) { this.resetMorph(); if (alternateCosts.canPay(ability, sourceId, controllerId, game)) { - if (player.chooseUse(Outcome.Benefit, new StringBuilder("Cast this card as a 2/2 face-down creature for ").append(getCosts().getText()).append(" ?").toString(), ability, game)) { + if (player.chooseUse(Outcome.Benefit, "Cast this card as a 2/2 face-down creature for " + getCosts().getText() + " ?", ability, game)) { activateMorph(game); // change mana costs ability.getManaCostsToPay().clear(); diff --git a/Mage/src/mage/abilities/keyword/PersistAbility.java b/Mage/src/mage/abilities/keyword/PersistAbility.java index 2577fec20e..3f4a297c7d 100644 --- a/Mage/src/mage/abilities/keyword/PersistAbility.java +++ b/Mage/src/mage/abilities/keyword/PersistAbility.java @@ -1,50 +1,45 @@ /* -* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without modification, are -* permitted provided that the following conditions are met: -* -* 1. Redistributions of source code must retain the above copyright notice, this list of -* conditions and the following disclaimer. -* -* 2. Redistributions in binary form must reproduce the above copyright notice, this list -* of conditions and the following disclaimer in the documentation and/or other materials -* provided with the distribution. -* -* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED -* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR -* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* The views and conclusions contained in the software and 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.abilities.Ability; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.ReplacementEffectImpl; import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; -import mage.constants.Duration; import mage.constants.Outcome; import mage.counters.CounterType; +import mage.counters.Counters; import mage.game.Game; -import mage.game.events.EntersTheBattlefieldEvent; import mage.game.events.GameEvent; import mage.game.events.ZoneChangeEvent; import mage.game.permanent.Permanent; import mage.target.targetpointer.FixedTarget; - - public class PersistAbility extends DiesTriggeredAbility { public PersistAbility() { @@ -73,7 +68,6 @@ public class PersistAbility extends DiesTriggeredAbility { if (permanent.getCounters().getCount(CounterType.M1M1) == 0) { FixedTarget fixedTarget = new FixedTarget(permanent.getId()); fixedTarget.init(game, this); - game.getState().setValue("persist" + getSourceId().toString(), fixedTarget); return true; } } @@ -104,58 +98,9 @@ class PersistEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - game.addEffect(new PersistReplacementEffect(), source); + Counters countersToAdd = new Counters(); + countersToAdd.addCounter(CounterType.M1M1.createInstance()); + game.setEnterWithCounters(source.getSourceId(), countersToAdd); return true; } } - -class PersistReplacementEffect extends ReplacementEffectImpl { - - PersistReplacementEffect() { - super(Duration.Custom, Outcome.UnboostCreature, false); - selfScope = true; - staticText = "return it to the battlefield under its owner's control with a -1/-1 counter on it"; - } - - PersistReplacementEffect(final PersistReplacementEffect effect) { - super(effect); - } - - @Override - public PersistReplacementEffect copy() { - return new PersistReplacementEffect(this); - } - - @Override - public boolean replaceEvent(GameEvent event, Ability source, Game game) { - Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent != null) { - permanent.addCounters(CounterType.M1M1.createInstance(), game); - } - discard(); - return false; - } - - @Override - public boolean checksEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - if (event.getTargetId().equals(source.getSourceId())) { - Object fixedTarget = game.getState().getValue("persist" + source.getSourceId().toString()); - if (fixedTarget instanceof FixedTarget && ((FixedTarget) fixedTarget).getTarget().equals(source.getSourceId()) && - ((FixedTarget) fixedTarget).getZoneChangeCounter() + 1 == game.getState().getZoneChangeCounter(source.getSourceId())) { - - return true; - } - } - return false; - } - - @Override - public boolean apply(Game game, Ability source) { - return false; - } -} diff --git a/Mage/src/mage/abilities/keyword/TransmuteAbility.java b/Mage/src/mage/abilities/keyword/TransmuteAbility.java index f4b095ea41..c861d23621 100644 --- a/Mage/src/mage/abilities/keyword/TransmuteAbility.java +++ b/Mage/src/mage/abilities/keyword/TransmuteAbility.java @@ -57,8 +57,8 @@ public class TransmuteAbility extends SimpleActivatedAbility { @Override public String getRule() { return new StringBuilder("Transmute ").append(this.getManaCosts().getText()) - .append(" (").append(this.getManaCosts().getText()) - .append(", Discard this card: Search your library for a card with the same converted mana cost as this card, reveal it, and put it into your hand. Then shuffle your library. Transmute only as a sorcery.)").toString(); + .append(" (").append(this.getManaCosts().getText()) + .append(", Discard this card: Search your library for a card with the same converted mana cost as this card, reveal it, and put it into your hand. Then shuffle your library. Transmute only as a sorcery.)").toString(); } } diff --git a/Mage/src/mage/abilities/keyword/UndyingAbility.java b/Mage/src/mage/abilities/keyword/UndyingAbility.java index 0f5b2636c6..237989397a 100644 --- a/Mage/src/mage/abilities/keyword/UndyingAbility.java +++ b/Mage/src/mage/abilities/keyword/UndyingAbility.java @@ -1,16 +1,13 @@ package mage.abilities.keyword; - -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.ReplacementEffectImpl; import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; -import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; import mage.counters.CounterType; +import mage.counters.Counters; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; @@ -19,7 +16,7 @@ import mage.game.permanent.Permanent; * @author Loki */ public class UndyingAbility extends DiesTriggeredAbility { - + public UndyingAbility() { super(new UndyingEffect()); this.addEffect(new ReturnSourceFromGraveyardToBattlefieldEffect(false, true)); @@ -39,7 +36,6 @@ public class UndyingAbility extends DiesTriggeredAbility { if (super.checkTrigger(event, game)) { Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); if (!permanent.getCounters().containsKey(CounterType.P1P1) || permanent.getCounters().getCount(CounterType.P1P1) == 0) { - game.getState().setValue("undying" + getSourceId(),permanent.getId()); return true; } } @@ -70,58 +66,9 @@ class UndyingEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - game.addEffect(new UndyingReplacementEffect(), source); - return false; - } -} - -class UndyingReplacementEffect extends ReplacementEffectImpl { - - UndyingReplacementEffect() { - super(Duration.OneUse, Outcome.BoostCreature, false); - selfScope = true; - staticText = "return it to the battlefield under its owner's control with a +1/+1 counter on it"; - } - - UndyingReplacementEffect(final UndyingReplacementEffect effect) { - super(effect); - } - - @Override - public UndyingReplacementEffect copy() { - return new UndyingReplacementEffect(this); - } - - @Override - public boolean replaceEvent(GameEvent event, Ability source, Game game) { - Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent != null) { - game.getState().setValue("undying" + source.getSourceId(), null); - permanent.addCounters(CounterType.P1P1.createInstance(), game); - } - used = true; - return false; - } - - @Override - public boolean checksEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - if (event.getTargetId().equals(source.getSourceId())) { - // Check if undying condition is true - UUID targetId = (UUID) game.getState().getValue("undying" + source.getSourceId()); - if (targetId != null && targetId.equals(source.getSourceId())) { - return true; - } - } - return false; - } - - @Override - public boolean apply(Game game, Ability source) { - return false; + Counters countersToAdd = new Counters(); + countersToAdd.addCounter(CounterType.P1P1.createInstance()); + game.setEnterWithCounters(source.getSourceId(), countersToAdd); + return true; } } diff --git a/Mage/src/mage/abilities/keyword/VanishingUpkeepAbility.java b/Mage/src/mage/abilities/keyword/VanishingUpkeepAbility.java index 188ef1bf5a..211867bbae 100644 --- a/Mage/src/mage/abilities/keyword/VanishingUpkeepAbility.java +++ b/Mage/src/mage/abilities/keyword/VanishingUpkeepAbility.java @@ -31,9 +31,14 @@ public class VanishingUpkeepAbility extends BeginningOfUpkeepTriggeredAbility { @Override public String getRule() { - return "Vanishing " + vanishingAmount + if(vanishingAmount > 0) { + return "Vanishing " + vanishingAmount + " (This permanent enters the battlefield with " + CardUtil.numberToText(vanishingAmount) - + " time counters on it. At the beginning of your upkeep, remove a time counter from it. When the last is removed, sacrifice it.)"; + + " time counters on it. At the beginning of your upkeep, remove a time counter from it. When the last is removed, sacrifice it.)"; + } + else { + return "Vanishing (At the beginning of your upkeep, remove a time counter from this permanent. When the last is removed, sacrifice it.)"; + } } } diff --git a/Mage/src/mage/actions/MageDrawAction.java b/Mage/src/mage/actions/MageDrawAction.java index 60cd6dcbd8..db2e2f3620 100644 --- a/Mage/src/mage/actions/MageDrawAction.java +++ b/Mage/src/mage/actions/MageDrawAction.java @@ -1,7 +1,8 @@ package mage.actions; import java.util.ArrayList; - +import java.util.List; +import java.util.UUID; import mage.actions.impl.MageAction; import mage.actions.score.ArtificialScoringSystem; import mage.cards.Card; @@ -9,9 +10,6 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.players.Player; - -import java.util.List; -import java.util.UUID; import mage.util.CardUtil; /** @@ -39,7 +37,7 @@ public class MageDrawAction extends MageAction { * Draw and set action score. * * @param game Game context. - * @return + * @return */ @Override public int doAction(Game game) { @@ -70,8 +68,8 @@ public class MageDrawAction extends MageAction { } /** - * Draw a card if possible (there is no replacement effect that prevent us from drawing). - * Fire event about card drawn. + * Draw a card if possible (there is no replacement effect that prevent us + * from drawing). Fire event about card drawn. * * @param game * @return diff --git a/Mage/src/mage/cards/CardImpl.java b/Mage/src/mage/cards/CardImpl.java index c353c8e8d3..b72b534d44 100644 --- a/Mage/src/mage/cards/CardImpl.java +++ b/Mage/src/mage/cards/CardImpl.java @@ -602,6 +602,8 @@ public abstract class CardImpl extends MageObjectImpl implements Card { PermanentCard permanent = new PermanentCard(this, event.getPlayerId(), game); // make sure the controller of all continuous effects of this card are switched to the current controller game.getContinuousEffects().setController(objectId, event.getPlayerId()); + // check if there are counters to add to the permanent (e.g. from non replacement effects like Persist) + checkForCountersToAdd(permanent, game); game.addPermanent(permanent); setZone(Zone.BATTLEFIELD, game); game.setScopeRelevant(true); @@ -621,6 +623,16 @@ public abstract class CardImpl extends MageObjectImpl implements Card { return false; } + private void checkForCountersToAdd(PermanentCard permanent, Game game) { + Counters countersToAdd = game.getEnterWithCounters(permanent.getId()); + if (countersToAdd != null) { + for (Counter counter : countersToAdd.values()) { + permanent.addCounters(counter, game); + } + game.setEnterWithCounters(permanent.getId(), null); + } + } + @Override public void setFaceDown(boolean value, Game game) { game.getState().getCardState(objectId).setFaceDown(value); diff --git a/Mage/src/mage/cards/repository/CardRepository.java b/Mage/src/mage/cards/repository/CardRepository.java index 13c6e97216..046c25eb1b 100644 --- a/Mage/src/mage/cards/repository/CardRepository.java +++ b/Mage/src/mage/cards/repository/CardRepository.java @@ -1,383 +1,401 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of BetaSteward_at_googlemail.com. - */ -package mage.cards.repository; - -import com.j256.ormlite.dao.Dao; -import com.j256.ormlite.dao.DaoManager; -import com.j256.ormlite.jdbc.JdbcConnectionSource; -import com.j256.ormlite.stmt.QueryBuilder; -import com.j256.ormlite.stmt.SelectArg; -import com.j256.ormlite.stmt.Where; -import com.j256.ormlite.support.ConnectionSource; -import com.j256.ormlite.support.DatabaseConnection; -import com.j256.ormlite.table.TableUtils; -import java.io.File; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.Date; -import java.util.GregorianCalendar; -import java.util.List; -import java.util.Random; -import java.util.Set; -import java.util.TreeSet; -import java.util.concurrent.Callable; -import mage.constants.CardType; -import mage.constants.SetType; -import org.apache.log4j.Logger; - -/** - * - * @author North - */ -public enum CardRepository { - - instance; - - private static final String JDBC_URL = "jdbc:h2:file:./db/cards.h2;AUTO_SERVER=TRUE"; - private static final String VERSION_ENTITY_NAME = "card"; - // 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 = 32; - - private final Random random = new Random(); - private Dao cardDao; - private Set classNames; - - private CardRepository() { - File file = new File("db"); - if (!file.exists()) { - file.mkdirs(); - } - try { - ConnectionSource connectionSource = new JdbcConnectionSource(JDBC_URL); - boolean obsolete = RepositoryUtil.isDatabaseObsolete(connectionSource, VERSION_ENTITY_NAME, CARD_DB_VERSION); - - if (obsolete) { - TableUtils.dropTable(connectionSource, CardInfo.class, true); - } - - TableUtils.createTableIfNotExists(connectionSource, CardInfo.class); - cardDao = DaoManager.createDao(connectionSource, CardInfo.class); - } catch (SQLException ex) { - ex.printStackTrace(); - } - } - - public void addCards(final List cards) { - try { - cardDao.callBatchTasks(new Callable() { - @Override - public Object call() throws Exception { - try { - for (CardInfo card : cards) { - cardDao.create(card); - if (classNames != null) { - classNames.add(card.getClassName()); - } - } - } catch (SQLException ex) { - Logger.getLogger(CardRepository.class).error("Error adding cards to DB: " + ex.getCause()); - } - return null; - } - }); - } catch (Exception ex) { - } - } - - public boolean cardExists(String className) { - try { - if (classNames == null) { - QueryBuilder qb = cardDao.queryBuilder(); - qb.distinct().selectColumns("className").where().isNotNull("className"); - List results = cardDao.query(qb.prepare()); - classNames = new TreeSet<>(); - for (CardInfo card : results) { - classNames.add(card.getClassName()); - } - } - return classNames.contains(className); - } catch (SQLException ex) { - } - return false; - } - - public Set getNames() { - Set names = new TreeSet<>(); - try { - QueryBuilder qb = cardDao.queryBuilder(); - qb.distinct().selectColumns("name"); - List results = cardDao.query(qb.prepare()); - for (CardInfo card : results) { - int result = card.getName().indexOf(" // "); - if (result > 0) { - names.add(card.getName().substring(0, result)); - names.add(card.getName().substring(result + 4)); - } else { - names.add(card.getName()); - } - } - } catch (SQLException ex) { - } - return names; - } - - public Set getNonLandNames() { - Set names = new TreeSet<>(); - try { - QueryBuilder qb = cardDao.queryBuilder(); - qb.distinct().selectColumns("name"); - qb.where().not().like("types", new SelectArg('%' + CardType.LAND.name() + '%')); - List results = cardDao.query(qb.prepare()); - for (CardInfo card : results) { - int result = card.getName().indexOf(" // "); - if (result > 0) { - names.add(card.getName().substring(0, result)); - names.add(card.getName().substring(result + 4)); - } else { - names.add(card.getName()); - } - } - } catch (SQLException ex) { - } - return names; - } - - public Set getCreatureNames() { - Set names = new TreeSet<>(); - try { - QueryBuilder qb = cardDao.queryBuilder(); - qb.distinct().selectColumns("name"); - qb.where().like("types", new SelectArg('%' + CardType.CREATURE.name() + '%')); - List results = cardDao.query(qb.prepare()); - for (CardInfo card : results) { - int result = card.getName().indexOf(" // "); - if (result > 0) { - names.add(card.getName().substring(0, result)); - names.add(card.getName().substring(result + 4)); - } else { - names.add(card.getName()); - } - } - } catch (SQLException ex) { - } - return names; - } - - public Set getNonLandAndNonCreatureNames() { - Set names = new TreeSet<>(); - try { - QueryBuilder qb = cardDao.queryBuilder(); - qb.distinct().selectColumns("name"); - Where where = qb.where(); - where.and(where.not().like("types", '%' + CardType.CREATURE.name() + '%'), where.not().like("types", '%' + CardType.LAND.name() + '%')); - List results = cardDao.query(qb.prepare()); - for (CardInfo card : results) { - int result = card.getName().indexOf(" // "); - if (result > 0) { - names.add(card.getName().substring(0, result)); - names.add(card.getName().substring(result + 4)); - } else { - names.add(card.getName()); - } - } - } catch (SQLException ex) { - } - return names; - } - - public Set getCreatureTypes() { - TreeSet subtypes = new TreeSet<>(); - try { - QueryBuilder qb = cardDao.queryBuilder(); - qb.distinct().selectColumns("subtypes"); - qb.where().like("types", new SelectArg('%' + CardType.CREATURE.name() + '%')); - List results = cardDao.query(qb.prepare()); - for (CardInfo card : results) { - subtypes.addAll(card.getSubTypes()); - } - // Removing Forest because of Dryad Arbor - subtypes.remove("Forest"); - // Some creature types are not directly included in card types and are added here manually - subtypes.add("Blinkmoth"); - subtypes.add("Camarid"); - subtypes.add("Caribou"); - subtypes.add("Citizen"); - subtypes.add("Coward"); - subtypes.add("Deserter"); - subtypes.add("Germ"); - subtypes.add("Graveborn"); - subtypes.add("Orb"); - subtypes.add("Pentavite"); - subtypes.add("Pincher"); - subtypes.add("Prism"); - subtypes.add("Reflection"); - subtypes.add("Sand"); - subtypes.add("Saproling"); - subtypes.add("Serf"); - subtypes.add("Splinter"); - subtypes.add("Survivor"); - subtypes.add("Tetravite"); - subtypes.add("Triskelavite"); - - } catch (SQLException ex) { - } - return subtypes; - } - - public CardInfo findCard(String setCode, int cardNumber) { - try { - QueryBuilder queryBuilder = cardDao.queryBuilder(); - queryBuilder.where().eq("setCode", new SelectArg(setCode)).and().eq("cardNumber", cardNumber).and().eq("nightCard", false); - List result = cardDao.query(queryBuilder.prepare()); - if (!result.isEmpty()) { - return result.get(0); - } - } catch (SQLException ex) { - } - return null; - } - - public List getClassNames() { - List names = new ArrayList<>(); - try { - List results = cardDao.queryForAll(); - for (CardInfo card : results) { - names.add(card.getClassName()); - } - } catch (SQLException ex) { - } - return names; - } - - public List getMissingCards(List classNames) { - try { - QueryBuilder queryBuilder = cardDao.queryBuilder(); - queryBuilder.where().not().in("className", classNames); - - return cardDao.query(queryBuilder.prepare()); - } catch (SQLException ex) { - } - return new ArrayList<>(); - } - - /** - * - * @param name - * @return random card with the provided name or null if none is found - */ - public CardInfo findCard(String name) { - List cards = findCards(name); - if (!cards.isEmpty()) { - return cards.get(random.nextInt(cards.size())); - } - return null; - } - - public CardInfo findPreferedCoreExpansionCard(String name) { - List cards = findCards(name); - if (!cards.isEmpty()) { - Date lastReleaseDate = new GregorianCalendar(1900, 1, 1).getTime(); - Date lastExpansionDate = new GregorianCalendar(1900, 1, 1).getTime(); - CardInfo cardToUse = null; - for (CardInfo cardinfo : cards) { - ExpansionInfo set = ExpansionRepository.instance.getSetByCode(cardinfo.getSetCode()); - if (set != null) { - if ((set.getType().equals(SetType.EXPANSION) || set.getType().equals(SetType.CORE)) - && (lastExpansionDate == null || set.getReleaseDate().after(lastExpansionDate))) { - cardToUse = cardinfo; - lastExpansionDate = set.getReleaseDate(); - } - if (lastExpansionDate == null && (lastReleaseDate == null || set.getReleaseDate().after(lastReleaseDate))) { - cardToUse = cardinfo; - lastReleaseDate = set.getReleaseDate(); - } - } - } - return cardToUse; - } - return null; - } - - public List findCards(String name) { - try { - QueryBuilder queryBuilder = cardDao.queryBuilder(); - queryBuilder.where().eq("name", new SelectArg(name)); - return cardDao.query(queryBuilder.prepare()); - } catch (SQLException ex) { - } - return new ArrayList<>(); - } - - public List findCards(CardCriteria criteria) { - try { - QueryBuilder queryBuilder = cardDao.queryBuilder(); - criteria.buildQuery(queryBuilder); - - return cardDao.query(queryBuilder.prepare()); - } catch (SQLException ex) { - } - return new ArrayList<>(); - } - - public long getContentVersionFromDB() { - try { - ConnectionSource connectionSource = new JdbcConnectionSource(JDBC_URL); - return RepositoryUtil.getDatabaseVersion(connectionSource, VERSION_ENTITY_NAME + "Content"); - } catch (SQLException ex) { - ex.printStackTrace(); - } - return 0; - } - - public void setContentVersion(long version) { - try { - ConnectionSource connectionSource = new JdbcConnectionSource(JDBC_URL); - RepositoryUtil.updateVersion(connectionSource, VERSION_ENTITY_NAME + "Content", version); - } catch (SQLException ex) { - ex.printStackTrace(); - } - } - - public long getContentVersionConstant() { - return CARD_CONTENT_VERSION; - } - - public void closeDB() { - try { - if (cardDao != null && cardDao.getConnectionSource() != null) { - DatabaseConnection conn = cardDao.getConnectionSource().getReadWriteConnection(); - conn.executeStatement("shutdown compact", 0); - } - - } catch (SQLException ex) { - - } - } -} +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.repository; + +import com.j256.ormlite.dao.Dao; +import com.j256.ormlite.dao.DaoManager; +import com.j256.ormlite.jdbc.JdbcConnectionSource; +import com.j256.ormlite.stmt.QueryBuilder; +import com.j256.ormlite.stmt.SelectArg; +import com.j256.ormlite.stmt.Where; +import com.j256.ormlite.support.ConnectionSource; +import com.j256.ormlite.support.DatabaseConnection; +import com.j256.ormlite.table.TableUtils; +import java.io.File; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.List; +import java.util.Random; +import java.util.Set; +import java.util.TreeSet; +import java.util.concurrent.Callable; +import mage.constants.CardType; +import mage.constants.SetType; +import org.apache.log4j.Logger; + +/** + * + * @author North + */ +public enum CardRepository { + + instance; + + private static final String JDBC_URL = "jdbc:h2:file:./db/cards.h2;AUTO_SERVER=TRUE"; + private static final String VERSION_ENTITY_NAME = "card"; + // 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 = 33; + + private final Random random = new Random(); + private Dao cardDao; + private Set classNames; + + private CardRepository() { + File file = new File("db"); + if (!file.exists()) { + file.mkdirs(); + } + try { + ConnectionSource connectionSource = new JdbcConnectionSource(JDBC_URL); + boolean obsolete = RepositoryUtil.isDatabaseObsolete(connectionSource, VERSION_ENTITY_NAME, CARD_DB_VERSION); + + if (obsolete) { + TableUtils.dropTable(connectionSource, CardInfo.class, true); + } + + TableUtils.createTableIfNotExists(connectionSource, CardInfo.class); + cardDao = DaoManager.createDao(connectionSource, CardInfo.class); + } catch (SQLException ex) { + ex.printStackTrace(); + } + } + + public void addCards(final List cards) { + try { + cardDao.callBatchTasks(new Callable() { + @Override + public Object call() throws Exception { + try { + for (CardInfo card : cards) { + cardDao.create(card); + if (classNames != null) { + classNames.add(card.getClassName()); + } + } + } catch (SQLException ex) { + Logger.getLogger(CardRepository.class).error("Error adding cards to DB: " + ex.getCause()); + } + return null; + } + }); + } catch (Exception ex) { + } + } + + public boolean cardExists(String className) { + try { + if (classNames == null) { + QueryBuilder qb = cardDao.queryBuilder(); + qb.distinct().selectColumns("className").where().isNotNull("className"); + List results = cardDao.query(qb.prepare()); + classNames = new TreeSet<>(); + for (CardInfo card : results) { + classNames.add(card.getClassName()); + } + } + return classNames.contains(className); + } catch (SQLException ex) { + } + return false; + } + + public Set getNames() { + Set names = new TreeSet<>(); + try { + QueryBuilder qb = cardDao.queryBuilder(); + qb.distinct().selectColumns("name"); + List results = cardDao.query(qb.prepare()); + for (CardInfo card : results) { + int result = card.getName().indexOf(" // "); + if (result > 0) { + names.add(card.getName().substring(0, result)); + names.add(card.getName().substring(result + 4)); + } else { + names.add(card.getName()); + } + } + } catch (SQLException ex) { + } + return names; + } + + public Set getNonLandNames() { + Set names = new TreeSet<>(); + try { + QueryBuilder qb = cardDao.queryBuilder(); + qb.distinct().selectColumns("name"); + qb.where().not().like("types", new SelectArg('%' + CardType.LAND.name() + '%')); + List results = cardDao.query(qb.prepare()); + for (CardInfo card : results) { + int result = card.getName().indexOf(" // "); + if (result > 0) { + names.add(card.getName().substring(0, result)); + names.add(card.getName().substring(result + 4)); + } else { + names.add(card.getName()); + } + } + } catch (SQLException ex) { + } + return names; + } + + public Set getCreatureNames() { + Set names = new TreeSet<>(); + try { + QueryBuilder qb = cardDao.queryBuilder(); + qb.distinct().selectColumns("name"); + qb.where().like("types", new SelectArg('%' + CardType.CREATURE.name() + '%')); + List results = cardDao.query(qb.prepare()); + for (CardInfo card : results) { + int result = card.getName().indexOf(" // "); + if (result > 0) { + names.add(card.getName().substring(0, result)); + names.add(card.getName().substring(result + 4)); + } else { + names.add(card.getName()); + } + } + } catch (SQLException ex) { + } + return names; + } + + public Set getNonLandAndNonCreatureNames() { + Set names = new TreeSet<>(); + try { + QueryBuilder qb = cardDao.queryBuilder(); + qb.distinct().selectColumns("name"); + Where where = qb.where(); + where.and(where.not().like("types", '%' + CardType.CREATURE.name() + '%'), where.not().like("types", '%' + CardType.LAND.name() + '%')); + List results = cardDao.query(qb.prepare()); + for (CardInfo card : results) { + int result = card.getName().indexOf(" // "); + if (result > 0) { + names.add(card.getName().substring(0, result)); + names.add(card.getName().substring(result + 4)); + } else { + names.add(card.getName()); + } + } + } catch (SQLException ex) { + } + return names; + } + + public Set getCreatureTypes() { + TreeSet subtypes = new TreeSet<>(); + try { + QueryBuilder qb = cardDao.queryBuilder(); + qb.distinct().selectColumns("subtypes"); + qb.where().like("types", new SelectArg('%' + CardType.CREATURE.name() + '%')); + List results = cardDao.query(qb.prepare()); + for (CardInfo card : results) { + subtypes.addAll(card.getSubTypes()); + } + // Removing Forest because of Dryad Arbor + subtypes.remove("Forest"); + // Some creature types are not directly included in card types and are added here manually + subtypes.add("Blinkmoth"); + subtypes.add("Camarid"); + subtypes.add("Caribou"); + subtypes.add("Citizen"); + subtypes.add("Coward"); + subtypes.add("Deserter"); + subtypes.add("Germ"); + subtypes.add("Graveborn"); + subtypes.add("Orb"); + subtypes.add("Pentavite"); + subtypes.add("Pincher"); + subtypes.add("Prism"); + subtypes.add("Reflection"); + subtypes.add("Sand"); + subtypes.add("Saproling"); + subtypes.add("Serf"); + subtypes.add("Splinter"); + subtypes.add("Survivor"); + subtypes.add("Tetravite"); + subtypes.add("Triskelavite"); + + } catch (SQLException ex) { + } + return subtypes; + } + + public Set getLandTypes() { + TreeSet subtypes = new TreeSet<>(); + try { + QueryBuilder qb = cardDao.queryBuilder(); + qb.distinct().selectColumns("subtypes"); + qb.where().like("types", new SelectArg('%' + CardType.LAND.name() + '%')); + List results = cardDao.query(qb.prepare()); + for (CardInfo card : results) { + subtypes.addAll(card.getSubTypes()); + } + // Removing Dryad because of Dryad Arbor + subtypes.remove("Dryad"); + + } catch (SQLException ex) { + } + return subtypes; + } + + public CardInfo findCard(String setCode, int cardNumber) { + try { + QueryBuilder queryBuilder = cardDao.queryBuilder(); + queryBuilder.where().eq("setCode", new SelectArg(setCode)).and().eq("cardNumber", cardNumber).and().eq("nightCard", false); + List result = cardDao.query(queryBuilder.prepare()); + if (!result.isEmpty()) { + return result.get(0); + } + } catch (SQLException ex) { + } + return null; + } + + public List getClassNames() { + List names = new ArrayList<>(); + try { + List results = cardDao.queryForAll(); + for (CardInfo card : results) { + names.add(card.getClassName()); + } + } catch (SQLException ex) { + } + return names; + } + + public List getMissingCards(List classNames) { + try { + QueryBuilder queryBuilder = cardDao.queryBuilder(); + queryBuilder.where().not().in("className", classNames); + + return cardDao.query(queryBuilder.prepare()); + } catch (SQLException ex) { + } + return new ArrayList<>(); + } + + /** + * + * @param name + * @return random card with the provided name or null if none is found + */ + public CardInfo findCard(String name) { + List cards = findCards(name); + if (!cards.isEmpty()) { + return cards.get(random.nextInt(cards.size())); + } + return null; + } + + public CardInfo findPreferedCoreExpansionCard(String name) { + List cards = findCards(name); + if (!cards.isEmpty()) { + Date lastReleaseDate = new GregorianCalendar(1900, 1, 1).getTime(); + Date lastExpansionDate = new GregorianCalendar(1900, 1, 1).getTime(); + CardInfo cardToUse = null; + for (CardInfo cardinfo : cards) { + ExpansionInfo set = ExpansionRepository.instance.getSetByCode(cardinfo.getSetCode()); + if (set != null) { + if ((set.getType().equals(SetType.EXPANSION) || set.getType().equals(SetType.CORE)) + && (lastExpansionDate == null || set.getReleaseDate().after(lastExpansionDate))) { + cardToUse = cardinfo; + lastExpansionDate = set.getReleaseDate(); + } + if (lastExpansionDate == null && (lastReleaseDate == null || set.getReleaseDate().after(lastReleaseDate))) { + cardToUse = cardinfo; + lastReleaseDate = set.getReleaseDate(); + } + } + } + return cardToUse; + } + return null; + } + + public List findCards(String name) { + try { + QueryBuilder queryBuilder = cardDao.queryBuilder(); + queryBuilder.where().eq("name", new SelectArg(name)); + return cardDao.query(queryBuilder.prepare()); + } catch (SQLException ex) { + } + return new ArrayList<>(); + } + + public List findCards(CardCriteria criteria) { + try { + QueryBuilder queryBuilder = cardDao.queryBuilder(); + criteria.buildQuery(queryBuilder); + + return cardDao.query(queryBuilder.prepare()); + } catch (SQLException ex) { + } + return new ArrayList<>(); + } + + public long getContentVersionFromDB() { + try { + ConnectionSource connectionSource = new JdbcConnectionSource(JDBC_URL); + return RepositoryUtil.getDatabaseVersion(connectionSource, VERSION_ENTITY_NAME + "Content"); + } catch (SQLException ex) { + ex.printStackTrace(); + } + return 0; + } + + public void setContentVersion(long version) { + try { + ConnectionSource connectionSource = new JdbcConnectionSource(JDBC_URL); + RepositoryUtil.updateVersion(connectionSource, VERSION_ENTITY_NAME + "Content", version); + } catch (SQLException ex) { + ex.printStackTrace(); + } + } + + public long getContentVersionConstant() { + return CARD_CONTENT_VERSION; + } + + public void closeDB() { + try { + if (cardDao != null && cardDao.getConnectionSource() != null) { + DatabaseConnection conn = cardDao.getConnectionSource().getReadWriteConnection(); + conn.executeStatement("shutdown compact", 0); + } + + } catch (SQLException ex) { + + } + } +} diff --git a/Mage/src/mage/constants/AsThoughEffectType.java b/Mage/src/mage/constants/AsThoughEffectType.java index 433fbd7c03..61c98018f2 100644 --- a/Mage/src/mage/constants/AsThoughEffectType.java +++ b/Mage/src/mage/constants/AsThoughEffectType.java @@ -17,7 +17,7 @@ public enum AsThoughEffectType { DAMAGE, HEXPROOF, PAY, - REVEAL_FACE_DOWN, + LOOK_AT_FACE_DOWN, SPEND_ANY_MANA, TARGET } diff --git a/Mage/src/mage/constants/Zone.java b/Mage/src/mage/constants/Zone.java index 52e6164223..b5318c939a 100644 --- a/Mage/src/mage/constants/Zone.java +++ b/Mage/src/mage/constants/Zone.java @@ -5,9 +5,19 @@ package mage.constants; * @author North */ public enum Zone { + HAND, GRAVEYARD, LIBRARY, BATTLEFIELD, STACK, EXILED, ALL, OUTSIDE, PICK, COMMAND; public boolean match(Zone zone) { return (this == zone || this == ALL || zone == ALL); } + + @Override + public String toString() { + if (this.equals(EXILED)) { + return "exile zone"; + } + return super.toString(); //To change body of generated methods, choose Tools | Templates. + } + } diff --git a/Mage/src/mage/counters/CounterType.java b/Mage/src/mage/counters/CounterType.java index a8dc32e0ef..15958a9d83 100644 --- a/Mage/src/mage/counters/CounterType.java +++ b/Mage/src/mage/counters/CounterType.java @@ -33,7 +33,7 @@ package mage.counters; * @author nantuko */ public enum CounterType { - + AGE("age"), AIM("aim"), ARROWHEAD("arrowhead"), @@ -57,6 +57,7 @@ public enum CounterType { FUSE("fuse"), GOLD("gold"), HATCHLING("hatchling"), + HEALING("healing"), HOOFPRINT("hoofprint"), ICE("ice"), JAVELIN("javelin"), @@ -78,6 +79,7 @@ public enum CounterType { PRESSURE("pressure"), QUEST("quest"), SHIELD("shield"), + SHRED("shred"), SLIME("slime"), SPORE("spore"), STORAGE("storage"), @@ -116,7 +118,7 @@ public enum CounterType { } /** - * Create instance of counter type with defined amount of counters of the + * Create instance of counter type with defined amount of counters of the * given type. * * @param amount amount of counters of the given type. diff --git a/Mage/src/mage/game/Game.java b/Mage/src/mage/game/Game.java index ff69876d5b..1e0a491f92 100644 --- a/Mage/src/mage/game/Game.java +++ b/Mage/src/mage/game/Game.java @@ -54,6 +54,7 @@ import mage.constants.MultiplayerAttackOption; import mage.constants.PlayerAction; import mage.constants.RangeOfInfluence; import mage.constants.Zone; +import mage.counters.Counters; import mage.game.combat.Combat; import mage.game.command.Commander; import mage.game.command.Emblem; @@ -436,4 +437,8 @@ public interface Game extends MageItem, Serializable { void rollbackTurns(int turnsToRollback); boolean executingRollback(); + + void setEnterWithCounters(UUID sourceId, Counters counters); + + Counters getEnterWithCounters(UUID sourceId); } diff --git a/Mage/src/mage/game/GameImpl.java b/Mage/src/mage/game/GameImpl.java index 2b0cd6990c..e30b539ce2 100644 --- a/Mage/src/mage/game/GameImpl.java +++ b/Mage/src/mage/game/GameImpl.java @@ -78,6 +78,7 @@ import mage.constants.PlayerAction; import mage.constants.RangeOfInfluence; import mage.constants.Zone; import mage.counters.CounterType; +import mage.counters.Counters; import mage.filter.Filter; import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledCreaturePermanent; @@ -207,6 +208,9 @@ public abstract class GameImpl implements Game, Serializable { private final int startLife; protected PlayerList playerList; + // used to set the counters a permanent adds the battlefield (if no replacement effect is used e.g. Persist) + protected Map enterWithCounters = new HashMap<>(); + public GameImpl(MultiplayerAttackOption attackOption, RangeOfInfluence range, int freeMulligans, int startLife) { this.id = UUID.randomUUID(); this.range = range; @@ -246,6 +250,7 @@ public abstract class GameImpl implements Game, Serializable { this.priorityTime = game.priorityTime; this.saveGame = game.saveGame; this.startLife = game.startLife; + this.enterWithCounters.putAll(game.enterWithCounters); } @Override @@ -2652,6 +2657,7 @@ public abstract class GameImpl implements Game, Serializable { for (Player playerObject : getPlayers().values()) { if (playerObject.isHuman() && playerObject.isInGame()) { playerObject.abort(); + playerObject.resetPlayerPassedActions(); } } fireUpdatePlayersEvent(); @@ -2665,4 +2671,20 @@ public abstract class GameImpl implements Game, Serializable { return executingRollback; } + @Override + public void setEnterWithCounters(UUID sourceId, Counters counters) { + if (counters == null) { + if (enterWithCounters.containsKey(sourceId)) { + enterWithCounters.remove(sourceId); + } + return; + } + enterWithCounters.put(sourceId, counters); + } + + @Override + public Counters getEnterWithCounters(UUID sourceId) { + return enterWithCounters.get(sourceId); + } + } diff --git a/Mage/src/mage/players/Player.java b/Mage/src/mage/players/Player.java index 88aa373b59..8e12ba8b25 100644 --- a/Mage/src/mage/players/Player.java +++ b/Mage/src/mage/players/Player.java @@ -179,6 +179,8 @@ public interface Player extends MageItem, Copyable { void resetPassed(); + void resetPlayerPassedActions(); + boolean getPassedTurn(); boolean getPassedUntilEndOfTurn(); @@ -564,8 +566,9 @@ public interface Player extends MageItem, Copyable { * * @param card * @param game + * @return player looked at the card */ - void revealFaceDownCard(Card card, Game game); + boolean lookAtFaceDownCard(Card card, Game game); /** * Set seconds left to play the game. @@ -620,15 +623,11 @@ public interface Player extends MageItem, Copyable { */ boolean moveCards(Cards cards, Zone fromZone, Zone toZone, Ability source, Game game); - boolean moveCards(Cards cards, Zone fromZone, Zone toZone, Ability source, Game game, boolean withName); - boolean moveCards(Card card, Zone fromZone, Zone toZone, Ability source, Game game); - boolean moveCards(Card card, Zone fromZone, Zone toZone, Ability source, Game game, boolean withName); - boolean moveCards(Set cards, Zone fromZone, Zone toZone, Ability source, Game game); - boolean moveCards(Set cards, Zone fromZone, Zone toZone, Ability source, Game game, boolean withName); + boolean moveCardsToExile(Card card, Ability source, Game game, boolean withName, UUID exileId, String exileZoneName); boolean moveCardsToExile(Set cards, Ability source, Game game, boolean withName, UUID exileId, String exileZoneName); @@ -686,9 +685,9 @@ public interface Player extends MageItem, Copyable { * @param source * @param game * @param fromZone if null, this info isn't postet - * @return + * @return Set that were successful moved to graveyard */ - boolean moveCardsToGraveyardWithInfo(Set cards, Ability source, Game game, Zone fromZone); + Set moveCardsToGraveyardWithInfo(Set cards, Ability source, Game game, Zone fromZone); /** * Uses card.moveToZone and posts a inform message about moving the card to diff --git a/Mage/src/mage/players/PlayerImpl.java b/Mage/src/mage/players/PlayerImpl.java index b5b2029a92..7bfa31a2b0 100644 --- a/Mage/src/mage/players/PlayerImpl.java +++ b/Mage/src/mage/players/PlayerImpl.java @@ -34,6 +34,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedHashMap; +import java.util.LinkedHashSet; import java.util.List; import java.util.Locale; import java.util.Map; @@ -330,9 +331,21 @@ public abstract class PlayerImpl implements Player, Serializable { this.name = player.getName(); this.human = player.isHuman(); this.life = player.getLife(); - this.wins = player.hasWon(); - this.loses = player.hasLost(); + // Don't restore more global states. If restored they are probably cause for unintended draws (https://github.com/magefree/mage/issues/1205). +// this.wins = player.hasWon(); +// this.loses = player.hasLost(); +// this.left = player.hasLeft(); +// this.quit = player.hasQuit(); + // Makes no sense to restore +// this.passed = player.isPassed(); +// this.priorityTimeLeft = player.getPriorityTimeLeft(); +// this.idleTimeout = player.hasIdleTimeout(); +// this.timerTimeout = player.hasTimerTimeout(); + // can't change so no need to restore +// this.isTestMode = player.isTestMode(); + // This is meta data and should'nt be restored by rollback +// this.userData = player.getUserData(); this.library = player.getLibrary().copy(); this.sideboard = player.getSideboard().copy(); this.hand = player.getHand().copy(); @@ -349,10 +362,6 @@ public abstract class PlayerImpl implements Player, Serializable { this.manaPool = player.getManaPool().copy(); this.turns = player.getTurns(); - this.left = player.hasLeft(); - this.quit = player.hasQuit(); - this.timerTimeout = player.hasTimerTimeout(); - this.idleTimeout = player.hasIdleTimeout(); this.range = player.getRange(); this.canGainLife = player.isCanGainLife(); this.canLoseLife = player.isCanLoseLife(); @@ -361,7 +370,6 @@ public abstract class PlayerImpl implements Player, Serializable { this.inRange.clear(); this.inRange.addAll(player.getInRange()); - this.userData = player.getUserData(); this.canPayLifeCost = player.canPayLifeCost(); this.canPaySacrificeCost = player.canPaySacrificeCost(); this.loseByZeroOrLessLife = player.canLoseByZeroOrLessLife(); @@ -371,12 +379,9 @@ public abstract class PlayerImpl implements Player, Serializable { this.topCardRevealed = player.isTopCardRevealed(); this.playersUnderYourControl.clear(); this.playersUnderYourControl.addAll(player.getPlayersUnderYourControl()); - this.isTestMode = player.isTestMode(); this.isGameUnderControl = player.isGameUnderControl(); this.turnController = player.getTurnControlledBy(); - this.passed = player.isPassed(); - this.priorityTimeLeft = player.getPriorityTimeLeft(); this.reachedNextTurnAfterLeaving = player.hasReachedNextTurnAfterLeaving(); this.castSourceIdWithAlternateMana = player.getCastSourceIdWithAlternateMana(); this.castSourceIdManaCosts = player.getCastSourceIdManaCosts(); @@ -1187,8 +1192,9 @@ public abstract class PlayerImpl implements Player, Serializable { @Override public LinkedHashMap getUseableActivatedAbilities(MageObject object, Zone zone, Game game) { LinkedHashMap useable = new LinkedHashMap<>(); - if (!(object instanceof Permanent) || ((Permanent) object).canUseActivatedAbilities(game)) { - for (Ability ability : object.getAbilities()) { + boolean canUse = !(object instanceof Permanent) || ((Permanent) object).canUseActivatedAbilities(game); + for (Ability ability : object.getAbilities()) { + if (canUse || ability.getAbilityType().equals(AbilityType.SPECIAL_ACTION)) { if (ability.getZone().match(zone)) { if (ability instanceof ActivatedAbility) { if (((ActivatedAbility) ability).canActivate(playerId, game)) { @@ -1205,16 +1211,20 @@ public abstract class PlayerImpl implements Player, Serializable { } } } - if (zone != Zone.HAND) { - if (Zone.GRAVEYARD.equals(zone) && canPlayCardsFromGraveyard()) { - for (ActivatedAbility ability : object.getAbilities().getPlayableAbilities(Zone.HAND)) { + } + if (zone != Zone.HAND) { + if (Zone.GRAVEYARD.equals(zone) && canPlayCardsFromGraveyard()) { + for (ActivatedAbility ability : object.getAbilities().getPlayableAbilities(Zone.HAND)) { + if (canUse || ability.getAbilityType().equals(AbilityType.SPECIAL_ACTION)) { if (ability.canActivate(playerId, game)) { useable.put(ability.getId(), ability); } } } - if (zone != Zone.BATTLEFIELD && game.getContinuousEffects().asThough(object.getId(), AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, this.getId(), game)) { - for (Ability ability : object.getAbilities()) { + } + if (zone != Zone.BATTLEFIELD && game.getContinuousEffects().asThough(object.getId(), AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, this.getId(), game)) { + for (Ability ability : object.getAbilities()) { + if (canUse || ability.getAbilityType().equals(AbilityType.SPECIAL_ACTION)) { ability.setControllerId(this.getId()); if (ability instanceof ActivatedAbility && ability.getZone().match(Zone.HAND) && ((ActivatedAbility) ability).canActivate(playerId, game)) { @@ -1223,8 +1233,9 @@ public abstract class PlayerImpl implements Player, Serializable { } } } - getOtherUseableActivatedAbilities(object, zone, game, useable); } + getOtherUseableActivatedAbilities(object, zone, game, useable); + return useable; } @@ -1232,49 +1243,52 @@ public abstract class PlayerImpl implements Player, Serializable { private void getOtherUseableActivatedAbilities(MageObject object, Zone zone, Game game, Map useable) { Abilities otherAbilities = game.getState().getActivatedOtherAbilities(object.getId(), zone); if (otherAbilities != null) { + boolean canUse = !(object instanceof Permanent) || ((Permanent) object).canUseActivatedAbilities(game); for (ActivatedAbility ability : otherAbilities) { - Card card = game.getCard(ability.getSourceId()); - if (card.isSplitCard() && ability instanceof FlashbackAbility) { - FlashbackAbility flashbackAbility; - // Left Half - if (card.getCardType().contains(CardType.INSTANT)) { - flashbackAbility = new FlashbackAbility(((SplitCard) card).getLeftHalfCard().getManaCost(), TimingRule.INSTANT); - } else { - flashbackAbility = new FlashbackAbility(((SplitCard) card).getLeftHalfCard().getManaCost(), TimingRule.SORCERY); - } - flashbackAbility.setSourceId(card.getId()); - flashbackAbility.setControllerId(card.getOwnerId()); - flashbackAbility.setSpellAbilityType(SpellAbilityType.SPLIT_LEFT); - flashbackAbility.setAbilityName(((SplitCard) card).getLeftHalfCard().getName()); - if (flashbackAbility.canActivate(playerId, game)) { - useable.put(flashbackAbility.getId(), flashbackAbility); - } - // Right Half - if (card.getCardType().contains(CardType.INSTANT)) { - flashbackAbility = new FlashbackAbility(((SplitCard) card).getRightHalfCard().getManaCost(), TimingRule.INSTANT); - } else { - flashbackAbility = new FlashbackAbility(((SplitCard) card).getRightHalfCard().getManaCost(), TimingRule.SORCERY); - } - flashbackAbility.setSourceId(card.getId()); - flashbackAbility.setControllerId(card.getOwnerId()); - flashbackAbility.setSpellAbilityType(SpellAbilityType.SPLIT_RIGHT); - flashbackAbility.setAbilityName(((SplitCard) card).getRightHalfCard().getName()); - if (flashbackAbility.canActivate(playerId, game)) { - useable.put(flashbackAbility.getId(), flashbackAbility); - } + if (canUse || ability.getAbilityType().equals(AbilityType.SPECIAL_ACTION)) { + Card card = game.getCard(ability.getSourceId()); + if (card.isSplitCard() && ability instanceof FlashbackAbility) { + FlashbackAbility flashbackAbility; + // Left Half + if (card.getCardType().contains(CardType.INSTANT)) { + flashbackAbility = new FlashbackAbility(((SplitCard) card).getLeftHalfCard().getManaCost(), TimingRule.INSTANT); + } else { + flashbackAbility = new FlashbackAbility(((SplitCard) card).getLeftHalfCard().getManaCost(), TimingRule.SORCERY); + } + flashbackAbility.setSourceId(card.getId()); + flashbackAbility.setControllerId(card.getOwnerId()); + flashbackAbility.setSpellAbilityType(SpellAbilityType.SPLIT_LEFT); + flashbackAbility.setAbilityName(((SplitCard) card).getLeftHalfCard().getName()); + if (flashbackAbility.canActivate(playerId, game)) { + useable.put(flashbackAbility.getId(), flashbackAbility); + } + // Right Half + if (card.getCardType().contains(CardType.INSTANT)) { + flashbackAbility = new FlashbackAbility(((SplitCard) card).getRightHalfCard().getManaCost(), TimingRule.INSTANT); + } else { + flashbackAbility = new FlashbackAbility(((SplitCard) card).getRightHalfCard().getManaCost(), TimingRule.SORCERY); + } + flashbackAbility.setSourceId(card.getId()); + flashbackAbility.setControllerId(card.getOwnerId()); + flashbackAbility.setSpellAbilityType(SpellAbilityType.SPLIT_RIGHT); + flashbackAbility.setAbilityName(((SplitCard) card).getRightHalfCard().getName()); + if (flashbackAbility.canActivate(playerId, game)) { + useable.put(flashbackAbility.getId(), flashbackAbility); + } - } else { - useable.put(ability.getId(), ability); + } else { + useable.put(ability.getId(), ability); + } } - } } } protected LinkedHashMap getUseableManaAbilities(MageObject object, Zone zone, Game game) { LinkedHashMap useable = new LinkedHashMap<>(); - if (!(object instanceof Permanent) || ((Permanent) object).canUseActivatedAbilities(game)) { - for (ManaAbility ability : object.getAbilities().getManaAbilities(zone)) { + boolean canUse = !(object instanceof Permanent) || ((Permanent) object).canUseActivatedAbilities(game); + for (ManaAbility ability : object.getAbilities().getManaAbilities(zone)) { + if (canUse || ability.getAbilityType().equals(AbilityType.SPECIAL_ACTION)) { if (ability.canActivate(playerId, game)) { useable.put(ability.getId(), ability); } @@ -1823,6 +1837,15 @@ public abstract class PlayerImpl implements Player, Serializable { this.passed = this.loses || this.hasLeft(); } + @Override + public void resetPlayerPassedActions() { + this.passedAllTurns = false; + this.passedTurn = false; + this.passedUntilEndOfTurn = false; + this.passedUntilNextMain = false; + this.passedUntilStackResolved = false; + } + @Override public void quit(Game game) { quit = true; @@ -2817,11 +2840,15 @@ public abstract class PlayerImpl implements Player, Serializable { } @Override - public void revealFaceDownCard(Card card, Game game) { - if (game.getContinuousEffects().asThough(card.getId(), AsThoughEffectType.REVEAL_FACE_DOWN, this.getId(), game)) { - Cards cards = new CardsImpl(card); - this.revealCards(getName(), cards, game); + public boolean lookAtFaceDownCard(Card card, Game game) { + if (game.getContinuousEffects().asThough(card.getId(), AsThoughEffectType.LOOK_AT_FACE_DOWN, this.getId(), game)) { + if (chooseUse(Outcome.Benefit, "Look at that card?", null, game)) { + Cards cards = new CardsImpl(card); + this.lookAtCards(getName(), cards, game); + return true; + } } + return false; } @Override @@ -2876,16 +2903,9 @@ public abstract class PlayerImpl implements Player, Serializable { @Override public boolean moveCards(Cards cards, Zone fromZone, Zone toZone, Ability source, Game game) { - return moveCards(cards, fromZone, toZone, source, game, true); - } - - @Override - public boolean moveCards(Cards cards, Zone fromZone, Zone toZone, Ability source, Game game, boolean withName) { Set cardList = new HashSet<>(); for (UUID cardId : cards) { - if (fromZone == null) { - fromZone = game.getState().getZone(cardId); - } + fromZone = game.getState().getZone(cardId); if (fromZone.equals(Zone.BATTLEFIELD)) { Permanent permanent = game.getPermanent(cardId); if (permanent != null) { @@ -2898,68 +2918,76 @@ public abstract class PlayerImpl implements Player, Serializable { } } } - return moveCards(cardList, fromZone, toZone, source, game, withName); + return moveCards(cardList, fromZone, toZone, source, game); } @Override public boolean moveCards(Card card, Zone fromZone, Zone toZone, Ability source, Game game) { - return moveCards(card, fromZone, toZone, source, game, true); - } - - @Override - public boolean moveCards(Card card, Zone fromZone, Zone toZone, Ability source, Game game, boolean withName) { Set cardList = new HashSet<>(); if (card != null) { cardList.add(card); } - return moveCards(cardList, fromZone, toZone, source, game, withName); + return moveCards(cardList, fromZone, toZone, source, game); } @Override public boolean moveCards(Set cards, Zone fromZone, Zone toZone, Ability source, Game game) { - return moveCards(cards, fromZone, toZone, source, game, true); - } - - @Override - public boolean moveCards(Set cards, Zone fromZone, Zone toZone, Ability source, Game game, boolean withName) { if (cards.isEmpty()) { return true; } - game.fireEvent(new ZoneChangeGroupEvent(cards, source == null ? null : source.getSourceId(), this.getId(), fromZone, toZone)); + Set successfulMovedCards = new LinkedHashSet<>(); switch (toZone) { case EXILED: - boolean result = false; for (Card card : cards) { fromZone = game.getState().getZone(card.getId()); - result |= moveCardToExileWithInfo(card, null, "", source == null ? null : source.getSourceId(), game, fromZone, withName); + boolean withName = (fromZone.equals(Zone.BATTLEFIELD) || fromZone.equals(Zone.STACK)) || !card.isFaceDown(game); + if (moveCardToExileWithInfo(card, null, "", source == null ? null : source.getSourceId(), game, fromZone, withName)) { + successfulMovedCards.add(card); + } } - return result; + break; case GRAVEYARD: - return moveCardsToGraveyardWithInfo(cards, source, game, fromZone); + successfulMovedCards = moveCardsToGraveyardWithInfo(cards, source, game, fromZone); + break; case HAND: - result = false; for (Card card : cards) { fromZone = game.getState().getZone(card.getId()); - result |= moveCardToHandWithInfo(card, source == null ? null : source.getSourceId(), game, withName); + 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)) { + successfulMovedCards.add(card); + } } - return result; + break; case BATTLEFIELD: - result = false; for (Card card : cards) { fromZone = game.getState().getZone(card.getId()); - result |= putOntoBattlefieldWithInfo(card, game, fromZone, source == null ? null : source.getSourceId(), false, !withName); + if (putOntoBattlefieldWithInfo(card, game, fromZone, source == null ? null : source.getSourceId(), false, !card.isFaceDown(game))) { + successfulMovedCards.add(card); + } } - return result; + break; case LIBRARY: - result = false; for (Card card : cards) { fromZone = game.getState().getZone(card.getId()); - result |= moveCardToLibraryWithInfo(card, source == null ? null : source.getSourceId(), game, fromZone, true, withName); + boolean withName = fromZone.equals(Zone.BATTLEFIELD) || !card.isFaceDown(game); + if (moveCardToLibraryWithInfo(card, source == null ? null : source.getSourceId(), game, fromZone, true, withName)) { + successfulMovedCards.add(card); + } } - return result; + break; default: throw new UnsupportedOperationException("to Zone not supported yet"); } + game.fireEvent(new ZoneChangeGroupEvent(successfulMovedCards, source == null ? null : source.getSourceId(), this.getId(), fromZone, toZone)); + return successfulMovedCards.size() > 0; + } + + @Override + public boolean moveCardsToExile(Card card, Ability source, Game game, boolean withName, UUID exileId, String exileZoneName) { + Set cards = new HashSet<>(); + cards.add(card); + return moveCardsToExile(cards, source, game, withName, exileId, exileZoneName); } @Override @@ -2985,22 +3013,19 @@ public abstract class PlayerImpl implements Player, Serializable { public boolean moveCardToHandWithInfo(Card card, UUID sourceId, Game game, boolean withName) { boolean result = false; Zone fromZone = game.getState().getZone(card.getId()); + if (fromZone.equals(Zone.BATTLEFIELD) && !(card instanceof Permanent)) { + card = game.getPermanent(card.getId()); + } if (card.moveToZone(Zone.HAND, sourceId, game, false)) { if (card instanceof PermanentCard) { card = game.getCard(card.getId()); } if (!game.isSimulation()) { - StringBuilder sb = new StringBuilder(this.getLogName()).append(" puts ").append(withName ? card.getLogName() : (card.isFaceDown(game) ? "a face down card" : "a card")); - switch (fromZone) { - case EXILED: - sb.append(" from exile zone "); - break; - default: - sb.append(fromZone != null ? new StringBuilder(" from ").append(fromZone.toString().toLowerCase(Locale.ENGLISH)).append(" ") : ""); - break; - } - sb.append(card.getOwnerId().equals(this.getId()) ? "into his or her hand" : "into its owner's hand"); - game.informPlayers(sb.toString()); + game.informPlayers(this.getLogName() + " puts " + + (withName ? card.getLogName() : (card.isFaceDown(game) ? "a face down card" : "a card")) + + " from " + fromZone.toString().toLowerCase(Locale.ENGLISH) + " " + + (card.getOwnerId().equals(this.getId()) ? "into his or her hand" : "into its owner's hand") + ); } result = true; } @@ -3008,9 +3033,9 @@ public abstract class PlayerImpl implements Player, Serializable { } @Override - public boolean moveCardsToGraveyardWithInfo(Set allCards, Ability source, Game game, Zone fromZone) { - boolean result = true; + public Set moveCardsToGraveyardWithInfo(Set allCards, Ability source, Game game, Zone fromZone) { UUID sourceId = source == null ? null : source.getSourceId(); + Set movedCards = new LinkedHashSet<>(); while (!allCards.isEmpty()) { // identify cards from one owner Cards cards = new CardsImpl(); @@ -3050,21 +3075,28 @@ public abstract class PlayerImpl implements Player, Serializable { cards.remove(targetObjectId); if (card != null) { fromZone = game.getState().getZone(card.getId()); - result &= choosingPlayer.moveCardToGraveyardWithInfo(card, sourceId, game, fromZone); + if (choosingPlayer.moveCardToGraveyardWithInfo(card, sourceId, game, fromZone)) { + movedCards.add(card); + } } target.clearChosen(); } if (cards.size() == 1) { - result &= choosingPlayer.moveCardToGraveyardWithInfo(cards.getCards(game).iterator().next(), sourceId, game, fromZone); + Card card = cards.getCards(game).iterator().next(); + if (card != null && choosingPlayer.moveCardToGraveyardWithInfo(card, sourceId, game, fromZone)) { + movedCards.add(card); + } } } else { for (Card card : cards.getCards(game)) { - result &= choosingPlayer.moveCardToGraveyardWithInfo(card, sourceId, game, fromZone); + if (choosingPlayer.moveCardToGraveyardWithInfo(card, sourceId, game, fromZone)) { + movedCards.add(card); + } } } } } - return result; + return movedCards; } @Override diff --git a/Mage/src/mage/target/targetpointer/FixedTarget.java b/Mage/src/mage/target/targetpointer/FixedTarget.java index 5a8f3c68d4..f513ca21ba 100644 --- a/Mage/src/mage/target/targetpointer/FixedTarget.java +++ b/Mage/src/mage/target/targetpointer/FixedTarget.java @@ -6,6 +6,7 @@ import java.util.UUID; import mage.abilities.Ability; import mage.cards.Card; import mage.game.Game; +import mage.game.permanent.Permanent; public class FixedTarget implements TargetPointer { @@ -18,6 +19,12 @@ public class FixedTarget implements TargetPointer { this.initialized = false; } + public FixedTarget(Permanent permanent, Game game) { + this.targetId = permanent.getId(); + this.zoneChangeCounter = permanent.getZoneChangeCounter(game); + this.initialized = true; + } + /** * Use this if you already want to fix the target object to the known zone * now (otherwise the zone will be set if the ability triggers or not at diff --git a/Mage/src/mage/util/CardUtil.java b/Mage/src/mage/util/CardUtil.java index 475c3a2c10..3af5676fa4 100644 --- a/Mage/src/mage/util/CardUtil.java +++ b/Mage/src/mage/util/CardUtil.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.util; import java.util.Arrays; @@ -58,7 +57,6 @@ import mage.game.permanent.token.Token; import mage.game.stack.Spell; import mage.util.functions.CopyTokenFunction; - /** * @author nantuko */ @@ -71,16 +69,16 @@ public class CardUtil { private static final String regexWhite = ".*\\x7b.{0,2}W.{0,2}\\x7d.*"; private static final String SOURCE_EXILE_ZONE_TEXT = "SourceExileZone"; - - static String numberStrings[] = { "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", - "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "ninteen", "twenty"}; - public static final String[] NON_CHANGELING_SUBTYPES_VALUES = new String[] { "Mountain", "Forest", "Plains", "Swamp", "Island", - "Aura", "Curse", "Shrine", - "Equipment", "Fortification", "Contraption", - "Trap", "Arcane"}; - public static final Set NON_CREATURE_SUBTYPES = new HashSet<>(Arrays.asList(NON_CHANGELING_SUBTYPES_VALUES)); - + static String numberStrings[] = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", + "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "ninteen", "twenty"}; + + public static final String[] NON_CHANGELING_SUBTYPES_VALUES = new String[]{"Mountain", "Forest", "Plains", "Swamp", "Island", + "Aura", "Curse", "Shrine", + "Equipment", "Fortification", "Contraption", + "Trap", "Arcane"}; + public static final Set NON_CREATURE_SUBTYPES = new HashSet<>(Arrays.asList(NON_CHANGELING_SUBTYPES_VALUES)); + /** * Checks whether two cards share card types. * @@ -102,6 +100,7 @@ public class CardUtil { return false; } + /** * Checks whether two cards share card subtypes. * @@ -116,10 +115,10 @@ public class CardUtil { } if (card1.getCardType().contains(CardType.CREATURE) && card2.getCardType().contains(CardType.CREATURE)) { - if (card1.getAbilities().contains(ChangelingAbility.getInstance()) || - card1.getSubtype().contains(ChangelingAbility.ALL_CREATURE_TYPE) || - card2.getAbilities().contains(ChangelingAbility.getInstance()) || - card2.getSubtype().contains(ChangelingAbility.ALL_CREATURE_TYPE)) { + if (card1.getAbilities().contains(ChangelingAbility.getInstance()) + || card1.getSubtype().contains(ChangelingAbility.ALL_CREATURE_TYPE) + || card2.getAbilities().contains(ChangelingAbility.getInstance()) + || card2.getSubtype().contains(ChangelingAbility.ALL_CREATURE_TYPE)) { return true; } } @@ -164,7 +163,7 @@ public class CardUtil { CardUtil.adjustAbilityCost((Ability) spellAbility, reduceCount); adjustAlternativeCosts(spellAbility, reduceCount); } - + public static ManaCosts increaseCost(ManaCosts manaCosts, int increaseCount) { return adjustCost(manaCosts, -increaseCount); } @@ -207,8 +206,6 @@ public class CardUtil { } } - - /** * Adjusts ability cost to be paid. * @@ -220,10 +217,10 @@ public class CardUtil { ability.getManaCostsToPay().clear(); ability.getManaCostsToPay().addAll(adjustedCost); } - + private static ManaCosts adjustCost(ManaCosts manaCosts, int reduceCount) { int restToReduce = reduceCount; - ManaCosts adjustedCost = new ManaCostsImpl<>(); + ManaCosts adjustedCost = new ManaCostsImpl<>(); boolean updated = false; for (ManaCost manaCost : manaCosts) { Mana mana = manaCost.getOptions().get(0); @@ -251,18 +248,18 @@ public class CardUtil { public static ManaCosts removeVariableManaCost(ManaCosts manaCosts) { ManaCosts adjustedCost = new ManaCostsImpl<>(); - for (ManaCost manaCost: manaCosts) { + for (ManaCost manaCost : manaCosts) { if (!(manaCost instanceof VariableManaCost)) { adjustedCost.add(manaCost); } } return adjustedCost; } - + public static void reduceCost(SpellAbility spellAbility, ManaCosts manaCostsToReduce) { adjustCost(spellAbility, manaCostsToReduce, true); } - + public static void increaseCost(SpellAbility spellAbility, ManaCosts manaCostsToIncrease) { ManaCosts increasedCost = spellAbility.getManaCostsToPay().copy(); @@ -279,19 +276,19 @@ public class CardUtil { * * @param spellAbility * @param manaCostsToReduce costs to reduce - * @param convertToGeneric colored mana does reduce generic mana if no appropriate colored mana is in the costs included + * @param convertToGeneric colored mana does reduce generic mana if no + * appropriate colored mana is in the costs included */ public static void adjustCost(SpellAbility spellAbility, ManaCosts manaCostsToReduce, boolean convertToGeneric) { ManaCosts previousCost = spellAbility.getManaCostsToPay(); - ManaCosts adjustedCost = new ManaCostsImpl<>(); + ManaCosts adjustedCost = new ManaCostsImpl<>(); // save X value (e.g. convoke ability) - for (VariableCost vCost: previousCost.getVariableCosts()) { + for (VariableCost vCost : previousCost.getVariableCosts()) { if (vCost instanceof VariableManaCost) { adjustedCost.add((VariableManaCost) vCost); } } - Mana reduceMana = new Mana(); for (ManaCost manaCost : manaCostsToReduce) { reduceMana.add(manaCost.getMana()); @@ -304,46 +301,46 @@ public class CardUtil { } if (mana.getBlack() > 0 && reduceMana.getBlack() > 0) { if (reduceMana.getBlack() > mana.getBlack()) { - reduceMana.setBlack(reduceMana.getBlack()-mana.getBlack()); + reduceMana.setBlack(reduceMana.getBlack() - mana.getBlack()); mana.setBlack(0); } else { - mana.setBlack(mana.getBlack()-reduceMana.getBlack()); + mana.setBlack(mana.getBlack() - reduceMana.getBlack()); reduceMana.setBlack(0); } } if (mana.getRed() > 0 && reduceMana.getRed() > 0) { if (reduceMana.getRed() > mana.getRed()) { - reduceMana.setRed(reduceMana.getRed()-mana.getRed()); + reduceMana.setRed(reduceMana.getRed() - mana.getRed()); mana.setRed(0); } else { - mana.setRed(mana.getRed()-reduceMana.getRed()); + mana.setRed(mana.getRed() - reduceMana.getRed()); reduceMana.setRed(0); } } if (mana.getBlue() > 0 && reduceMana.getBlue() > 0) { if (reduceMana.getBlue() > mana.getBlue()) { - reduceMana.setBlue(reduceMana.getBlue()-mana.getBlue()); + reduceMana.setBlue(reduceMana.getBlue() - mana.getBlue()); mana.setBlue(0); } else { - mana.setBlue(mana.getBlue()-reduceMana.getBlue()); + mana.setBlue(mana.getBlue() - reduceMana.getBlue()); reduceMana.setBlue(0); } } if (mana.getGreen() > 0 && reduceMana.getGreen() > 0) { if (reduceMana.getGreen() > mana.getGreen()) { - reduceMana.setGreen(reduceMana.getGreen()-mana.getGreen()); + reduceMana.setGreen(reduceMana.getGreen() - mana.getGreen()); mana.setGreen(0); } else { - mana.setGreen(mana.getGreen()-reduceMana.getGreen()); + mana.setGreen(mana.getGreen() - reduceMana.getGreen()); reduceMana.setGreen(0); } } if (mana.getWhite() > 0 && reduceMana.getWhite() > 0) { if (reduceMana.getWhite() > mana.getWhite()) { - reduceMana.setWhite(reduceMana.getWhite()-mana.getWhite()); + reduceMana.setWhite(reduceMana.getWhite() - mana.getWhite()); mana.setWhite(0); } else { - mana.setWhite(mana.getWhite()-reduceMana.getWhite()); + mana.setWhite(mana.getWhite() - reduceMana.getWhite()); reduceMana.setWhite(0); } } @@ -384,10 +381,10 @@ public class CardUtil { spellAbility.getManaCostsToPay().clear(); spellAbility.getManaCostsToPay().addAll(adjustedCost); } - /** - * Returns function that copies params\abilities from one card to {@link Token}. + * Returns function that copies params\abilities from one card to + * {@link Token}. * * @param target * @return @@ -396,7 +393,7 @@ public class CardUtil { return new CopyTokenFunction(target); } - public static boolean isPermanentCard ( Card card ) { + public static boolean isPermanentCard(Card card) { boolean permanent = false; permanent |= card.getCardType().contains(CardType.ARTIFACT); @@ -409,23 +406,24 @@ public class CardUtil { } /** - * Converts an integer number to string - * Numbers > 20 will be returned as digits + * Converts an integer number to string Numbers > 20 will be returned as + * digits * * @param number - * @return + * @return */ public static String numberToText(int number) { return numberToText(number, "one"); } - + /** * Converts an integer number to string like "one", "two", "three", ... * Numbers > 20 will be returned as digits - * + * * @param number number to convert to text - * @param forOne if the number is 1, this string will be returnedinstead of "one". - * @return + * @param forOne if the number is 1, this string will be returnedinstead of + * "one". + * @return */ public static String numberToText(int number, String forOne) { if (number == 1 && forOne != null) { @@ -458,8 +456,8 @@ public class CardUtil { } public static boolean checkNumeric(String s) { - for(int i = 0; i < s.length(); i++) { - if(!Character.isDigit(s.charAt(i))) { + for (int i = 0; i < s.length(); i++) { + if (!Character.isDigit(s.charAt(i))) { return false; } } @@ -476,7 +474,7 @@ public class CardUtil { public static UUID getCardExileZoneId(Game game, Ability source) { return getCardExileZoneId(game, source.getSourceId()); } - + public static UUID getCardExileZoneId(Game game, UUID sourceId) { return getCardExileZoneId(game, sourceId, false); } @@ -484,7 +482,7 @@ public class CardUtil { public static UUID getCardExileZoneId(Game game, UUID sourceId, boolean previous) { return getExileZoneId(getCardZoneString(SOURCE_EXILE_ZONE_TEXT, sourceId, game, previous), game); } - + public static UUID getObjectExileZoneId(Game game, MageObject mageObject) { return getObjectExileZoneId(game, mageObject, false); } @@ -499,26 +497,27 @@ public class CardUtil { if (zoneChangeCounter > 0 && previous) { zoneChangeCounter--; } - return getExileZoneId(getObjectZoneString(SOURCE_EXILE_ZONE_TEXT,mageObject.getId(), game, zoneChangeCounter, false), game); + return getExileZoneId(getObjectZoneString(SOURCE_EXILE_ZONE_TEXT, mageObject.getId(), game, zoneChangeCounter, false), game); } - + public static UUID getExileZoneId(Game game, UUID objectId, int zoneChangeCounter) { - return getExileZoneId(getObjectZoneString(SOURCE_EXILE_ZONE_TEXT,objectId, game, zoneChangeCounter, false), game); + return getExileZoneId(getObjectZoneString(SOURCE_EXILE_ZONE_TEXT, objectId, game, zoneChangeCounter, false), game); } - + public static UUID getExileZoneId(String key, Game game) { UUID exileId = (UUID) game.getState().getValue(key); if (exileId == null) { exileId = UUID.randomUUID(); game.getState().setValue(key, exileId); } - return exileId; + return exileId; } /** - * Creates a string from text + cardId and the zoneChangeCounter of the card (from cardId). - * This string can be used to save and get values that must be specific to a permanent instance. - * So they won't match, if a permanent was e.g. exiled and came back immediately. + * Creates a string from text + cardId and the zoneChangeCounter of the card + * (from cardId). This string can be used to save and get values that must + * be specific to a permanent instance. So they won't match, if a permanent + * was e.g. exiled and came back immediately. * * @param text short value to describe the value * @param cardId id of the card @@ -529,15 +528,15 @@ public class CardUtil { return getCardZoneString(text, cardId, game, false); } - public static String getCardZoneString(String text, UUID cardId, Game game, boolean previous) { - int zoneChangeCounter= 0; + public static String getCardZoneString(String text, UUID cardId, Game game, boolean previous) { + int zoneChangeCounter = 0; Card card = game.getCard(cardId); // if called for a token, the id is enough if (card != null) { zoneChangeCounter = card.getZoneChangeCounter(game); } - return getObjectZoneString(text,cardId, game, zoneChangeCounter, previous); + return getObjectZoneString(text, cardId, game, zoneChangeCounter, previous); } - + public static String getObjectZoneString(String text, MageObject mageObject, Game game) { int zoneChangeCounter = 0; if (mageObject instanceof Permanent) { @@ -547,22 +546,23 @@ public class CardUtil { } return getObjectZoneString(text, mageObject.getId(), game, zoneChangeCounter, false); } - + public static String getObjectZoneString(String text, UUID objectId, Game game, int zoneChangeCounter, boolean previous) { StringBuilder uniqueString = new StringBuilder(); if (text != null) { uniqueString.append(text); } uniqueString.append(objectId); - uniqueString.append(previous ? zoneChangeCounter - 1: zoneChangeCounter); - return uniqueString.toString(); + uniqueString.append(previous ? zoneChangeCounter - 1 : zoneChangeCounter); + return uniqueString.toString(); } - + /** - * Returns if the ability is used to check which cards - * are playable on hand. (Issue #457) + * Returns if the ability is used to check which cards are playable on hand. + * (Issue #457) + * * @param ability - ability to check - * @return + * @return */ public static boolean isCheckPlayableMode(Ability ability) { if (ability instanceof ActivatedAbility) { @@ -572,8 +572,8 @@ public class CardUtil { } /** - * Adds tags to mark the additional info of a card - * (e.g. blue font color) + * Adds tags to mark the additional info of a card (e.g. blue font color) + * * @param text text body * @return */ @@ -584,7 +584,7 @@ public class CardUtil { public static boolean convertedManaCostsIsEqual(MageObject object1, MageObject object2) { Set cmcObject1 = getCMC(object1); Set cmcObject2 = getCMC(object2); - for (Integer integer :cmcObject1) { + for (Integer integer : cmcObject1) { if (cmcObject2.contains(integer)) { return true; } @@ -595,7 +595,7 @@ public class CardUtil { public static Set getCMC(MageObject object) { Set cmcObject = new HashSet<>(); if (object instanceof Spell) { - cmcObject.add(((Spell)object).getConvertedManaCost()); + cmcObject.add(((Spell) object).getConvertedManaCost()); } else if (object instanceof Card) { Card card = (Card) object; if (card instanceof SplitCard) { @@ -605,16 +605,16 @@ public class CardUtil { } else { cmcObject.add(card.getManaCost().convertedManaCost()); } - } + } return cmcObject; } - + /** - * Gets the colors that are in the casting cost but also in the rules text + * Gets the colors that are in the casting cost but also in the rules text * as far as not included in reminder text. - * + * * @param card - * @return + * @return */ public static FilterMana getColorIdentity(Card card) { FilterMana mana = new FilterMana(); @@ -644,8 +644,17 @@ public class CardUtil { } return mana; } - + public static boolean isNonCreatureSubtype(String subtype) { return NON_CREATURE_SUBTYPES.contains(subtype); } + + public static boolean cardCanBePlayedNow(Card card, UUID playerId, Game game) { + if (card.getCardType().contains(CardType.LAND)) { + return game.canPlaySorcery(playerId) && game.getPlayer(playerId).canPlayLand(); + } else { + return card.getSpellAbility() != null && card.getSpellAbility().spellCanBeActivatedRegularlyNow(playerId, game); + } + } + } diff --git a/Utils/known-sets.txt b/Utils/known-sets.txt index 37bea9d00a..2f7739ae8c 100644 --- a/Utils/known-sets.txt +++ b/Utils/known-sets.txt @@ -39,6 +39,7 @@ Duel Decks: Phyrexia vs. the Coalition|phyrexiavsthecoalition| Duel Decks: Sorin vs. Tibalt|sorinvstibalt| Duel Decks: Speed vs. Cunning|speedvscunning| Duel Decks: Venser vs. Koth|venservskoth| +Duel Decks: Zendikar vs. Eldrazi|zendikarvseldrazi| Eighth Edition|eighthedition| Eventide|eventide| Exodus|exodus| diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 16b1a1bce1..23af435890 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -8387,7 +8387,7 @@ Havoc Demon|Legions|74|R|{5}{B}{B}|Creature - Demon|5|5|Flying$When Havoc Demon Hollow Specter|Legions|75|R|{1}{B}{B}|Creature - Specter|2|2|Flying$Whenever Hollow Specter deals combat damage to a player, you may pay {X}. If you do, that player reveals X cards from his or her hand and you choose one of them. That player discards that card.| Infernal Caretaker|Legions|76|C|{3}{B}|Creature - Human Cleric|2|2|Morph {3}{B} You may cast this card face downn as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)$When Infernal Caretaker is turned face up, return all Zombie cards from all graveyards to their owners' hands.| Noxious Ghoul|Legions|77|U|{3}{B}{B}|Creature - Zombie|3|3|Whenever Noxious Ghoul or another Zombie enters the battlefield, all non-Zombie creatures get -1/-1 until end of turn.| -Phage the Untouchable|Legions|78|R|{3}{B}{B}{B}{B}|Legendary Creature - Zombie Minion|4|4|When Phage the Untouchable enters the battlefield, if you didn't cast it from your hand, you lose the game.$Whenever Phage deals combat damage to a creature, destroy that creature. It can't be regenerated.$Whenever Phage deals combat damage to a player, that player loses the game.| +Phage the Untouchable|Legions|78|R|{3}{B}{B}{B}{B}|Legendary Creature - Avatar Minion|4|4|When Phage the Untouchable enters the battlefield, if you didn't cast it from your hand, you lose the game.$Whenever Phage deals combat damage to a creature, destroy that creature. It can't be regenerated.$Whenever Phage deals combat damage to a player, that player loses the game.| Scion of Darkness|Legions|79|R|{5}{B}{B}{B}|Creature - Avatar|6|6|Trample$Whenever Scion of Darkness deals combat damage to a player, you may put target creature card from that player's graveyard onto the battlefield under your control.$Cycling {3} ({3}, Discard this card: Draw a card.)| Daru Mender|Legions|8|U|{W}|Creature - Human Cleric|1|1|Morph {W} You may cast this card face downn as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)$When Daru Mender is turned face up, regenerate target creature.| Skinthinner|Legions|80|C|{1}{B}|Creature - Zombie|2|1|Morph {3}{B}{B} You may cast this card face downn as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)$When Skinthinner is turned face up, destroy target nonblack creature. It can't be regenerated.| @@ -11920,7 +11920,7 @@ Tidal Wave|Mirage|100|U|{2}{U}|Instant|||Put a 5/5 blue Wall creature token with Vaporous Djinn|Mirage|101|U|{2}{U}{U}|Creature - Djinn|3|4|Flying$At the beginning of your upkeep, Vaporous Djinn phases out unless you pay {U}{U}. (While it's phased out, it's treated as though it doesn't exist. It phases in before you untap during your next untap step.)| Wave Elemental|Mirage|102|U|{2}{U}{U}|Creature - Elemental|2|3|{U}, {tap}, Sacrifice Wave Elemental: Tap up to three target creatures without flying.| Afiya Grove|Mirage|103|R|{1}{G}|Enchantment|||Afiya Grove enters the battlefield with three +1/+1 counters on it.$At the beginning of your upkeep, move a +1/+1 counter from Afiya Grove onto target creature.$When Afiya Grove has no +1/+1 counters on it, sacrifice it.| -Thirst|Mirage|104|C|{2}{U}|Enchantment - Aura|||Enchant creature$When Thirst enters the battlefield, tap enchanted creature.$Enchanted creature doesn't untap during its controller's untap step.$At the beginning of your upkeep, sacrifice Thirst unless you pay {U}.| +Thirst|Mirage|99|C|{2}{U}|Enchantment - Aura|||Enchant creature$When Thirst enters the battlefield, tap enchanted creature.$Enchanted creature doesn't untap during its controller's untap step.$At the beginning of your upkeep, sacrifice Thirst unless you pay {U}.| Armor of Thorns|Mirage|104|C|{1}{G}|Enchantment - Aura|||You may cast Armor of Thorns as though it had flash. If you cast it any time a sorcery couldn't have been cast, the controller of the permanent it becomes sacrifices it at the beginning of the next cleanup step.$Enchant nonblack creature$Enchanted creature gets +2/+2.| Barbed Foliage|Mirage|105|U|{2}{G}{G}|Enchantment|||Whenever a creature attacks you, it loses flanking until end of turn.$$Whenever a creature without flying attacks you, Barbed Foliage deals 1 damage to it.| Brushwagg|Mirage|106|R|{1}{G}{G}|Creature - Brushwagg|3|2|Whenever Brushwagg blocks or becomes blocked, it gets -2/+2 until end of turn.| @@ -11929,7 +11929,7 @@ Crash of Rhinos|Mirage|108|C|{6}{G}{G}|Creature - Rhino|8|4|Trample| Cycle of Life|Mirage|109|R|{1}{G}{G}|Enchantment|||Return Cycle of Life to its owner's hand: Target creature you cast this turn becomes 0/1 until your next upkeep. At the beginning of your next upkeep, put a +1/+1 counter on that creature.| Choking Sands|Mirage|11|C|{1}{B}{B}|Sorcery|||Destroy target non-Swamp land. If that land was nonbasic, Choking Sands deals 2 damage to the land's controller.| Decomposition|Mirage|110|U|{1}{G}|Enchantment - Aura|||Enchant black creature$Enchanted creature has "Cumulative upkeep-Pay 1 life." (At the beginning of its controller's upkeep, that player puts an age counter on it, then sacrifices it unless he or she pays its upkeep cost for each age counter on it.)$When enchanted creature dies, its controller loses 2 life.| -Wellspring|Mirage|110|R|{1}{G}{W}|Enchantment - Aura|||Enchant land$When Wellspring enters the battlefield, gain control of enchanted land until end of turn.$At the beginning of your upkeep, untap enchanted land. You gain control of that land until end of turn.| +Wellspring|Mirage|348|R|{1}{G}{W}|Enchantment - Aura|||Enchant land$When Wellspring enters the battlefield, gain control of enchanted land until end of turn.$At the beginning of your upkeep, untap enchanted land. You gain control of that land until end of turn.| Early Harvest|Mirage|111|R|{1}{G}{G}|Instant|||Target player untaps all basic lands he or she controls.| Fallow Earth|Mirage|112|U|{2}{G}|Sorcery|||Put target land on top of its owner's library.| Femeref Archers|Mirage|113|U|{2}{G}|Creature - Human Archer|2|2|{tap}: Femeref Archers deals 4 damage to target attacking creature with flying.| @@ -12025,7 +12025,7 @@ Subterranean Spirit|Mirage|195|R|{3}{R}{R}|Creature - Elemental Spirit|3|3|Prote Talruum Minotaur|Mirage|196|C|{2}{R}{R}|Creature - Minotaur Berserker|3|3|Haste| Telim'Tor|Mirage|197|R|{4}{R}|Legendary Creature - Human Knight|2|2|Flanking (Whenever a creature without flanking blocks this creature, the blocking creature gets -1/-1 until end of turn.)$Whenever Telim'Tor attacks, all attacking creatures with flanking get +1/+1 until end of turn.| Telim'Tor's Edict|Mirage|198|R|{R}|Instant|||Exile target permanent you own or control.$Draw a card at the beginning of the next turn's upkeep.| -Dwarven Miner|Mirage|199|U|{1}{R}|Creature - Dwarf|1|2|{2}{R}, {tap}: Destroy target nonbasic land.| +Dwarven Miner|Mirage|169|U|{1}{R}|Creature - Dwarf|1|2|{2}{R}, {tap}: Destroy target nonbasic land.| Torrent of Lava|Mirage|199|R|{X}{R}{R}|Sorcery|||Torrent of Lava deals X damage to each creature without flying.$As long as Torrent of Lava is on the stack, each creature has "{tap}: Prevent the next 1 damage that would be dealt to this creature by Torrent of Lava this turn."| Ashen Powder|Mirage|2|R|{2}{B}{B}|Sorcery|||Put target creature card from an opponent's graveyard onto the battlefield under your control.| Feral Shadow|Mirage|20|C|{2}{B}|Creature - Nightstalker|2|1|Flying| @@ -12131,32 +12131,32 @@ Mire Shade|Mirage|29|U|{1}{B}|Creature - Shade|1|1|{B}, Sacrifice a Swamp: Put a Crystal Vein|Mirage|290|U||Land|||{tap}: Add {1} to your mana pool.${tap}, Sacrifice Crystal Vein: Add {2} to your mana pool.| Flood Plain|Mirage|291|U||Land|||Flood Plain enters the battlefield tapped.${tap}, Sacrifice Flood Plain: Search your library for a Plains or Island card and put it onto the battlefield. Then shuffle your library.| Forest|Mirage|292|L||Basic Land - Forest|||G| -Forest|Mirage|292|L||Basic Land - Forest|||G| -Forest|Mirage|292|L||Basic Land - Forest|||G| -Forest|Mirage|292|L||Basic Land - Forest|||G| +Forest|Mirage|293|L||Basic Land - Forest|||G| +Forest|Mirage|294|L||Basic Land - Forest|||G| +Forest|Mirage|295|L||Basic Land - Forest|||G| Grasslands|Mirage|296|U||Land|||Grasslands enters the battlefield tapped.${tap}, Sacrifice Grasslands: Search your library for a Forest or Plains card and put it onto the battlefield. Then shuffle your library.| Island|Mirage|297|L||Basic Land - Island|||U| -Island|Mirage|297|L||Basic Land - Island|||U| -Island|Mirage|297|L||Basic Land - Island|||U| -Island|Mirage|297|L||Basic Land - Island|||U| +Island|Mirage|298|L||Basic Land - Island|||U| +Island|Mirage|299|L||Basic Land - Island|||U| +Island|Mirage|300|L||Basic Land - Island|||U| Barbed-Back Wurm|Mirage|3|U|{4}{B}|Creature - Wurm|4|3|{B}: Target green creature blocking Barbed-Back Wurm gets -1/-1 until end of turn.| Nocturnal Raid|Mirage|30|U|{2}{B}{B}|Instant|||Black creatures get +2/+0 until end of turn.| -Shimmer|Mirage|30|R|{2}{U}{U}|Enchantment|||As Shimmer enters the battlefield, choose a land type.$Each land of the chosen type has phasing. (It phases in or out before its controller untaps during each of his or her untap steps. While it's phased out, it's treated as though it doesn't exist.)| -Mountain|Mirage|301|L||Basic Land - Mountain|||R| -Mountain|Mirage|301|L||Basic Land - Mountain|||R| -Mountain|Mirage|301|L||Basic Land - Mountain|||R| +Shimmer|Mirage|92|R|{2}{U}{U}|Enchantment|||As Shimmer enters the battlefield, choose a land type.$Each land of the chosen type has phasing. (It phases in or out before its controller untaps during each of his or her untap steps. While it's phased out, it's treated as though it doesn't exist.)| Mountain|Mirage|301|L||Basic Land - Mountain|||R| +Mountain|Mirage|302|L||Basic Land - Mountain|||R| +Mountain|Mirage|303|L||Basic Land - Mountain|||R| +Mountain|Mirage|304|L||Basic Land - Mountain|||R| Mountain Valley|Mirage|305|U||Land|||Mountain Valley enters the battlefield tapped.${tap}, Sacrifice Mountain Valley: Search your library for a Mountain or Forest card and put it onto the battlefield. Then shuffle your library.| Plains|Mirage|306|L||Basic Land - Plains|||W| -Plains|Mirage|306|L||Basic Land - Plains|||W| -Plains|Mirage|306|L||Basic Land - Plains|||W| -Plains|Mirage|306|L||Basic Land - Plains|||W| +Plains|Mirage|307|L||Basic Land - Plains|||W| +Plains|Mirage|308|L||Basic Land - Plains|||W| +Plains|Mirage|309|L||Basic Land - Plains|||W| Painful Memories|Mirage|31|U|{1}{B}|Sorcery|||Look at target opponent's hand and choose a card from it. Put that card on top of that player's library.| Rocky Tar Pit|Mirage|310|U||Land|||Rocky Tar Pit enters the battlefield tapped.${tap}, Sacrifice Rocky Tar Pit: Search your library for a Swamp or Mountain card and put it onto the battlefield. Then shuffle your library.| Swamp|Mirage|311|L||Basic Land - Swamp|||B| -Swamp|Mirage|311|L||Basic Land - Swamp|||B| -Swamp|Mirage|311|L||Basic Land - Swamp|||B| -Swamp|Mirage|311|L||Basic Land - Swamp|||B| +Swamp|Mirage|312|L||Basic Land - Swamp|||B| +Swamp|Mirage|313|L||Basic Land - Swamp|||B| +Swamp|Mirage|314|L||Basic Land - Swamp|||B| Teferi's Isle|Mirage|315|R||Legendary Land|||Phasing (This phases in or out before you untap during each of your untap steps. While it's phased out, it's treated as though it doesn't exist.)$Teferi's Isle enters the battlefield tapped.${tap}: Add {U}{U} to your mana pool.| Asmira, Holy Avenger|Mirage|316|R|{2}{G}{W}|Legendary Creature - Human Cleric|2|3|Flying$At the beginning of each end step, put a +1/+1 counter on Asmira, Holy Avenger for each creature put into your graveyard from the battlefield this turn.| Benthic Djinn|Mirage|317|R|{2}{U}{B}|Creature - Djinn|5|3|Islandwalk$$At the beginning of your upkeep, you lose 2 life.| @@ -12260,7 +12260,7 @@ Sea Scryer|Mirage|90|C|{1}{U}|Creature - Merfolk Wizard|1|1|{tap}: Add {1} to yo Shaper Guildmage|Mirage|91|C|{U}|Creature - Human Wizard|1|1|{W}, {tap}: Target creature gains first strike until end of turn.${B}, {tap}: Target creature gets +1/+0 until end of turn.| Soar|Mirage|93|C|{1}{U}|Enchantment - Aura|||You may cast Soar as though it had flash. If you cast it any time a sorcery couldn't have been cast, the controller of the permanent it becomes sacrifices it at the beginning of the next cleanup step.$Enchant creature$Enchanted creature gets +0/+1 and has flying.| Suq'Ata Firewalker|Mirage|94|U|{1}{U}{U}|Creature - Human Wizard|0|1|Suq'Ata Firewalker can't be the target of red spells or abilities from red sources.${tap}: Suq'Ata Firewalker deals 1 damage to target creature or player.| -Taniwha|Mirage|95|R|{3}{U}|Legendary Creature - Serpent|7|7|Trample$Phasing (This phases in or out before you untap during each of your untap steps. While it's phased out, it's treated as though it doesn't exist.)$At the beginning of your upkeep, all lands you control phase out. (They phase in before you untap during your next untap step.)| +Taniwha|Mirage|95|R|{3}{U}{U}|Legendary Creature - Serpent|7|7|Trample$Phasing (This phases in or out before you untap during each of your untap steps. While it's phased out, it's treated as though it doesn't exist.)$At the beginning of your upkeep, all lands you control phase out. (They phase in before you untap during your next untap step.)| Teferi's Curse|Mirage|96|C|{1}{U}|Enchantment - Aura|||Enchant artifact or creature$Enchanted permanent has phasing. (It phases in or out before its controller untaps during each of his or her untap steps. While it's phased out, it's treated as though it doesn't exist.)| Teferi's Drake|Mirage|97|C|{2}{U}|Creature - Drake|3|2|Flying$Phasing (This phases in or out before you untap during each of your untap steps. While it's phased out, it's treated as though it doesn't exist.)| Teferi's Imp|Mirage|98|R|{2}{U}|Creature - Imp|1|1|Flying$Phasing (This phases in or out before you untap during each of your untap steps. While it's phased out, it's treated as though it doesn't exist.)$Whenever Teferi's Imp phases out, discard a card.$Whenever Teferi's Imp phases in, draw a card.| @@ -18843,7 +18843,7 @@ Nantuko Husk|Tenth Edition|162|U|{2}{B}|Creature - Zombie Insect|2|2|Sacrifice a Nekrataal|Tenth Edition|163|U|{2}{B}{B}|Creature - Human Assassin|2|1|First strike (This creature deals combat damage before creatures without first strike.)$When Nekrataal enters the battlefield, destroy target nonartifact, nonblack creature. That creature can't be regenerated.| Nightmare|Tenth Edition|164|R|{5}{B}|Creature - Nightmare Horse|*|*|Flying$Nightmare's power and toughness are each equal to the number of Swamps you control.| No Rest for the Wicked|Tenth Edition|165|U|{1}{B}|Enchantment|||Sacrifice No Rest for the Wicked: Return to your hand all creature cards in your graveyard that were put there from the battlefield this turn.| -Phage the Untouchable|Tenth Edition|166|R|{3}{B}{B}{B}{B}|Legendary Creature - Zombie Minion|4|4|When Phage the Untouchable enters the battlefield, if you didn't cast it from your hand, you lose the game.$Whenever Phage deals combat damage to a creature, destroy that creature. It can't be regenerated.$Whenever Phage deals combat damage to a player, that player loses the game.| +Phage the Untouchable|Tenth Edition|166|R|{3}{B}{B}{B}{B}|Legendary Creature - Avatar Minion|4|4|When Phage the Untouchable enters the battlefield, if you didn't cast it from your hand, you lose the game.$Whenever Phage deals combat damage to a creature, destroy that creature. It can't be regenerated.$Whenever Phage deals combat damage to a player, that player loses the game.| Phyrexian Rager|Tenth Edition|167|C|{2}{B}|Creature - Horror|2|2|When Phyrexian Rager enters the battlefield, you draw a card and you lose 1 life.| Plague Beetle|Tenth Edition|168|C|{B}|Creature - Insect|1|1|Swampwalk (This creature is unblockable as long as defending player controls a Swamp.)| Plague Wind|Tenth Edition|169|R|{7}{B}{B}|Sorcery|||Destroy all creatures you don't control. They can't be regenerated.| @@ -27248,5 +27248,85 @@ Lightning Angel|From the Vault: Angels|12|M|{1}{R}{W}{U}|Creature - Angel|3|4|Fl Platinum Angel|From the Vault: Angels|13|M|{7}|Artifact Creature - Angel|4|4|Flying$You can't lose the game and your opponents can't win the game.| Serra Angel|From the Vault: Angels|14|M|{3}{W}{W}|Creature - Angel|4|4|Flying$Vigilance (Attacking doesn't cause this creature to tap.)| Tariel, Reckoner of Souls|From the Vault: Angels|15|M|{4}{W}{B}{R}|Legendary Creature - Angel|4|7|Flying, vigilance${tap}: Choose a creature card at random from target opponent's graveyard. Put that card onto the battlefield under your control.| +Avenger of Zendikar|Duel Decks: Zendikar vs. Eldrazi|1|M|{5}{G}{G}|Creature - Elemental|5|5|When Avenger of Zendikar enters the battlefield, put a 0/1 green Plant creature token onto the battlefield for each land you control.$Landfall - Whenever a land enters the battlefield under your control, you may put a +1/+1 counter on each Plant creature you control.| +Affa Guard Hound|Duel Decks: Zendikar vs. Eldrazi|2|U|{2}{W}|Creature - Hound|2|2|Flash$When Affa Guard Hound enters the battlefield, target creature gets +0/+3 until end of turn.| +Caravan Escort|Duel Decks: Zendikar vs. Eldrazi|3|C|{W}|Creature - Human Knight|1|1|Level up {2} ({2}: Put a level counter on this. Level up only as a sorcery.)$LEVEL 1-4$2/2$$LEVEL 5+$5/5$First strike| +Kabira Vindicator|Duel Decks: Zendikar vs. Eldrazi|4|U|{3}{W}|Creature - Human Knight|2|4|Level up {2}{W} ({2}{W}: Put a level counter on this. Level up only as a sorcery.)$LEVEL 2-4$3/6$Other creatures you control get +1/+1.$LEVEL 5+$4/8$Other creatures you control get +2/+2.| +Knight of Cliffhaven|Duel Decks: Zendikar vs. Eldrazi|5|C|{1}{W}|Creature - Kor Knight|2|2|Level up {3} ({3}: Put a level counter on this. Level up only as a sorcery.)$LEVEL 1-3$2/3$Flying$LEVEL 4+$4/4$Flying, vigilance| +Makindi Griffin|Duel Decks: Zendikar vs. Eldrazi|6|C|{3}{W}|Creature - Griffin|2|4|Flying| +Oust|Duel Decks: Zendikar vs. Eldrazi|7|U|{W}|Sorcery|||Put target creature into its owner's library second from the top. Its controller gains 3 life.| +Repel the Darkness|Duel Decks: Zendikar vs. Eldrazi|8|C|{2}{W}|Instant|||Tap up to two target creatures.$Draw a card.| +Sheer Drop|Duel Decks: Zendikar vs. Eldrazi|9|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.)| +Beastbreaker of Bala Ged|Duel Decks: Zendikar vs. Eldrazi|10|U|{1}{G}|Creature - Human Warrior|2|2|Level up {2}{G} ({2}{G}: Put a level counter on this. Level up only as a sorcery.)$LEVEL 1-3$4/4$$LEVEL 4+$6/6$Trample| +Daggerback Basilisk|Duel Decks: Zendikar vs. Eldrazi|11|C|{2}{G}|Creature - Basilisk|2|2|Deathtouch| +Frontier Guide|Duel Decks: Zendikar vs. Eldrazi|12|U|{1}{G}|Creature - Elf Scout|1|1|{3}{G}, {tap}: Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library.| +Graypelt Hunter|Duel Decks: Zendikar vs. Eldrazi|13|C|{3}{G}|Creature - Human Warrior Ally|2|2|Trample$Whenever Graypelt Hunter or another Ally enters the battlefield under your control, you may put a +1/+1 counter on Graypelt Hunter.| +Grazing Gladehart|Duel Decks: Zendikar vs. Eldrazi|14|C|{2}{G}|Creature - Antelope|2|2|Landfall — Whenever a land enters the battlefield under your control, you may gain 2 life.| +Groundswell|Duel Decks: Zendikar vs. Eldrazi|15|C|{G}|Instant|||Target creature gets +2/+2 until end of turn.$Landfall - If you had a land enter the battlefield under your control this turn, that creature gets +4/+4 until end of turn instead.| +Harrow|Duel Decks: Zendikar vs. Eldrazi|16|C|{2}{G}|Instant|||As an additional cost to cast Harrow, sacrifice a land.$Search your library for up to two basic land cards and put them onto the battlefield. Then shuffle your library.| +Joraga Bard|Duel Decks: Zendikar vs. Eldrazi|17|C|{3}{G}|Creature - Elf Rogue Ally|1|4|Whenever Joraga Bard or another Ally enters the battlefield under your control, you may have Ally creatures you control gain vigilance until end of turn.| +Khalni Heart Expedition|Duel Decks: Zendikar vs. Eldrazi|18|C|{1}{G}|Enchantment|||Landfall - Whenever a land enters the battlefield under your control, you may put a quest counter on Khalni Heart Expedition.$Remove three quest counters from Khalni Heart Expedition and sacrifice it: Search your library for up to two basic land cards, put them onto the battlefield tapped, then shuffle your library.| +Ondu Giant|Duel Decks: Zendikar vs. Eldrazi|19|C|{3}{G}|Creature - Giant Druid|2|4|When Ondu Giant enters the battlefield, you may search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library.| +Primal Command|Duel Decks: Zendikar vs. Eldrazi|20|R|{3}{G}{G}|Sorcery|||Choose two - Target player gains 7 life; or put target noncreature permanent on top of its owner's library; or target player shuffles his or her graveyard into his or her library; or search your library for a creature card, reveal it, put it into your hand, then shuffle your library.| +Retreat to Kazandu|Duel Decks: Zendikar vs. Eldrazi|21|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.| +Scute Mob|Duel Decks: Zendikar vs. Eldrazi|22|R|{G}|Creature - Insect|1|1|At the beginning of your upkeep, if you control five or more lands, put four +1/+1 counters on Scute Mob.| +Tajuru Archer|Duel Decks: Zendikar vs. Eldrazi|23|U|{2}{G}|Creature - Elf Archer Ally|1|2|Whenever Tajuru Archer or another Ally enters the battlefield under your control, you may have Tajuru Archer deal damage to target creature with flying equal to the number of Allies you control.| +Territorial Baloth|Duel Decks: Zendikar vs. Eldrazi|24|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.| +Turntimber Basilisk|Duel Decks: Zendikar vs. Eldrazi|25|U|{1}{G}{G}|Creature - Basilisk|2|1|Deathtouch (Any amount of damage this deals to a creature is enough to destroy it.)$Landfall - Whenever a land enters the battlefield under your control, you may have target creature block Turntimber Basilisk this turn if able.| +Wildheart Invoker|Duel Decks: Zendikar vs. Eldrazi|26|C|{2}{G}{G}|Creature - Elf Shaman|4|3|{8}: Target creature gets +5/+5 and gains trample until end of turn.| +Veteran Warleader|Duel Decks: Zendikar vs. Eldrazi|27|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.| +Explorer's Scope|Duel Decks: Zendikar vs. Eldrazi|28|U|{1}|Artifact - Equipment|||Whenever equipped creature attacks, look at the top card of your library. If it's a land card, you may put it onto the battlefield tapped.$Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.)| +Seer's Sundial|Duel Decks: Zendikar vs. Eldrazi|29|R|{4}|Artifact|||Landfall - Whenever a land enters the battlefield under your control, you may pay {2}. If you do, draw a card.| +Stonework Puma|Duel Decks: Zendikar vs. Eldrazi|30|C|{3}|Artifact Creature - Cat Ally|2|2|| +Evolving Wilds|Duel Decks: Zendikar vs. Eldrazi|31|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.| +Graypelt Refuge|Duel Decks: Zendikar vs. Eldrazi|32|U||Land|||Graypelt Refuge enters the battlefield tapped.$When Graypelt Refuge enters the battlefield, you gain 1 life.${tap}: Add {G} or {W} to your mana pool.| +Stirring Wildwood|Duel Decks: Zendikar vs. Eldrazi|33|R||Land|||Stirring Wildwood enters the battlefield tapped.${tap}: Add {G} or {W} to your mana pool.${1}{G}{W}: Until end of turn, Stirring Wildwood becomes a 3/4 green and white Elemental creature with reach. It's still a land.| +Turntimber Grove|Duel Decks: Zendikar vs. Eldrazi|34|C||Land|||Turntimber Grove enters the battlefield tapped.$When Turntimber Grove enters the battlefield, target creature gets +1/+1 until end of turn.${tap}: Add {G} to your mana pool.| +Plains|Duel Decks: Zendikar vs. Eldrazi|35|L||Basic Land - Plains|||W| +Plains|Duel Decks: Zendikar vs. Eldrazi|36|L||Basic Land - Plains|||W| +Plains|Duel Decks: Zendikar vs. Eldrazi|37|L||Basic Land - Plains|||W| +Forest|Duel Decks: Zendikar vs. Eldrazi|38|L||Basic Land - Forest|||G| +Forest|Duel Decks: Zendikar vs. Eldrazi|39|L||Basic Land - Forest|||G| +Forest|Duel Decks: Zendikar vs. Eldrazi|40|L||Basic Land - Forest|||G| +Oblivion Sower|Duel Decks: Zendikar vs. Eldrazi|41|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.| +Artisan of Kozilek|Duel Decks: Zendikar vs. Eldrazi|42|U|{9}|Creature - Eldrazi|10|9|When you cast Artisan of Kozilek, you may return target creature card from your graveyard to the battlefield.$Annihilator 2 (Whenever this creature attacks, defending player sacrifices two permanents.)| +It That Betrays|Duel Decks: Zendikar vs. Eldrazi|43|R|{12}|Creature - Eldrazi|11|11|Annihilator 2 (Whenever this creature attacks, defending player sacrifices two permanents.)$Whenever an opponent sacrifices a nontoken permanent, put that card onto the battlefield under your control.| +Ulamog's Crusher|Duel Decks: Zendikar vs. Eldrazi|44|C|{8}|Creature - Eldrazi|8|8|Annihilator 2 (Whenever this creature attacks, defending player sacrifices two permanents.)$Ulamog's Crusher attacks each turn if able.| +Bloodrite Invoker|Duel Decks: Zendikar vs. Eldrazi|45|C|{2}{B}|Creature - Vampire Shaman|3|1|{8}: Target player loses 3 life and you gain 3 life.| +Bloodthrone Vampire|Duel Decks: Zendikar vs. Eldrazi|46|C|{1}{B}|Creature - Vampire|1|1|Sacrifice a creature: Bloodthrone Vampire gets +2/+2 until end of turn.| +Butcher of Malakir|Duel Decks: Zendikar vs. Eldrazi|47|R|{5}{B}{B}|Creature - Vampire Warrior|5|4|Flying$Whenever Butcher of Malakir or another creature you control dies, each opponent sacrifices a creature.| +Cadaver Imp|Duel Decks: Zendikar vs. Eldrazi|48|C|{1}{B}{B}|Creature - Imp|1|1|Flying$When Cadaver Imp enters the battlefield, you may return target creature card from your graveyard to your hand.| +Consume the Meek|Duel Decks: Zendikar vs. Eldrazi|49|R|{3}{B}{B}|Instant|||Destroy each creature with converted mana cost 3 or less. They can't be regenerated.| +Corpsehatch|Duel Decks: Zendikar vs. Eldrazi|50|U|{3}{B}{B}|Sorcery|||Destroy target nonblack creature. Put two 0/1 colorless Eldrazi Spawn creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool."| +Dominator Drone|Duel Decks: Zendikar vs. Eldrazi|51|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.| +Heartstabber Mosquito|Duel Decks: Zendikar vs. Eldrazi|52|C|{3}{B}|Creature - Insect|2|2|Kicker {2}{B} (You may pay an additional {2}{B} as you cast this spell.)$Flying$When Heartstabber Mosquito enters the battlefield, if it was kicked, destroy target creature.| +Induce Despair|Duel Decks: Zendikar vs. Eldrazi|53|C|{2}{B}|Instant|||As an additional cost to cast Induce Despair, reveal a creature card from your hand.$Target creature gets -X/-X until end of turn, where X is the revealed card's converted mana cost.| +Marsh Casualties|Duel Decks: Zendikar vs. Eldrazi|54|U|{B}{B}|Sorcery|||Kicker {3} (You may pay an additional {3} as you cast this spell.)$Creatures target player controls get -1/-1 until end of turn. If Marsh Casualties was kicked, those creatures get -2/-2 until end of turn instead.| +Pawn of Ulamog|Duel Decks: Zendikar vs. Eldrazi|55|U|{1}{B}{B}|Creature - Vampire Shaman|2|2|Whenever Pawn of Ulamog or another nontoken creature you control dies, you may put a 0/1 colorless Eldrazi Spawn creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool."| +Read the Bones|Duel Decks: Zendikar vs. Eldrazi|56|C|{2}{B}|Sorcery|||Scry 2, then draw 2 cards. You lose 2 life. (To scry 2, look at the top 2 cards of your library, then put any number of them on the bottom of your library and the rest on top in any order.)| +Smother|Duel Decks: Zendikar vs. Eldrazi|57|U|{1}{B}|Instant|||Destroy target creature with converted mana cost 3 or less. It can't be regenerated.| +Vampire Nighthawk|Duel Decks: Zendikar vs. Eldrazi|58|U|{1}{B}{B}|Creature - Vampire Shaman|2|3|Flying$Deathtouch (Any amount of damage this deals to a creature is enough to destroy it.)$Lifelink (Damage dealt by this creature also causes you to gain that much life.)| +Emrakul's Hatcher|Duel Decks: Zendikar vs. Eldrazi|59|C|{4}{R}|Creature - Eldrazi Drone|3|3|When Emrakul's Hatcher enters the battlefield, put three 0/1 colorless Eldrazi Spawn creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool."| +Forked Bolt|Duel Decks: Zendikar vs. Eldrazi|60|U|{R}|Sorcery|||Forked Bolt deals 2 damage divided as you choose among one or two target creatures and/or players.| +Hellion Eruption|Duel Decks: Zendikar vs. Eldrazi|61|R|{5}{R}|Sorcery|||Sacrifice all creatures you control, then put that many 4/4 red Hellion creature tokens onto the battlefield.| +Magmaw|Duel Decks: Zendikar vs. Eldrazi|62|R|{3}{R}{R}|Creature - Elemental|4|4|{1}, Sacrifice a nonland permanent: Magmaw deals 1 damage to target creature or player.| +Torch Slinger|Duel Decks: Zendikar vs. Eldrazi|63|C|{2}{R}|Creature - Goblin Shaman|2|2|Kicker {1}{R} (You may pay an additional {1}{R} as you cast this spell.)$When Torch Slinger enters the battlefield, if it was kicked, it deals 2 damage to target creature.| +Forerunner of Slaughter|Duel Decks: Zendikar vs. Eldrazi|64|U|{B}{R}|Creature - Eldrazi Drone|3|2|Devoid (This card has no color.)${1}: Target colorless creature gains haste until end of turn.| +Mind Stone|Duel Decks: Zendikar vs. Eldrazi|65|U|{2}|Artifact|||{tap}: Add {1} to your mana pool.${1}, {tap}, Sacrifice Mind Stone: Draw a card.| +Runed Servitor|Duel Decks: Zendikar vs. Eldrazi|66|U|{2}|Artifact Creature - Construct|2|2|When Runed Servitor dies, each player draws a card.| +Akoum Refuge|Duel Decks: Zendikar vs. Eldrazi|67|U||Land|||Akoum Refuge enters the battlefield tapped.$When Akoum Refuge enters the battlefield, you gain 1 life.${tap}: Add {B} or {R} to your mana pool.| +Eldrazi Temple|Duel Decks: Zendikar vs. Eldrazi|68|U||Land|||{tap}: Add {1} to your mana pool.${tap}: Add {2} to your mana pool. Spend this mana only to cast colorless Eldrazi spells or activate abilities of colorless Eldrazi.| +Rocky Tar Pit|Duel Decks: Zendikar vs. Eldrazi|69|U||Land|||Rocky Tar Pit enters the battlefield tapped.${tap}, Sacrifice Rocky Tar Pit: Search your library for a Swamp or Mountain card and put it onto the battlefield. Then shuffle your library.| +Swamp|Duel Decks: Zendikar vs. Eldrazi|70|L||Basic Land - Swamp|||B| +Swamp|Duel Decks: Zendikar vs. Eldrazi|71|L||Basic Land - Swamp|||B| +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| +Sheer Drop|Battle for Zendikar|999|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.)| +Dominator Drone|Battle for Zendikar|999|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.| +Retreat to Kazandu|Battle for Zendikar|999||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.| +Forerunner of Slaughter|Battle for Zendikar|999|U|{B}{R}|Creature - Eldrazi Drone|3|2|Devoid (This card has no color.)${1}: Target colorless creature gains haste until end of turn.| +Veteran Warleader|Battle for Zendikar|999|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.| Oblivion Sower|Battle for Zendikar|999|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.| 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.| \ No newline at end of file diff --git a/Utils/mtg-sets-data.txt b/Utils/mtg-sets-data.txt index 090a2e7221..cec0f4dfbf 100644 --- a/Utils/mtg-sets-data.txt +++ b/Utils/mtg-sets-data.txt @@ -53,6 +53,7 @@ Duel Decks: Phyrexia vs. the Coalition|DDE| Duel Decks: Sorin vs. Tibalt|DDK| Duel Decks: Speed vs. Cunning|DDN| Duel Decks: Venser vs. Koth|DDI| +Duel Decks: Zendikar vs. Eldrazi|DDP| Eventide|EVE| Exodus|EXO| Fallen Empires|FEM| diff --git a/Utils/release/getting_implemented_cards.txt b/Utils/release/getting_implemented_cards.txt index 02ecd0925f..95d40c590e 100644 --- a/Utils/release/getting_implemented_cards.txt +++ b/Utils/release/getting_implemented_cards.txt @@ -164,6 +164,9 @@ git log 8dca887fadbbea41fb649ff17c5fe547a82ef23a..HEAD --diff-filter=A --name-st since 1.4.3.v0 git log 5de4637d9c7967612c207d3cf915c2861d922029..HEAD --diff-filter=A --name-status | sed -ne "s/^A[^u]Mage.Sets\/src\/mage\/sets\///p" | sort > added_cards.txt +since 1.4.3.v2 +git log 6d8378d5e49629a2fa126baf84340156a28f25db..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: > perl extract_in_wiki_format.perl