diff --git a/Mage.Client/pom.xml b/Mage.Client/pom.xml
index 3f17fd20503..fcb232ef040 100644
--- a/Mage.Client/pom.xml
+++ b/Mage.Client/pom.xml
@@ -6,7 +6,7 @@
org.mage
mage-root
- 1.4.22
+ 1.4.23
org.mage
diff --git a/Mage.Client/src/main/java/mage/client/MageFrame.java b/Mage.Client/src/main/java/mage/client/MageFrame.java
index 18f1713533c..3d6d685e4cb 100644
--- a/Mage.Client/src/main/java/mage/client/MageFrame.java
+++ b/Mage.Client/src/main/java/mage/client/MageFrame.java
@@ -27,6 +27,21 @@
*/
package mage.client;
+import java.awt.*;
+import java.awt.event.*;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.*;
+import java.util.List;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+import java.util.prefs.Preferences;
+import javax.imageio.ImageIO;
+import javax.swing.*;
+import javax.swing.event.PopupMenuEvent;
+import javax.swing.event.PopupMenuListener;
import mage.cards.decks.Deck;
import mage.cards.repository.CardCriteria;
import mage.cards.repository.CardInfo;
@@ -77,22 +92,6 @@ import org.mage.plugins.card.images.DownloadPictures;
import org.mage.plugins.card.info.CardInfoPaneImpl;
import org.mage.plugins.card.utils.impl.ImageManagerImpl;
-import javax.imageio.ImageIO;
-import javax.swing.*;
-import javax.swing.event.PopupMenuEvent;
-import javax.swing.event.PopupMenuListener;
-import java.awt.*;
-import java.awt.event.*;
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import java.util.List;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
-import java.util.prefs.Preferences;
-
/**
* @author BetaSteward_at_googlemail.com
*/
@@ -1056,7 +1055,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
// use already open editor
Component[] windows = desktopPane.getComponentsInLayer(JLayeredPane.DEFAULT_LAYER);
for (Component window : windows) {
- if (window instanceof DeckEditorPane && ((MagePane)window).getTitle().equals(name)) {
+ if (window instanceof DeckEditorPane && ((MagePane) window).getTitle().equals(name)) {
setActive((MagePane) window);
return;
}
diff --git a/Mage.Client/src/main/java/mage/client/dialog/ConnectDialog.java b/Mage.Client/src/main/java/mage/client/dialog/ConnectDialog.java
index aecb45d15f6..b9ac1834ec1 100644
--- a/Mage.Client/src/main/java/mage/client/dialog/ConnectDialog.java
+++ b/Mage.Client/src/main/java/mage/client/dialog/ConnectDialog.java
@@ -45,6 +45,7 @@ import java.io.InputStreamReader;
import java.io.Writer;
import java.net.InetSocketAddress;
import java.net.Proxy;
+import java.net.SocketException;
import java.net.SocketTimeoutException;
import java.net.URL;
import java.net.UnknownHostException;
@@ -391,7 +392,12 @@ public class ConnectDialog extends MageDialog {
connection.setUsername(this.txtUserName.getText().trim());
connection.setPassword(this.txtPassword.getText().trim());
connection.setForceDBComparison(this.chkForceUpdateDB.isSelected());
- connection.setUserIdStr(System.getProperty("user.name") + ':' + MagePreferences.getUserNames());
+ String allMAC = "";
+ try {
+ allMAC = connection.getMAC();
+ } catch (SocketException ex) {
+ }
+ connection.setUserIdStr(System.getProperty("user.name") + ":" + System.getProperty("os.name") + ":" + MagePreferences.getUserNames() + ":" + allMAC);
MageFrame.getPreferences().put(KEY_CONNECT_FLAG, ((CountryItemEditor) cbFlag.getEditor()).getImageItem());
PreferencesDialog.setProxyInformation(connection);
diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MythicspoilerComSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MythicspoilerComSource.java
index 23b9180d414..47661ee8d41 100644
--- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MythicspoilerComSource.java
+++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MythicspoilerComSource.java
@@ -86,13 +86,14 @@ public class MythicspoilerComSource implements CardImageSource {
cardNameAliases.put("THS-soldierofpantheon", "soldierofthepantheon");
cardNameAliases.put("THS-vulpinegolaith", "vulpinegoliath");
cardNameAliases.put("ORI-kothopedhoarderofsouls", "kothophedsoulhoarder");
- cardNameAliases.put("BFZ-unisonstrike", "tandemtactics");
- cardNameAliases.put("BFZ-eldrazidevastator", "eldrazidevastator");
cardNameAliases.put("BFZ-kozliekschanneler", "kozilekschanneler");
cardNameAliases.put("OGW-wastes", "wastes1");
cardNameAliases.put("OGW-wastes2", "wastes2");
- cardNameAliases.put("AER-locketofmyths", "lifecraftersbestiary");
cardNameAliases.put("AER-aegisautomation", "aegisautomaton");
+ cardNameAliases.put("AKH-illusorywrappins", "illusorywrappings");
+ cardNameAliases.put("AKH-reducerumble", "reducerubble");
+ cardNameAliases.put("AKH-forsakethewordly", "forsaketheworldly");
+ cardNameAliases.put("AKH-kefnatsmonument", "kefnetsmonument");
cardNameAliasesStart = new HashMap<>();
HashSet names = new HashSet<>();
@@ -182,14 +183,9 @@ public class MythicspoilerComSource implements CardImageSource {
if (cardNameAliases.containsKey(cardSet + '-' + cardName)) {
cardName = cardNameAliases.get(cardSet + '-' + cardName);
} else if (cardName.endsWith("1") || cardName.endsWith("2") || cardName.endsWith("3") || cardName.endsWith("4") || cardName.endsWith("5")) {
- if (!cardName.startsWith("forest")
- && !cardName.startsWith("swamp")
- && !cardName.startsWith("mountain")
- && !cardName.startsWith("island")
- && !cardName.startsWith("plains")) {
-
- cardName = cardName.substring(0, cardName.length() - 1);
- }
+ cardName = cardName.substring(0, cardName.length() - 1);
+ } else if (cardName.endsWith("promo")) {
+ cardName = cardName.substring(0, cardName.length() - 5);
}
pageLinks.put(cardName, baseUrl + cardLink);
}
@@ -213,7 +209,8 @@ public class MythicspoilerComSource implements CardImageSource {
.replaceAll(" ", "")
.replaceAll("-", "")
.replaceAll("'", "")
- .replaceAll(",", "");
+ .replaceAll(",", "")
+ .replaceAll("/", "");
String link = setLinks.get(searchName);
return link;
}
diff --git a/Mage.Common/pom.xml b/Mage.Common/pom.xml
index d7a8a3623be..6a63908dcd0 100644
--- a/Mage.Common/pom.xml
+++ b/Mage.Common/pom.xml
@@ -7,7 +7,7 @@
org.mage
mage-root
- 1.4.22
+ 1.4.23
mage-common
diff --git a/Mage.Common/src/mage/remote/Connection.java b/Mage.Common/src/mage/remote/Connection.java
index a5cac723360..cfd27d18121 100644
--- a/Mage.Common/src/mage/remote/Connection.java
+++ b/Mage.Common/src/mage/remote/Connection.java
@@ -56,6 +56,7 @@ public class Connection {
private int clientCardDatabaseVersion;
private boolean forceDBComparison;
private String userIdStr;
+ private int socketWriteTimeout;
private UserData userData;
@@ -76,6 +77,7 @@ public class Connection {
public Connection(String parameter) {
this.parameter = parameter;
+ socketWriteTimeout = 10000;
}
@Override
@@ -258,6 +260,24 @@ public class Connection {
return null;
}
+ public static String getMAC() throws SocketException {
+ StringBuilder allMACs = new StringBuilder();
+ for (Enumeration interfaces = NetworkInterface.getNetworkInterfaces(); interfaces.hasMoreElements();) {
+ NetworkInterface iface = interfaces.nextElement();
+ byte[] mac = iface.getHardwareAddress();
+
+ if (mac != null) {
+ StringBuilder sb = new StringBuilder();
+ for (int i = 0; i < mac.length; i++) {
+ sb.append(String.format("%02X%s", mac[i], (i < mac.length - 1) ? "-" : ""));
+ }
+ sb.append(';');
+ allMACs.append(sb.toString());
+ }
+ }
+ return allMACs.toString();
+ }
+
public void setUserData(UserData userData) {
this.userData = userData;
}
@@ -273,4 +293,8 @@ public class Connection {
public void setForceDBComparison(boolean forceDBComparison) {
this.forceDBComparison = forceDBComparison;
}
+
+ public int getSocketWriteTimeout() {
+ return socketWriteTimeout;
+ }
}
diff --git a/Mage.Common/src/mage/remote/SessionImpl.java b/Mage.Common/src/mage/remote/SessionImpl.java
index b2c46a93963..90e68afb91c 100644
--- a/Mage.Common/src/mage/remote/SessionImpl.java
+++ b/Mage.Common/src/mage/remote/SessionImpl.java
@@ -27,6 +27,12 @@
*/
package mage.remote;
+import java.io.IOException;
+import java.lang.reflect.UndeclaredThrowableException;
+import java.net.*;
+import java.util.*;
+import java.util.concurrent.TimeUnit;
+import javax.swing.*;
import mage.MageException;
import mage.cards.decks.DeckCardLists;
import mage.cards.decks.InvalidDeckException;
@@ -56,13 +62,6 @@ import org.jboss.remoting.transport.bisocket.Bisocket;
import org.jboss.remoting.transport.socket.SocketWrapper;
import org.jboss.remoting.transporter.TransporterClient;
-import javax.swing.*;
-import java.io.IOException;
-import java.lang.reflect.UndeclaredThrowableException;
-import java.net.*;
-import java.util.*;
-import java.util.concurrent.TimeUnit;
-
/**
* @author BetaSteward_at_googlemail.com
*/
@@ -220,34 +219,35 @@ public class SessionImpl implements Session {
public synchronized boolean connect(final Connection connection) {
return establishJBossRemotingConnection(connection)
&& handleRemotingTaskExceptions(new RemotingTask() {
- @Override
- public boolean run() throws Throwable {
- logger.info("Trying to log-in as " + getUserName() + " to XMAGE server at " + connection.getHost() + ':' + connection.getPort());
- boolean registerResult;
- if (connection.getAdminPassword() == null) {
- // for backward compatibility. don't remove twice call - first one does nothing but for version checking
- registerResult = server.connectUser(connection.getUsername(), connection.getPassword(), sessionId, client.getVersion(), connection.getUserIdStr());
- if (registerResult) {
- server.setUserData(connection.getUsername(), sessionId, connection.getUserData(), client.getVersion().toString(), connection.getUserIdStr());
+ @Override
+ public boolean run() throws Throwable {
+ logger.info("Trying to log-in as " + getUserName() + " to XMAGE server at " + connection.getHost() + ':' + connection.getPort());
+ boolean registerResult;
+ if (connection.getAdminPassword() == null) {
+ // for backward compatibility. don't remove twice call - first one does nothing but for version checking
+ registerResult = server.connectUser(connection.getUsername(), connection.getPassword(), sessionId, client.getVersion(), connection.getUserIdStr());
+ if (registerResult) {
+ server.setUserData(connection.getUsername(), sessionId, connection.getUserData(), client.getVersion().toString(), connection.getUserIdStr());
+ }
+ } else {
+ registerResult = server.connectAdmin(connection.getAdminPassword(), sessionId, client.getVersion());
+ }
+ if (registerResult) {
+ serverState = server.getServerState();
+ if (!connection.getUsername().equals("Admin")) {
+ updateDatabase(connection.isForceDBComparison(), serverState);
+ }
+ logger.info("Logged-in as " + getUserName() + " to MAGE server at " + connection.getHost() + ':' + connection.getPort());
+ client.connected(getUserName() + '@' + connection.getHost() + ':' + connection.getPort() + ' ');
+ return true;
+ }
+ disconnect(false);
+ return false;
}
- } else {
- registerResult = server.connectAdmin(connection.getAdminPassword(), sessionId, client.getVersion());
- }
- if (registerResult) {
- serverState = server.getServerState();
- if (!connection.getUsername().equals("Admin")) {
- updateDatabase(connection.isForceDBComparison(), serverState);
- }
- logger.info("Logged-in as " + getUserName() + " to MAGE server at " + connection.getHost() + ':' + connection.getPort());
- client.connected(getUserName() + '@' + connection.getHost() + ':' + connection.getPort() + ' ');
- return true;
- }
- disconnect(false);
- return false;
- }
- });
+ });
}
+ @Override
public Optional getServerHostname() {
return isConnected() ? Optional.of(connection.getHost()) : Optional.empty();
}
@@ -305,14 +305,14 @@ public class SessionImpl implements Session {
to a value greater than 1, an invocation interrupted by a write timeout can be retried.
Note. The write timeout facility applies to writing of both invocations and responses. It applies to push callbacks as well.
*/
- metadata.put(SocketWrapper.WRITE_TIMEOUT, "2000");
+ metadata.put(SocketWrapper.WRITE_TIMEOUT, String.valueOf(connection.getSocketWriteTimeout()));
metadata.put("generalizeSocketException", "true");
server = (MageServer) TransporterClient.createTransporterClient(clientLocator.getLocatorURI(), MageServer.class, metadata);
// http://docs.jboss.org/jbossremoting/docs/guide/2.5/html_single/#d0e1057
Map clientMetadata = new HashMap<>();
- clientMetadata.put(SocketWrapper.WRITE_TIMEOUT, "2000");
+ clientMetadata.put(SocketWrapper.WRITE_TIMEOUT, String.valueOf(connection.getSocketWriteTimeout()));
/* generalizeSocketException
* If set to false, a failed invocation will be retried in the case of
* SocketExceptions. If set to true, a failed invocation will be retried in the case of
@@ -473,7 +473,7 @@ public class SessionImpl implements Session {
/**
* @param askForReconnect - true = connection was lost because of error and
- * ask the user if he want to try to reconnect
+ * ask the user if he want to try to reconnect
*/
@Override
public synchronized void disconnect(boolean askForReconnect) {
@@ -967,7 +967,6 @@ public class SessionImpl implements Session {
return false;
}
-
@Override
public boolean joinGame(UUID gameId) {
try {
diff --git a/Mage.Common/src/mage/utils/MageVersion.java b/Mage.Common/src/mage/utils/MageVersion.java
index 3d065060b60..d0bc3c1fa89 100644
--- a/Mage.Common/src/mage/utils/MageVersion.java
+++ b/Mage.Common/src/mage/utils/MageVersion.java
@@ -40,7 +40,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 = 22;
+ public final static int MAGE_VERSION_PATCH = 23;
public final static String MAGE_VERSION_MINOR_PATCH = "V0";
public final static String MAGE_VERSION_INFO = "";
diff --git a/Mage.Common/src/mage/view/CardView.java b/Mage.Common/src/mage/view/CardView.java
index 56ff4a213eb..8b567d89da8 100644
--- a/Mage.Common/src/mage/view/CardView.java
+++ b/Mage.Common/src/mage/view/CardView.java
@@ -27,6 +27,7 @@
*/
package mage.view;
+import java.util.*;
import mage.MageObject;
import mage.ObjectColor;
import mage.abilities.Abilities;
@@ -50,8 +51,6 @@ import mage.game.stack.StackAbility;
import mage.target.Target;
import mage.target.Targets;
-import java.util.*;
-
/**
* @author BetaSteward_at_googlemail.com
*/
@@ -219,8 +218,8 @@ public class CardView extends SimpleCardView {
* @param card
* @param game
* @param controlled is the card view created for the card controller - used
- * for morph / face down cards to know which player may see information for
- * the card
+ * for morph / face down cards to know which player may see information for
+ * the card
*/
public CardView(Card card, Game game, boolean controlled) {
this(card, game, controlled, false, false);
@@ -246,12 +245,12 @@ public class CardView extends SimpleCardView {
/**
* @param card
* @param game
- * @param controlled is the card view created for the card controller - used
- * for morph / face down cards to know which player may see information for
- * the card
+ * @param controlled is the card view created for the card controller - used
+ * for morph / face down cards to know which player may see information for
+ * the card
* @param showFaceDownCard if true and the card is not on the battlefield,
- * also a face down card is shown in the view, face down cards will be shown
- * @param storeZone if true the card zone will be set in the zone attribute.
+ * also a face down card is shown in the view, face down cards will be shown
+ * @param storeZone if true the card zone will be set in the zone attribute.
*/
public CardView(Card card, Game game, boolean controlled, boolean showFaceDownCard, boolean storeZone) {
super(card.getId(), card.getExpansionSetCode(), card.getCardNumber(), card.getUsesVariousArt(), card.getTokenSetCode(), game != null, card.getTokenDescriptor());
@@ -303,13 +302,17 @@ public class CardView extends SimpleCardView {
SplitCard splitCard = null;
if (card.isSplitCard()) {
splitCard = (SplitCard) card;
- rotate = true;
+ rotate = (((SplitCard) card).getSpellAbility().getSpellAbilityType()) != SpellAbilityType.SPLIT_AFTERMATH;
} else if (card instanceof Spell) {
switch (((Spell) card).getSpellAbility().getSpellAbilityType()) {
case SPLIT_FUSED:
splitCard = (SplitCard) ((Spell) card).getCard();
rotate = true;
break;
+ case SPLIT_AFTERMATH:
+ splitCard = (SplitCard) ((Spell) card).getCard();
+ rotate = false;
+ break;
case SPLIT_LEFT:
case SPLIT_RIGHT:
rotate = true;
@@ -430,23 +433,19 @@ public class CardView extends SimpleCardView {
// Needs a special art rect
if (ty == SpellAbilityType.SPLIT_FUSED) {
artRect = ArtRect.SPLIT_FUSED;
- } else {
- if (spell.getCard() != null) {
- SplitCard wholeCard = ((SplitCardHalf) spell.getCard()).getParentCard();
- Abilities aftermathHalfAbilities = wholeCard.getRightHalfCard().getAbilities();
- if (aftermathHalfAbilities.stream().anyMatch(ability -> ability instanceof AftermathAbility)) {
- if (ty == SpellAbilityType.SPLIT_RIGHT) {
- artRect = ArtRect.AFTERMATH_BOTTOM;
- } else {
- artRect = ArtRect.AFTERMATH_TOP;
- }
+ } else if (spell.getCard() != null) {
+ SplitCard wholeCard = ((SplitCardHalf) spell.getCard()).getParentCard();
+ Abilities aftermathHalfAbilities = wholeCard.getRightHalfCard().getAbilities();
+ if (aftermathHalfAbilities.stream().anyMatch(ability -> ability instanceof AftermathAbility)) {
+ if (ty == SpellAbilityType.SPLIT_RIGHT) {
+ artRect = ArtRect.AFTERMATH_BOTTOM;
} else {
- if (ty == SpellAbilityType.SPLIT_RIGHT) {
- artRect = ArtRect.SPLIT_RIGHT;
- } else {
- artRect = ArtRect.SPLIT_LEFT;
- }
+ artRect = ArtRect.AFTERMATH_TOP;
}
+ } else if (ty == SpellAbilityType.SPLIT_RIGHT) {
+ artRect = ArtRect.SPLIT_RIGHT;
+ } else {
+ artRect = ArtRect.SPLIT_LEFT;
}
}
}
@@ -964,13 +963,21 @@ public class CardView extends SimpleCardView {
}
public String getColorText() {
- if (getColor().getColorCount() == 0) return "Colorless";
- else if (getColor().getColorCount() > 1) return "Gold";
- else if (getColor().isBlack()) return "Black";
- else if (getColor().isBlue()) return "Blue";
- else if (getColor().isWhite()) return "White";
- else if (getColor().isGreen()) return "Green";
- else if (getColor().isRed()) return "Red";
+ if (getColor().getColorCount() == 0) {
+ return "Colorless";
+ } else if (getColor().getColorCount() > 1) {
+ return "Gold";
+ } else if (getColor().isBlack()) {
+ return "Black";
+ } else if (getColor().isBlue()) {
+ return "Blue";
+ } else if (getColor().isWhite()) {
+ return "White";
+ } else if (getColor().isGreen()) {
+ return "Green";
+ } else if (getColor().isRed()) {
+ return "Red";
+ }
return "";
}
diff --git a/Mage.Plugins/Mage.Counter.Plugin/pom.xml b/Mage.Plugins/Mage.Counter.Plugin/pom.xml
index ce49c32ce21..ee30c83624d 100644
--- a/Mage.Plugins/Mage.Counter.Plugin/pom.xml
+++ b/Mage.Plugins/Mage.Counter.Plugin/pom.xml
@@ -7,7 +7,7 @@
org.mage
mage-plugins
- 1.4.22
+ 1.4.23
mage-counter-plugin
diff --git a/Mage.Plugins/pom.xml b/Mage.Plugins/pom.xml
index 2a68bba9ff1..c9e95ef2a7e 100644
--- a/Mage.Plugins/pom.xml
+++ b/Mage.Plugins/pom.xml
@@ -7,7 +7,7 @@
org.mage
mage-root
- 1.4.22
+ 1.4.23
mage-plugins
diff --git a/Mage.Server.Console/pom.xml b/Mage.Server.Console/pom.xml
index 25338d9613b..825e53abe0b 100644
--- a/Mage.Server.Console/pom.xml
+++ b/Mage.Server.Console/pom.xml
@@ -6,7 +6,7 @@
org.mage
mage-root
- 1.4.22
+ 1.4.23
org.mage
diff --git a/Mage.Server.Plugins/Mage.Deck.Constructed/pom.xml b/Mage.Server.Plugins/Mage.Deck.Constructed/pom.xml
index 62f28f4ed22..f07ae6dc47d 100644
--- a/Mage.Server.Plugins/Mage.Deck.Constructed/pom.xml
+++ b/Mage.Server.Plugins/Mage.Deck.Constructed/pom.xml
@@ -7,7 +7,7 @@
org.mage
mage-server-plugins
- 1.4.22
+ 1.4.23
mage-deck-constructed
diff --git a/Mage.Server.Plugins/Mage.Deck.Limited/pom.xml b/Mage.Server.Plugins/Mage.Deck.Limited/pom.xml
index 744fe8a2e00..1125d536bde 100644
--- a/Mage.Server.Plugins/Mage.Deck.Limited/pom.xml
+++ b/Mage.Server.Plugins/Mage.Deck.Limited/pom.xml
@@ -7,7 +7,7 @@
org.mage
mage-server-plugins
- 1.4.22
+ 1.4.23
mage-deck-limited
diff --git a/Mage.Server.Plugins/Mage.Game.CanadianHighlanderDuel/pom.xml b/Mage.Server.Plugins/Mage.Game.CanadianHighlanderDuel/pom.xml
index e334cea9a4a..e6e40f6eb41 100644
--- a/Mage.Server.Plugins/Mage.Game.CanadianHighlanderDuel/pom.xml
+++ b/Mage.Server.Plugins/Mage.Game.CanadianHighlanderDuel/pom.xml
@@ -7,7 +7,7 @@
org.mage
mage-server-plugins
- 1.4.22
+ 1.4.23
mage-game-canadianhighlanderduel
diff --git a/Mage.Server.Plugins/Mage.Game.CommanderDuel/pom.xml b/Mage.Server.Plugins/Mage.Game.CommanderDuel/pom.xml
index c2c3feb6f1c..a2b1e3e5817 100644
--- a/Mage.Server.Plugins/Mage.Game.CommanderDuel/pom.xml
+++ b/Mage.Server.Plugins/Mage.Game.CommanderDuel/pom.xml
@@ -7,7 +7,7 @@
org.mage
mage-server-plugins
- 1.4.22
+ 1.4.23
mage-game-commanderduel
diff --git a/Mage.Server.Plugins/Mage.Game.CommanderFreeForAll/pom.xml b/Mage.Server.Plugins/Mage.Game.CommanderFreeForAll/pom.xml
index 280efb453b8..b375807fcbe 100644
--- a/Mage.Server.Plugins/Mage.Game.CommanderFreeForAll/pom.xml
+++ b/Mage.Server.Plugins/Mage.Game.CommanderFreeForAll/pom.xml
@@ -6,7 +6,7 @@
org.mage
mage-server-plugins
- 1.4.22
+ 1.4.23
mage-game-commanderfreeforall
diff --git a/Mage.Server.Plugins/Mage.Game.FreeForAll/pom.xml b/Mage.Server.Plugins/Mage.Game.FreeForAll/pom.xml
index e3572327116..d812155dc9e 100644
--- a/Mage.Server.Plugins/Mage.Game.FreeForAll/pom.xml
+++ b/Mage.Server.Plugins/Mage.Game.FreeForAll/pom.xml
@@ -7,7 +7,7 @@
org.mage
mage-server-plugins
- 1.4.22
+ 1.4.23
mage-game-freeforall
diff --git a/Mage.Server.Plugins/Mage.Game.MomirDuel/pom.xml b/Mage.Server.Plugins/Mage.Game.MomirDuel/pom.xml
index a34076a763b..4d27e25c556 100644
--- a/Mage.Server.Plugins/Mage.Game.MomirDuel/pom.xml
+++ b/Mage.Server.Plugins/Mage.Game.MomirDuel/pom.xml
@@ -7,7 +7,7 @@
org.mage
mage-server-plugins
- 1.4.22
+ 1.4.23
mage-game-momirduel
diff --git a/Mage.Server.Plugins/Mage.Game.TinyLeadersDuel/pom.xml b/Mage.Server.Plugins/Mage.Game.TinyLeadersDuel/pom.xml
index 3b6edde8917..56bec2a4160 100644
--- a/Mage.Server.Plugins/Mage.Game.TinyLeadersDuel/pom.xml
+++ b/Mage.Server.Plugins/Mage.Game.TinyLeadersDuel/pom.xml
@@ -7,7 +7,7 @@
org.mage
mage-server-plugins
- 1.4.22
+ 1.4.23
mage-game-tinyleadersduel
diff --git a/Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/pom.xml b/Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/pom.xml
index f55b40cde6a..beb8636331b 100644
--- a/Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/pom.xml
+++ b/Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/pom.xml
@@ -7,7 +7,7 @@
org.mage
mage-server-plugins
- 1.4.22
+ 1.4.23
mage-game-twoplayerduel
diff --git a/Mage.Server.Plugins/Mage.Player.AI.DraftBot/pom.xml b/Mage.Server.Plugins/Mage.Player.AI.DraftBot/pom.xml
index 809fe363f17..3c85e47b5c4 100644
--- a/Mage.Server.Plugins/Mage.Player.AI.DraftBot/pom.xml
+++ b/Mage.Server.Plugins/Mage.Player.AI.DraftBot/pom.xml
@@ -7,7 +7,7 @@
org.mage
mage-server-plugins
- 1.4.22
+ 1.4.23
mage-player-ai-draftbot
diff --git a/Mage.Server.Plugins/Mage.Player.AI.MA/pom.xml b/Mage.Server.Plugins/Mage.Player.AI.MA/pom.xml
index 0ee73a7e628..e9d83120f5e 100644
--- a/Mage.Server.Plugins/Mage.Player.AI.MA/pom.xml
+++ b/Mage.Server.Plugins/Mage.Player.AI.MA/pom.xml
@@ -7,7 +7,7 @@
org.mage
mage-server-plugins
- 1.4.22
+ 1.4.23
mage-player-ai-ma
diff --git a/Mage.Server.Plugins/Mage.Player.AI/pom.xml b/Mage.Server.Plugins/Mage.Player.AI/pom.xml
index 6920179bac7..8674a99ec47 100644
--- a/Mage.Server.Plugins/Mage.Player.AI/pom.xml
+++ b/Mage.Server.Plugins/Mage.Player.AI/pom.xml
@@ -7,7 +7,7 @@
org.mage
mage-server-plugins
- 1.4.22
+ 1.4.23
mage-player-ai
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 96bcfa274e0..4fe28205543 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
@@ -27,6 +27,10 @@
*/
package mage.player.ai;
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.*;
+import java.util.Map.Entry;
import mage.MageObject;
import mage.Mana;
import mage.abilities.*;
@@ -77,11 +81,6 @@ import mage.util.TournamentUtil;
import mage.util.TreeNode;
import org.apache.log4j.Logger;
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.*;
-import java.util.Map.Entry;
-
/**
*
* suitable for two player games and some multiplayer games
@@ -1480,6 +1479,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
switch (ability.getSpellAbilityType()) {
case SPLIT:
case SPLIT_FUSED:
+ case SPLIT_AFTERMATH:
MageObject object = game.getObject(ability.getSourceId());
if (object != null) {
LinkedHashMap useableAbilities = getSpellAbilities(object, game.getState().getZone(object.getId()), game);
diff --git a/Mage.Server.Plugins/Mage.Player.AIMCTS/pom.xml b/Mage.Server.Plugins/Mage.Player.AIMCTS/pom.xml
index 6144703ad63..5e3e0c0bee3 100644
--- a/Mage.Server.Plugins/Mage.Player.AIMCTS/pom.xml
+++ b/Mage.Server.Plugins/Mage.Player.AIMCTS/pom.xml
@@ -7,7 +7,7 @@
org.mage
mage-server-plugins
- 1.4.22
+ 1.4.23
mage-player-ai-mcts
diff --git a/Mage.Server.Plugins/Mage.Player.AIMinimax/pom.xml b/Mage.Server.Plugins/Mage.Player.AIMinimax/pom.xml
index 92135473697..53d79731bce 100644
--- a/Mage.Server.Plugins/Mage.Player.AIMinimax/pom.xml
+++ b/Mage.Server.Plugins/Mage.Player.AIMinimax/pom.xml
@@ -7,7 +7,7 @@
org.mage
mage-server-plugins
- 1.4.22
+ 1.4.23
mage-player-aiminimax
diff --git a/Mage.Server.Plugins/Mage.Player.Human/pom.xml b/Mage.Server.Plugins/Mage.Player.Human/pom.xml
index 1ad084c6c21..1188707f5e1 100644
--- a/Mage.Server.Plugins/Mage.Player.Human/pom.xml
+++ b/Mage.Server.Plugins/Mage.Player.Human/pom.xml
@@ -7,7 +7,7 @@
org.mage
mage-server-plugins
- 1.4.22
+ 1.4.23
mage-player-human
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 20447819971..38b239cb6e8 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
@@ -27,6 +27,8 @@
*/
package mage.player.human;
+import java.io.Serializable;
+import java.util.*;
import mage.MageObject;
import mage.abilities.*;
import mage.abilities.costs.VariableCost;
@@ -42,6 +44,8 @@ import mage.cards.decks.Deck;
import mage.choices.Choice;
import mage.choices.ChoiceImpl;
import mage.constants.*;
+import static mage.constants.PlayerAction.REQUEST_AUTO_ANSWER_RESET_ALL;
+import static mage.constants.PlayerAction.TRIGGER_AUTO_ORDER_RESET_ALL;
import mage.filter.common.FilterAttackingCreature;
import mage.filter.common.FilterBlockingCreature;
import mage.filter.common.FilterCreatureForCombat;
@@ -70,12 +74,6 @@ import mage.util.ManaUtil;
import mage.util.MessageToClient;
import org.apache.log4j.Logger;
-import java.io.Serializable;
-import java.util.*;
-
-import static mage.constants.PlayerAction.REQUEST_AUTO_ANSWER_RESET_ALL;
-import static mage.constants.PlayerAction.TRIGGER_AUTO_ORDER_RESET_ALL;
-
/**
*
* @author BetaSteward_at_googlemail.com
@@ -300,7 +298,7 @@ public class HumanPlayer extends PlayerImpl {
public boolean choose(Outcome outcome, Target target, UUID sourceId, Game game, Map options) {
updateGameStatePriority("choose(5)", game);
UUID abilityControllerId = playerId;
- if (target.getTargetController() != null
+ if (target.getTargetController() != null
&& target.getAbilityController() != null) {
abilityControllerId = target.getAbilityController();
}
@@ -309,7 +307,7 @@ public class HumanPlayer extends PlayerImpl {
}
while (!abort) {
Set targetIds = target.possibleTargets(sourceId, abilityControllerId, game);
- if (targetIds == null
+ if (targetIds == null
|| targetIds.isEmpty()) {
return target.getTargets().size() >= target.getNumberOfTargets();
}
@@ -381,7 +379,7 @@ public class HumanPlayer extends PlayerImpl {
while (!abort) {
Set possibleTargets = target.possibleTargets(source == null ? null : source.getSourceId(), abilityControllerId, game);
boolean required = target.isRequired(source != null ? source.getSourceId() : null, game);
- if (possibleTargets.isEmpty()
+ if (possibleTargets.isEmpty()
|| target.getTargets().size() >= target.getNumberOfTargets()) {
required = false;
}
@@ -417,7 +415,7 @@ public class HumanPlayer extends PlayerImpl {
if (options == null) {
options = new HashMap<>();
}
- if (target.getTargets().size() >= target.getNumberOfTargets()
+ if (target.getTargets().size() >= target.getNumberOfTargets()
&& !options.containsKey("UI.right.btn.text")) {
options.put("UI.right.btn.text", "Done");
}
@@ -571,13 +569,13 @@ public class HumanPlayer extends PlayerImpl {
}
}
if (getJustActivatedType() != null && !holdingPriority) {
- if (controllingPlayer.getUserData().isPassPriorityCast()
+ if (controllingPlayer.getUserData().isPassPriorityCast()
&& getJustActivatedType() == AbilityType.SPELL) {
setJustActivatedType(null);
pass(game);
return false;
}
- if (controllingPlayer.getUserData().isPassPriorityActivation()
+ if (controllingPlayer.getUserData().isPassPriorityActivation()
&& getJustActivatedType() == AbilityType.ACTIVATED) {
setJustActivatedType(null);
pass(game);
@@ -585,7 +583,7 @@ public class HumanPlayer extends PlayerImpl {
}
}
if (isGameUnderControl()) { // Use the skip actions only if the player itself controls its turn
- if (passedAllTurns
+ if (passedAllTurns
|| passedTurnSkipStack) {
if (passWithManaPoolCheck(game)) {
return false;
@@ -609,18 +607,18 @@ public class HumanPlayer extends PlayerImpl {
if (game.getStack().isEmpty()) {
passedUntilStackResolved = false;
boolean dontCheckPassStep = false;
- if (passedTurn
+ if (passedTurn
|| passedTurnSkipStack) {
if (passWithManaPoolCheck(game)) {
return false;
}
}
if (passedUntilNextMain) {
- if (game.getTurn().getStepType() == PhaseStep.POSTCOMBAT_MAIN
+ if (game.getTurn().getStepType() == PhaseStep.POSTCOMBAT_MAIN
|| game.getTurn().getStepType() == PhaseStep.PRECOMBAT_MAIN) {
// it's a main phase
- if (!skippedAtLeastOnce
- || (!playerId.equals(game.getActivePlayerId())
+ if (!skippedAtLeastOnce
+ || (!playerId.equals(game.getActivePlayerId())
&& !this.getUserData().getUserSkipPrioritySteps().isStopOnAllMainPhases())) {
skippedAtLeastOnce = true;
if (passWithManaPoolCheck(game)) {
@@ -640,8 +638,8 @@ public class HumanPlayer extends PlayerImpl {
if (passedUntilEndOfTurn) {
if (game.getTurn().getStepType() == PhaseStep.END_TURN) {
// It's end of turn phase
- if (!skippedAtLeastOnce
- || (playerId.equals(game.getActivePlayerId())
+ if (!skippedAtLeastOnce
+ || (playerId.equals(game.getActivePlayerId())
&& !this.getUserData().getUserSkipPrioritySteps().isStopOnAllEndPhases())) {
skippedAtLeastOnce = true;
if (passWithManaPoolCheck(game)) {
@@ -658,7 +656,7 @@ public class HumanPlayer extends PlayerImpl {
}
}
}
- if (!dontCheckPassStep
+ if (!dontCheckPassStep
&& checkPassStep(game, controllingPlayer)) {
if (passWithManaPoolCheck(game)) {
return false;
@@ -683,7 +681,7 @@ public class HumanPlayer extends PlayerImpl {
if (game.executingRollback()) {
return true;
}
- if (response.getBoolean() != null
+ if (response.getBoolean() != null
|| response.getInteger() != null) {
if (passWithManaPoolCheck(game)) {
return false;
@@ -694,7 +692,7 @@ public class HumanPlayer extends PlayerImpl {
break;
}
- if (response.getString() != null
+ if (response.getString() != null
&& response.getString().equals("special")) {
specialAction(game);
} else if (response.getUUID() != null) {
@@ -716,7 +714,7 @@ public class HumanPlayer extends PlayerImpl {
}
if (actingPlayer != null) {
LinkedHashMap useableAbilities = actingPlayer.getUseableActivatedAbilities(object, zone, game);
- if (useableAbilities != null
+ if (useableAbilities != null
&& !useableAbilities.isEmpty()) {
activateAbility(useableAbilities, object, game);
result = true;
@@ -786,7 +784,7 @@ public class HumanPlayer extends PlayerImpl {
if (abilitiesWithNoOrderSet.isEmpty()) {
return abilityOrderLast;
}
- if (abilitiesWithNoOrderSet.size() == 1
+ if (abilitiesWithNoOrderSet.size() == 1
|| autoOrderUse) {
return abilitiesWithNoOrderSet.iterator().next();
}
@@ -824,7 +822,7 @@ public class HumanPlayer extends PlayerImpl {
return false;
} else if (response.getUUID() != null) {
playManaAbilities(abilityToCast, unpaid, game);
- } else if (response.getString() != null
+ } else if (response.getString() != null
&& response.getString().equals("special")) {
if (unpaid instanceof ManaCostsImpl) {
specialManaAction(unpaid, game);
@@ -856,9 +854,9 @@ public class HumanPlayer extends PlayerImpl {
do {
game.fireGetAmountEvent(playerId, message, min, max);
waitForResponse(game);
- } while (response.getInteger() == null
+ } while (response.getInteger() == null
&& !abort);
- if (response != null
+ if (response != null
&& response.getInteger() != null) {
xValue = response.getInteger();
}
@@ -1322,6 +1320,7 @@ public class HumanPlayer extends PlayerImpl {
switch (ability.getSpellAbilityType()) {
case SPLIT:
case SPLIT_FUSED:
+ case SPLIT_AFTERMATH:
MageObject object = game.getObject(ability.getSourceId());
if (object != null) {
LinkedHashMap useableAbilities = getSpellAbilities(object, game.getState().getZone(object.getId()), game);
diff --git a/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/pom.xml b/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/pom.xml
index 9e79eced5c0..93ff0ffda37 100644
--- a/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/pom.xml
+++ b/Mage.Server.Plugins/Mage.Tournament.BoosterDraft/pom.xml
@@ -7,7 +7,7 @@
org.mage
mage-server-plugins
- 1.4.22
+ 1.4.23
mage-tournament-boosterdraft
diff --git a/Mage.Server.Plugins/Mage.Tournament.Constructed/pom.xml b/Mage.Server.Plugins/Mage.Tournament.Constructed/pom.xml
index d67232ea2a5..0238ba6ea3e 100644
--- a/Mage.Server.Plugins/Mage.Tournament.Constructed/pom.xml
+++ b/Mage.Server.Plugins/Mage.Tournament.Constructed/pom.xml
@@ -7,7 +7,7 @@
org.mage
mage-server-plugins
- 1.4.22
+ 1.4.23
mage-tournament-constructed
diff --git a/Mage.Server.Plugins/Mage.Tournament.Sealed/pom.xml b/Mage.Server.Plugins/Mage.Tournament.Sealed/pom.xml
index b1b5149927c..7abb9bbc966 100644
--- a/Mage.Server.Plugins/Mage.Tournament.Sealed/pom.xml
+++ b/Mage.Server.Plugins/Mage.Tournament.Sealed/pom.xml
@@ -7,7 +7,7 @@
org.mage
mage-server-plugins
- 1.4.22
+ 1.4.23
mage-tournament-sealed
diff --git a/Mage.Server.Plugins/pom.xml b/Mage.Server.Plugins/pom.xml
index 2fdf714fc1c..545f67a4c51 100644
--- a/Mage.Server.Plugins/pom.xml
+++ b/Mage.Server.Plugins/pom.xml
@@ -6,7 +6,7 @@
org.mage
mage-root
- 1.4.22
+ 1.4.23
mage-server-plugins
diff --git a/Mage.Server/config/config.xml b/Mage.Server/config/config.xml
index 458c3c17723..88b18aa2161 100644
--- a/Mage.Server/config/config.xml
+++ b/Mage.Server/config/config.xml
@@ -12,6 +12,7 @@
leasePeriod - To turn on server side connection failure detection of remoting clients, it is necessary to satisfy two criteria.
The first is that the client lease period is set and is a value greater than 0. The value is represented in milliseconds.
The client lease period can be set by either the 'clientLeasePeriod' attribute within the Connector configuration or by calling the Connector method
+ socketWriteTimeout - All write operations will time out if they do not complete within the configured period.
maxGameThreads - Number of games that can be started simultanously on the server
maxSecondsIdle - Number of seconds after that a game is auto conceded by the player that was idle for such a time
minUserNameLength - minmal allowed length of a user name to connect to the server
@@ -40,6 +41,7 @@
numAcceptThreads="2"
maxPoolSize="300"
leasePeriod="5000"
+ socketWriteTimeout="10000"
maxGameThreads="10"
maxSecondsIdle="600"
minUserNameLength="3"
@@ -109,6 +111,7 @@
+
diff --git a/Mage.Server/pom.xml b/Mage.Server/pom.xml
index e1dcd5516f5..5d240e2cc5b 100644
--- a/Mage.Server/pom.xml
+++ b/Mage.Server/pom.xml
@@ -6,7 +6,7 @@
org.mage
mage-root
- 1.4.22
+ 1.4.23
mage-server
diff --git a/Mage.Server/release/config/config.xml b/Mage.Server/release/config/config.xml
index eecf4818630..03b66244b09 100644
--- a/Mage.Server/release/config/config.xml
+++ b/Mage.Server/release/config/config.xml
@@ -12,6 +12,7 @@
leasePeriod - To turn on server side connection failure detection of remoting clients, it is necessary to satisfy two criteria.
The first is that the client lease period is set and is a value greater than 0. The value is represented in milliseconds.
The client lease period can be set by either the 'clientLeasePeriod' attribute within the Connector configuration or by calling the Connector method
+ socketWriteTimeout - All write operations will time out if they do not complete within the configured period.
maxGameThreads - Number of games that can be started simultanously on the server
maxSecondsIdle - Number of seconds after that a game is auto conceded by the player that was idle for such a time
minUserNameLength - minmal allowed length of a user name to connect to the server
@@ -39,6 +40,7 @@
numAcceptThreads="2"
maxPoolSize="300"
leasePeriod="5000"
+ socketWriteTimeout="10000"
maxGameThreads="10"
maxSecondsIdle="600"
minUserNameLength="3"
@@ -106,6 +108,7 @@
+
diff --git a/Mage.Server/src/main/java/mage/server/Main.java b/Mage.Server/src/main/java/mage/server/Main.java
index 52fe274ae1e..713517fc593 100644
--- a/Mage.Server/src/main/java/mage/server/Main.java
+++ b/Mage.Server/src/main/java/mage/server/Main.java
@@ -27,6 +27,12 @@
*/
package mage.server;
+import java.io.File;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.MalformedURLException;
+import java.util.*;
+import javax.management.MBeanServer;
import mage.cards.ExpansionSet;
import mage.cards.Sets;
import mage.cards.repository.CardScanner;
@@ -59,13 +65,6 @@ import org.jboss.remoting.transporter.TransporterClient;
import org.jboss.remoting.transporter.TransporterServer;
import org.w3c.dom.Element;
-import javax.management.MBeanServer;
-import java.io.File;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.MalformedURLException;
-import java.util.*;
-
/**
* @author BetaSteward_at_googlemail.com
*/
@@ -202,6 +201,7 @@ public final class Main {
logger.info("Config - save game active: " + (config.isSaveGameActivated() ? "true" : "false"));
logger.info("Config - backlog size : " + config.getBacklogSize());
logger.info("Config - lease period : " + config.getLeasePeriod());
+ logger.info("Config - sock wrt timeout: " + config.getSocketWriteTimeout());
logger.info("Config - max pool size : " + config.getMaxPoolSize());
logger.info("Config - num accp.threads: " + config.getNumAcceptThreads());
logger.info("Config - second.bind port: " + config.getSecondaryBindPort());
@@ -244,7 +244,7 @@ public final class Main {
static boolean isAlreadyRunning(InvokerLocator serverLocator) {
Map metadata = new HashMap<>();
- metadata.put(SocketWrapper.WRITE_TIMEOUT, "2000");
+ metadata.put(SocketWrapper.WRITE_TIMEOUT, String.valueOf(ConfigSettings.instance.getSocketWriteTimeout()));
metadata.put("generalizeSocketException", "true");
try {
MageServer testServer = (MageServer) TransporterClient.createTransporterClient(serverLocator.getLocatorURI(), MageServer.class, metadata);
diff --git a/Mage.Server/src/main/java/mage/server/util/ConfigSettings.java b/Mage.Server/src/main/java/mage/server/util/ConfigSettings.java
index 4acf8c98b05..a4e8e9d6101 100644
--- a/Mage.Server/src/main/java/mage/server/util/ConfigSettings.java
+++ b/Mage.Server/src/main/java/mage/server/util/ConfigSettings.java
@@ -24,8 +24,7 @@
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
-*/
-
+ */
package mage.server.util;
import java.io.File;
@@ -33,7 +32,6 @@ import java.util.List;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
-
import mage.server.util.config.Config;
import mage.server.util.config.GamePlugin;
import mage.server.util.config.Plugin;
@@ -48,7 +46,6 @@ public enum ConfigSettings {
private Config config;
-
ConfigSettings() {
try {
JAXBContext jaxbContext = JAXBContext.newInstance("mage.server.util.config");
@@ -79,6 +76,10 @@ public enum ConfigSettings {
return config.getServer().getLeasePeriod().intValue();
}
+ public int getSocketWriteTimeout() {
+ return config.getServer().getSocketWriteTimeout().intValue();
+ }
+
public int getMaxPoolSize() {
return config.getServer().getMaxPoolSize().intValue();
}
diff --git a/Mage.Server/src/main/java/mage/server/util/resources/config.xml b/Mage.Server/src/main/java/mage/server/util/resources/config.xml
index f5696f65228..a351f218a7e 100644
--- a/Mage.Server/src/main/java/mage/server/util/resources/config.xml
+++ b/Mage.Server/src/main/java/mage/server/util/resources/config.xml
@@ -9,6 +9,7 @@
numAcceptThreads="2"
maxPoolSize="300"
leasePeriod="5000"
+ socketWriteTimeout="10000"
maxGameThreads="10"
maxSecondsIdle="600"
minUserNameLength="3"
diff --git a/Mage.Server/src/main/xml-resources/jaxb/Config/Config.xsd b/Mage.Server/src/main/xml-resources/jaxb/Config/Config.xsd
index 0a82ec9bae5..ac33721e7cb 100644
--- a/Mage.Server/src/main/xml-resources/jaxb/Config/Config.xsd
+++ b/Mage.Server/src/main/xml-resources/jaxb/Config/Config.xsd
@@ -2,102 +2,103 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/Mage.Sets/pom.xml b/Mage.Sets/pom.xml
index a615415a5d6..3e3f9379a96 100644
--- a/Mage.Sets/pom.xml
+++ b/Mage.Sets/pom.xml
@@ -7,7 +7,7 @@
org.mage
mage-root
- 1.4.22
+ 1.4.23
org.mage
diff --git a/Mage.Sets/src/mage/cards/a/AhnCropChampion.java b/Mage.Sets/src/mage/cards/a/AhnCropChampion.java
index 485c4bc2cc8..2004cbf2fa1 100644
--- a/Mage.Sets/src/mage/cards/a/AhnCropChampion.java
+++ b/Mage.Sets/src/mage/cards/a/AhnCropChampion.java
@@ -43,11 +43,6 @@ import mage.filter.predicate.permanent.AnotherPredicate;
* @author stravant
*/
public class AhnCropChampion extends CardImpl {
- private final static FilterControlledCreaturePermanent otherCreaturesFilter = new FilterControlledCreaturePermanent("other creatures you control");
- static {
- otherCreaturesFilter.add(new AnotherPredicate());
- }
-
public AhnCropChampion(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{W}");
@@ -57,7 +52,7 @@ public class AhnCropChampion extends CardImpl {
this.toughness = new MageInt(4);
// You may exert Ahn-Crop Champion as it attacks. When you do, untap all other creatures you control.
- addAbility(new ExertAbility(new BecomesExertSourceTriggeredAbility(new UntapAllControllerEffect(otherCreaturesFilter))));
+ addAbility(new ExertAbility(new BecomesExertSourceTriggeredAbility(new UntapAllControllerEffect(new FilterControlledCreaturePermanent("creatures you control"), null, false))));
}
public AhnCropChampion(final AhnCropChampion card) {
diff --git a/Mage.Sets/src/mage/cards/a/AliveWell.java b/Mage.Sets/src/mage/cards/a/AliveWell.java
index 5a68720e036..4021b15315a 100644
--- a/Mage.Sets/src/mage/cards/a/AliveWell.java
+++ b/Mage.Sets/src/mage/cards/a/AliveWell.java
@@ -27,6 +27,7 @@
*/
package mage.cards.a;
+import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
@@ -34,13 +35,12 @@ import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Outcome;
+import mage.constants.SpellAbilityType;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.game.Game;
import mage.game.permanent.token.CentaurToken;
import mage.players.Player;
-import java.util.UUID;
-
/**
*
* @author LevelX2
@@ -48,7 +48,7 @@ import java.util.UUID;
public class AliveWell extends SplitCard {
public AliveWell(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}", "{W}", true);
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}", "{W}", SpellAbilityType.SPLIT_FUSED);
// Alive
// Create a 3/3 green Centaur creature token.
diff --git a/Mage.Sets/src/mage/cards/a/ApproachOfTheSecondSun.java b/Mage.Sets/src/mage/cards/a/ApproachOfTheSecondSun.java
index 53231bad015..17780304825 100644
--- a/Mage.Sets/src/mage/cards/a/ApproachOfTheSecondSun.java
+++ b/Mage.Sets/src/mage/cards/a/ApproachOfTheSecondSun.java
@@ -1,7 +1,8 @@
package mage.cards.a;
+import java.util.*;
+
import mage.abilities.Ability;
-import mage.abilities.SpellAbility;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
@@ -9,24 +10,20 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.WatcherScope;
+import mage.constants.Zone;
import mage.game.Game;
-import mage.game.events.DamagedPlayerEvent;
import mage.game.events.GameEvent;
import mage.game.stack.Spell;
import mage.players.Player;
import mage.watchers.Watcher;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-
/**
* @author stravant
*/
public class ApproachOfTheSecondSun extends CardImpl {
public ApproachOfTheSecondSun(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{6}{W}");
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{6}{W}");
getSpellAbility().addEffect(new ApproachOfTheSecondSunEffect());
getSpellAbility().addWatcher(new ApproachOfTheSecondSunWatcher());
@@ -43,11 +40,12 @@ public class ApproachOfTheSecondSun extends CardImpl {
}
class ApproachOfTheSecondSunEffect extends OneShotEffect {
+
public ApproachOfTheSecondSunEffect() {
super(Outcome.Win);
- this.staticText =
- "If you cast {this} from you hand and you cast another spell named {this} this game, you win the game. " +
- "If not, you gain 7 life and put {this} back into your library as the seventh card from the top.";
+ this.staticText
+ = "If {this} was cast from your hand and you've cast another spell named Approach of the Second Sun this game, you win the game. "
+ + "Otherwise, put {this} into its owner's library seventh from the top and you gain 7 life.";
}
public ApproachOfTheSecondSunEffect(final ApproachOfTheSecondSunEffect effect) {
@@ -62,10 +60,11 @@ class ApproachOfTheSecondSunEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
- if (controller != null) {
- ApproachOfTheSecondSunWatcher watcher =
- (ApproachOfTheSecondSunWatcher) game.getState().getWatchers().get("approachOfTheSecondSunWatcher", source.getControllerId());
- if (watcher != null && watcher.getApproachesCast() > 1) {
+ Spell spell = game.getStack().getSpell(source.getSourceId());
+ if (controller != null && spell != null) {
+ ApproachOfTheSecondSunWatcher watcher
+ = (ApproachOfTheSecondSunWatcher) game.getState().getWatchers().get(ApproachOfTheSecondSunWatcher.class.getName());
+ if (watcher != null && watcher.getApproachesCast(controller.getId()) > 1 && spell.getFromZone() == Zone.HAND) {
// Win the game
controller.won(game);
} else {
@@ -73,21 +72,32 @@ class ApproachOfTheSecondSunEffect extends OneShotEffect {
controller.gainLife(7, game);
// Put this into the library as the 7th from the top
- List top6 = new ArrayList<>();
- // Cut the top 6 cards off into a temporary array
- for (int i = 0; i < 6 && controller.getLibrary().hasCards(); ++i) {
- top6.add(controller.getLibrary().removeFromTop(game));
- }
- // Put this card (if the ability came from an ApproachOfTheSecondSun spell card) on top
- Card sourceCard = game.getCard(source.getSourceId());
- if (sourceCard != null) {
- controller.getLibrary().putOnTop(sourceCard, game);
- }
+ Card spellCard = game.getStack().getSpell(source.getSourceId()).getCard();
+ if (spellCard != null) {
+ List top6 = new ArrayList<>();
+ // Cut the top 6 cards off into a temporary array
+ for (int i = 0; i < 6 && controller.getLibrary().hasCards(); ++i) {
+ top6.add(controller.getLibrary().removeFromTop(game));
+ }
- // put the top 6 we took earlier back on top (going in reverse order this time to get them back
- // on top in the proper order)
- for (int i = top6.size() - 1; i >= 0; --i) {
- controller.getLibrary().putOnTop(top6.get(i), game);
+ // Is the library now empty, thus the rise is on the bottom (for the message to the players)?
+ boolean isOnBottom = !controller.getLibrary().hasCards();
+
+ // Put this card (if the ability came from an ApproachOfTheSecondSun spell card) on top
+ spellCard.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
+
+ // put the top 6 we took earlier back on top (going in reverse order this time to get them back
+ // on top in the proper order)
+ for (int i = top6.size() - 1; i >= 0; --i) {
+ controller.getLibrary().putOnTop(top6.get(i), game);
+ }
+
+ // Inform the players
+ if (isOnBottom) {
+ game.informPlayers(controller.getLogName() + " puts " + spell.getLogName() + " on the bottom of his or her library.");
+ } else {
+ game.informPlayers(controller.getLogName() + " puts " + spell.getLogName() + " into his or her library 6th from the top.");
+ }
}
}
return true;
@@ -96,28 +106,37 @@ class ApproachOfTheSecondSunEffect extends OneShotEffect {
}
}
-
class ApproachOfTheSecondSunWatcher extends Watcher {
- private int approachesCast = 0;
+
+ private Map approachesCast = new HashMap<>();
public ApproachOfTheSecondSunWatcher() {
- super("approachOfTheSecondSunWatcher", WatcherScope.PLAYER);
+ super(ApproachOfTheSecondSunWatcher.class.getName(), WatcherScope.GAME);
}
public ApproachOfTheSecondSunWatcher(final ApproachOfTheSecondSunWatcher watcher) {
super(watcher);
- approachesCast = watcher.approachesCast;
+ approachesCast = new HashMap<>(approachesCast);
}
@Override
public void watch(GameEvent event, Game game) {
- if (event.getType() == GameEvent.EventType.SPELL_CAST && event.getPlayerId().equals(this.getControllerId())) {
- ++approachesCast;
+ if (event.getType() == GameEvent.EventType.SPELL_CAST) {
+ Spell spell = game.getStack().getSpell(event.getSourceId());
+ if (spell != null && spell.getName().equals("Approach of the Second Sun")) {
+ int cast = getApproachesCast(event.getPlayerId());
+ approachesCast.put(event.getPlayerId(), cast + 1);
+ }
}
}
- public int getApproachesCast() {
- return approachesCast;
+ public int getApproachesCast(UUID player) {
+ Integer cast = approachesCast.get(player);
+ if (cast == null) {
+ return 0;
+ } else {
+ return cast;
+ }
}
@Override
diff --git a/Mage.Sets/src/mage/cards/a/ArmedDangerous.java b/Mage.Sets/src/mage/cards/a/ArmedDangerous.java
index 7b6dcf3af85..d7097779df2 100644
--- a/Mage.Sets/src/mage/cards/a/ArmedDangerous.java
+++ b/Mage.Sets/src/mage/cards/a/ArmedDangerous.java
@@ -25,9 +25,9 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
-
package mage.cards.a;
+import java.util.UUID;
import mage.abilities.effects.common.combat.MustBeBlockedByAllTargetEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
@@ -36,24 +36,17 @@ import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Duration;
+import mage.constants.SpellAbilityType;
import mage.target.common.TargetCreaturePermanent;
-import java.util.UUID;
-
-/**
- *
- * @author LevelX2
- */
-
-
public class ArmedDangerous extends SplitCard {
public ArmedDangerous(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{R}","{3}{G}",true);
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}", "{3}{G}", SpellAbilityType.SPLIT_FUSED);
// Armed
// Target creature gets +1/+1 and gains double strike until end of turn.
- getLeftHalfCard().getSpellAbility().addEffect(new BoostTargetEffect(1,1, Duration.EndOfTurn));
+ getLeftHalfCard().getSpellAbility().addEffect(new BoostTargetEffect(1, 1, Duration.EndOfTurn));
getLeftHalfCard().getSpellAbility().addEffect(new GainAbilityTargetEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn));
getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
diff --git a/Mage.Sets/src/mage/cards/a/ArtisanOfForms.java b/Mage.Sets/src/mage/cards/a/ArtisanOfForms.java
index 7520507587c..2be9c0d2801 100644
--- a/Mage.Sets/src/mage/cards/a/ArtisanOfForms.java
+++ b/Mage.Sets/src/mage/cards/a/ArtisanOfForms.java
@@ -27,6 +27,7 @@
*/
package mage.cards.a;
+import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
@@ -42,8 +43,6 @@ import mage.game.permanent.Permanent;
import mage.target.common.TargetCreaturePermanent;
import mage.util.functions.ApplyToPermanent;
-import java.util.UUID;
-
/**
*
* @author LevelX2
@@ -51,7 +50,7 @@ import java.util.UUID;
public class ArtisanOfForms extends CardImpl {
public ArtisanOfForms(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
this.subtype.add("Human");
this.subtype.add("Wizard");
@@ -79,7 +78,7 @@ public class ArtisanOfForms extends CardImpl {
class ArtisanOfFormsApplyToPermanent extends ApplyToPermanent {
@Override
- public boolean apply(Game game, MageObject mageObject) {
+ public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
Effect effect = new CopyPermanentEffect(new ArtisanOfFormsApplyToPermanent());
effect.setText("have {this} become a copy of target creature and gain this ability");
mageObject.getAbilities().add(new HeroicAbility(effect, true));
@@ -87,7 +86,7 @@ class ArtisanOfFormsApplyToPermanent extends ApplyToPermanent {
}
@Override
- public boolean apply(Game game, Permanent permanent) {
+ public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
Effect effect = new CopyPermanentEffect(new ArtisanOfFormsApplyToPermanent());
effect.setText("have {this} become a copy of target creature and gain this ability");
permanent.addAbility(new HeroicAbility(effect, true), game);
diff --git a/Mage.Sets/src/mage/cards/a/AsForetold.java b/Mage.Sets/src/mage/cards/a/AsForetold.java
index 62b523ddd02..5618da6ee0a 100644
--- a/Mage.Sets/src/mage/cards/a/AsForetold.java
+++ b/Mage.Sets/src/mage/cards/a/AsForetold.java
@@ -60,7 +60,7 @@ import mage.watchers.Watcher;
public class AsForetold extends CardImpl {
public AsForetold(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}");
-
+
// At the beginning of your upkeep, put a time counter on As Foretold.
addAbility(
@@ -145,7 +145,7 @@ class AsForetoldAlternativeCost extends AlternativeCostSourceAbility {
class AsForetoldAddAltCostEffect extends ContinuousEffectImpl {
public AsForetoldAddAltCostEffect() {
super(Duration.WhileOnBattlefield, Outcome.Benefit);
- staticText = "Once each turn, you may pay {0} rather than pay the mana cost for a spelly ou cast with converted mana cost X or less, where X is the number of time counters on {this}.";
+ staticText = "Once each turn, you may pay {0} rather than pay the mana cost for a spell you cast with converted mana cost X or less, where X is the number of time counters on {this}.";
}
public AsForetoldAddAltCostEffect(final AsForetoldAddAltCostEffect effect) {
diff --git a/Mage.Sets/src/mage/cards/a/AssaultBattery.java b/Mage.Sets/src/mage/cards/a/AssaultBattery.java
index 09adaa9431c..edc35131005 100644
--- a/Mage.Sets/src/mage/cards/a/AssaultBattery.java
+++ b/Mage.Sets/src/mage/cards/a/AssaultBattery.java
@@ -25,30 +25,23 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
-
package mage.cards.a;
+import java.util.UUID;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
+import mage.constants.SpellAbilityType;
import mage.game.permanent.token.ElephantToken;
import mage.target.common.TargetCreatureOrPlayer;
-import java.util.UUID;
-
-/**
- *
- * @author LevelX2
- */
-
-
public class AssaultBattery extends SplitCard {
public AssaultBattery(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{R}","{3}{G}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{R}", "{3}{G}", SpellAbilityType.SPLIT);
// Assault
// Assault deals 2 damage to target creature or player.
diff --git a/Mage.Sets/src/mage/cards/a/AvenWindGuide.java b/Mage.Sets/src/mage/cards/a/AvenWindGuide.java
index e1a2cdb2735..e308e67ceb0 100644
--- a/Mage.Sets/src/mage/cards/a/AvenWindGuide.java
+++ b/Mage.Sets/src/mage/cards/a/AvenWindGuide.java
@@ -35,15 +35,14 @@ import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.Effect;
import mage.abilities.keyword.EmbalmAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
-import mage.cards.v.Vigilance;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.filter.StaticFilters;
-import mage.filter.predicate.permanent.TokenPredicate;
/**
*
@@ -53,7 +52,7 @@ public class AvenWindGuide extends CardImpl {
public AvenWindGuide(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{U}");
-
+
this.subtype.add("Bird");
this.subtype.add("Warrior");
this.power = new MageInt(2);
@@ -66,18 +65,18 @@ public class AvenWindGuide extends CardImpl {
this.addAbility(VigilanceAbility.getInstance());
// Creature tokens you control have flying and vigilance.
- Ability ability =
- new SimpleStaticAbility(
- Zone.BATTLEFIELD,
- new GainAbilityControlledEffect(
+ Effect effect = new GainAbilityControlledEffect(
FlyingAbility.getInstance(),
Duration.WhileOnBattlefield,
- StaticFilters.FILTER_CREATURE_TOKENS));
- ability.addEffect(
- new GainAbilityControlledEffect(
+ StaticFilters.FILTER_CREATURE_TOKENS);
+ effect.setText("Creature tokens you control have flying");
+ Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
+ effect = new GainAbilityControlledEffect(
VigilanceAbility.getInstance(),
Duration.WhileOnBattlefield,
- StaticFilters.FILTER_CREATURE_TOKENS));
+ StaticFilters.FILTER_CREATURE_TOKENS);
+ effect.setText("and vigilance");
+ ability.addEffect(effect);
this.addAbility(ability);
// Embalm {4}{W}{U}
diff --git a/Mage.Sets/src/mage/cards/b/BeckCall.java b/Mage.Sets/src/mage/cards/b/BeckCall.java
index 23c405148de..b0e823795c4 100644
--- a/Mage.Sets/src/mage/cards/b/BeckCall.java
+++ b/Mage.Sets/src/mage/cards/b/BeckCall.java
@@ -27,6 +27,7 @@
*/
package mage.cards.b;
+import java.util.UUID;
import mage.abilities.DelayedTriggeredAbility;
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
import mage.abilities.effects.common.CreateTokenEffect;
@@ -35,6 +36,7 @@ import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Duration;
+import mage.constants.SpellAbilityType;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
import mage.game.events.GameEvent;
@@ -42,12 +44,10 @@ import mage.game.events.GameEvent.EventType;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.BirdToken;
-import java.util.UUID;
-
public class BeckCall extends SplitCard {
public BeckCall(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{G}{U}","{4}{W}{U}",true);
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}{U}", "{4}{W}{U}", SpellAbilityType.SPLIT_FUSED);
// Beck
// Whenever a creature enters the battlefield this turn, you may draw a card.
diff --git a/Mage.Sets/src/mage/cards/b/BonePicker.java b/Mage.Sets/src/mage/cards/b/BonePicker.java
index 634e3cd278b..8ad905c6b95 100644
--- a/Mage.Sets/src/mage/cards/b/BonePicker.java
+++ b/Mage.Sets/src/mage/cards/b/BonePicker.java
@@ -97,7 +97,7 @@ class BonePickerCostAdjustmentAbility extends SimpleStaticAbility implements Adj
@Override
public String getRule() {
- return "If a creature died this turn, {this} costs 3 less to cast.";
+ return "If a creature died this turn, {this} costs {3} less to cast.";
}
@Override
diff --git a/Mage.Sets/src/mage/cards/b/BontuTheGlorified.java b/Mage.Sets/src/mage/cards/b/BontuTheGlorified.java
index 49836fc48d0..a0748bad7d5 100644
--- a/Mage.Sets/src/mage/cards/b/BontuTheGlorified.java
+++ b/Mage.Sets/src/mage/cards/b/BontuTheGlorified.java
@@ -61,7 +61,7 @@ import mage.watchers.common.CreaturesDiedWatcher;
*/
public class BontuTheGlorified extends CardImpl {
- private static final FilterControlledPermanent filter = new FilterControlledPermanent();
+ private static final FilterControlledPermanent filter = new FilterControlledPermanent("another creature");
static {
filter.add(new AnotherPredicate());
diff --git a/Mage.Sets/src/mage/cards/b/BoomBust.java b/Mage.Sets/src/mage/cards/b/BoomBust.java
index d34e28e3563..7edf763ed8d 100644
--- a/Mage.Sets/src/mage/cards/b/BoomBust.java
+++ b/Mage.Sets/src/mage/cards/b/BoomBust.java
@@ -27,19 +27,19 @@
*/
package mage.cards.b;
+import java.util.UUID;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DestroyAllEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
+import mage.constants.SpellAbilityType;
import mage.constants.TargetController;
import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.target.TargetPermanent;
-import java.util.UUID;
-
public class BoomBust extends SplitCard {
private static final FilterLandPermanent filter1 = new FilterLandPermanent("land you control");
@@ -51,7 +51,7 @@ public class BoomBust extends SplitCard {
}
public BoomBust(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{R}","{5}{R}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}", "{5}{R}", SpellAbilityType.SPLIT);
// Boom
// Destroy target land you control and target land you don't control.
diff --git a/Mage.Sets/src/mage/cards/b/BoundDetermined.java b/Mage.Sets/src/mage/cards/b/BoundDetermined.java
index 10964581fec..f70f4127ac0 100644
--- a/Mage.Sets/src/mage/cards/b/BoundDetermined.java
+++ b/Mage.Sets/src/mage/cards/b/BoundDetermined.java
@@ -27,6 +27,7 @@
*/
package mage.cards.b;
+import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
@@ -40,6 +41,7 @@ import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
+import mage.constants.SpellAbilityType;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.FilterSpell;
@@ -53,8 +55,6 @@ import mage.players.Player;
import mage.target.common.TargetCardInYourGraveyard;
import mage.target.common.TargetControlledPermanent;
-import java.util.UUID;
-
/**
*
* @author LevelX2
@@ -68,7 +68,7 @@ public class BoundDetermined extends SplitCard {
}
public BoundDetermined(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{B}{G}","{G}{U}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{B}{G}", "{G}{U}", SpellAbilityType.SPLIT);
// Bound
// Sacrifice a creature. Return up to X cards from your graveyard to your hand, where X is the number of colors that creature was. Exile this card.
diff --git a/Mage.Sets/src/mage/cards/b/BountyOfTheLuxa.java b/Mage.Sets/src/mage/cards/b/BountyOfTheLuxa.java
index c256b456954..b384a567ed5 100644
--- a/Mage.Sets/src/mage/cards/b/BountyOfTheLuxa.java
+++ b/Mage.Sets/src/mage/cards/b/BountyOfTheLuxa.java
@@ -1,112 +1,116 @@
-/*
- * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * The views and conclusions contained in the software and documentation are those of the
- * authors and should not be interpreted as representing official policies, either expressed
- * or implied, of BetaSteward_at_googlemail.com.
- */
-package mage.cards.b;
-
-import mage.cards.CardImpl;
-import mage.cards.CardSetInfo;
-import mage.constants.CardType;
-import java.util.UUID;
-import mage.Mana;
-import mage.abilities.Ability;
-import mage.abilities.common.BeginningOfPreCombatMainTriggeredAbility;
-import mage.abilities.effects.OneShotEffect;
-import mage.abilities.effects.common.DrawCardSourceControllerEffect;
-import mage.abilities.effects.common.counter.AddCountersSourceEffect;
-import mage.constants.Outcome;
-import mage.constants.TargetController;
-import mage.counters.CounterType;
-import mage.game.Game;
-import mage.game.permanent.Permanent;
-import mage.players.Player;
-
-/**
- *
- * @author jeffwadsworth
- */
-public class BountyOfTheLuxa extends CardImpl {
-
- public BountyOfTheLuxa(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}{U}");
-
- //At the beginning of your precombat main phase, remove all flood counters from Bounty of the Luxa. If no flood counters were removed this way, put a flood counter on Bounty of the Luxa and draw a card. Otherwise, add {C}{G}{U} to your mana pool.
- this.addAbility(new BeginningOfPreCombatMainTriggeredAbility(new BountyOfTheLuxaEffect(), TargetController.YOU, false));
-
- }
-
- public BountyOfTheLuxa(final BountyOfTheLuxa card) {
- super(card);
- }
-
- @Override
- public BountyOfTheLuxa copy() {
- return new BountyOfTheLuxa(this);
- }
-
-}
-
-class BountyOfTheLuxaEffect extends OneShotEffect {
-
- public BountyOfTheLuxaEffect() {
- super(Outcome.Benefit);
- staticText = "remove all flood counters from {this}. If no flood counters were removed this way, put a flood counter on {this} and draw a card. Otherwise, add {C}{G}{U} to your mana pool";
- }
-
- public BountyOfTheLuxaEffect(final BountyOfTheLuxaEffect effect) {
- super(effect);
- }
-
- @Override
- public BountyOfTheLuxaEffect copy() {
- return new BountyOfTheLuxaEffect(this);
- }
-
- @Override
- public boolean apply(Game game, Ability source) {
- Player controller = game.getPlayer(source.getControllerId());
- Permanent bountyOfLuxa = game.getPermanent(source.getSourceId());
- if (controller != null
- && bountyOfLuxa != null) {
- if (bountyOfLuxa.getCounters(game).getCount(CounterType.FLOOD) > 0) {
- bountyOfLuxa.removeCounters(CounterType.FLOOD.createInstance(bountyOfLuxa.getCounters(game).getCount(CounterType.FLOOD)), game);
- if (bountyOfLuxa.getCounters(game).getCount(CounterType.FLOOD) == 0) {
- Mana manaToAdd = new Mana();
- manaToAdd.increaseColorless();
- manaToAdd.increaseGreen();
- manaToAdd.increaseBlue();
- controller.getManaPool().addMana(manaToAdd, game, source);
- }
- } else {
- new AddCountersSourceEffect(CounterType.FLOOD.createInstance()).apply(game, source);
- new DrawCardSourceControllerEffect(1).apply(game, source);
- }
- 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.cards.b;
+
+import java.util.UUID;
+import mage.Mana;
+import mage.abilities.Ability;
+import mage.abilities.common.BeginningOfPreCombatMainTriggeredAbility;
+import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.counter.AddCountersSourceEffect;
+import mage.cards.CardImpl;
+import mage.cards.CardSetInfo;
+import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.TargetController;
+import mage.counters.CounterType;
+import mage.game.Game;
+import mage.game.permanent.Permanent;
+import mage.players.Player;
+
+/**
+ *
+ * @author jeffwadsworth
+ */
+public class BountyOfTheLuxa extends CardImpl {
+
+ public BountyOfTheLuxa(UUID ownerId, CardSetInfo setInfo) {
+ super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}{U}");
+
+ //At the beginning of your precombat main phase, remove all flood counters from Bounty of the Luxa. If no counters were removed this way, put a flood counter on Bounty of the Luxa and draw a card. Otherwise, add {C}{G}{U} to your mana pool.
+ this.addAbility(new BeginningOfPreCombatMainTriggeredAbility(new BountyOfTheLuxaEffect(), TargetController.YOU, false));
+
+ }
+
+ public BountyOfTheLuxa(final BountyOfTheLuxa card) {
+ super(card);
+ }
+
+ @Override
+ public BountyOfTheLuxa copy() {
+ return new BountyOfTheLuxa(this);
+ }
+
+}
+
+class BountyOfTheLuxaEffect extends OneShotEffect {
+
+ public BountyOfTheLuxaEffect() {
+ super(Outcome.Benefit);
+ staticText = "remove all flood counters from {this}. If no counters were removed this way, put a flood counter on {this} and draw a card. Otherwise, add {C}{G}{U} to your mana pool";
+ }
+
+ public BountyOfTheLuxaEffect(final BountyOfTheLuxaEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public BountyOfTheLuxaEffect copy() {
+ return new BountyOfTheLuxaEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Player controller = game.getPlayer(source.getControllerId());
+ Permanent bountyOfLuxa = game.getPermanent(source.getSourceId());
+ if (bountyOfLuxa != null && bountyOfLuxa.getZoneChangeCounter(game) != source.getSourceObjectZoneChangeCounter()) {
+ bountyOfLuxa = null;
+ }
+ if (controller != null) {
+ if (bountyOfLuxa != null
+ && bountyOfLuxa.getCounters(game).getCount(CounterType.FLOOD) > 0) {
+ bountyOfLuxa.removeCounters(CounterType.FLOOD.createInstance(bountyOfLuxa.getCounters(game).getCount(CounterType.FLOOD)), game);
+ if (bountyOfLuxa.getCounters(game).getCount(CounterType.FLOOD) == 0) {
+ Mana manaToAdd = new Mana();
+ manaToAdd.increaseColorless();
+ manaToAdd.increaseGreen();
+ manaToAdd.increaseBlue();
+ controller.getManaPool().addMana(manaToAdd, game, source);
+ }
+ } else {
+ if (bountyOfLuxa != null) {
+ new AddCountersSourceEffect(CounterType.FLOOD.createInstance()).apply(game, source);
+ }
+ controller.drawCards(1, game);
+ }
+ return true;
+ }
+ return false;
+ }
+
+}
diff --git a/Mage.Sets/src/mage/cards/b/BreakingEntering.java b/Mage.Sets/src/mage/cards/b/BreakingEntering.java
index 5d0e70353e8..3f2cb0e954e 100644
--- a/Mage.Sets/src/mage/cards/b/BreakingEntering.java
+++ b/Mage.Sets/src/mage/cards/b/BreakingEntering.java
@@ -27,6 +27,7 @@
*/
package mage.cards.b;
+import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect;
@@ -39,6 +40,7 @@ import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
+import mage.constants.SpellAbilityType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
@@ -48,12 +50,10 @@ import mage.target.TargetPlayer;
import mage.target.common.TargetCardInGraveyard;
import mage.target.targetpointer.FixedTarget;
-import java.util.UUID;
-
public class BreakingEntering extends SplitCard {
public BreakingEntering(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{U}{B}","{4}{B}{R}",true);
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{U}{B}", "{4}{B}{R}", SpellAbilityType.SPLIT_FUSED);
// Breaking
// Target player puts the top eight cards of his or her library into his or her graveyard.
diff --git a/Mage.Sets/src/mage/cards/c/CatchRelease.java b/Mage.Sets/src/mage/cards/c/CatchRelease.java
index 2fba82fa900..6b7f771e430 100644
--- a/Mage.Sets/src/mage/cards/c/CatchRelease.java
+++ b/Mage.Sets/src/mage/cards/c/CatchRelease.java
@@ -27,6 +27,9 @@
*/
package mage.cards.c;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
@@ -39,6 +42,7 @@ import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
+import mage.constants.SpellAbilityType;
import mage.filter.FilterPermanent;
import mage.filter.common.*;
import mage.game.Game;
@@ -48,14 +52,10 @@ import mage.target.Target;
import mage.target.TargetPermanent;
import mage.target.common.TargetControlledPermanent;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-
public class CatchRelease extends SplitCard {
public CatchRelease(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{U}{R}","{4}{R}{W}",true);
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{U}{R}", "{4}{R}{W}", SpellAbilityType.SPLIT_FUSED);
// Catch
// Gain control of target permanent until end of turn. Untap it. It gains haste until end of turn.
diff --git a/Mage.Sets/src/mage/cards/c/CombatCelebrant.java b/Mage.Sets/src/mage/cards/c/CombatCelebrant.java
index 8fe14ab982a..ddb5d96efeb 100644
--- a/Mage.Sets/src/mage/cards/c/CombatCelebrant.java
+++ b/Mage.Sets/src/mage/cards/c/CombatCelebrant.java
@@ -45,12 +45,6 @@ import mage.filter.predicate.permanent.AnotherPredicate;
*/
public class CombatCelebrant extends CardImpl {
- private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("other creatures you control");
-
- static {
- filter.add(new AnotherPredicate());
- }
-
public CombatCelebrant(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
@@ -60,7 +54,7 @@ public class CombatCelebrant extends CardImpl {
this.toughness = new MageInt(1);
// If Combat Celebrant hasn't been exerted this turn, you may exert it as it attacks. When you do, untap all other creatures you control and after this phase, there is an additional combat phase.
- BecomesExertSourceTriggeredAbility ability = new BecomesExertSourceTriggeredAbility(new UntapAllControllerEffect(filter));
+ BecomesExertSourceTriggeredAbility ability = new BecomesExertSourceTriggeredAbility(new UntapAllControllerEffect(new FilterControlledCreaturePermanent(), null, false));
ability.addEffect(new AdditionalCombatPhaseEffect("and after this phase, there is an additional combat phase"));
this.addAbility(new ExertAbility(ability, true));
}
diff --git a/Mage.Sets/src/mage/cards/c/CommitMemory.java b/Mage.Sets/src/mage/cards/c/CommitMemory.java
index 44dd82778b0..dcd63f6ed8e 100644
--- a/Mage.Sets/src/mage/cards/c/CommitMemory.java
+++ b/Mage.Sets/src/mage/cards/c/CommitMemory.java
@@ -39,6 +39,7 @@ import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Outcome;
+import mage.constants.SpellAbilityType;
import mage.constants.Zone;
import mage.filter.common.FilterSpellOrPermanent;
import mage.filter.predicate.Predicates;
@@ -62,7 +63,7 @@ public class CommitMemory extends SplitCard {
}
public CommitMemory(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY}, "{3}{U}", "{4}{U}{U}", false);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY}, "{3}{U}", "{4}{U}{U}", SpellAbilityType.SPLIT_AFTERMATH);
// Commit
// Put target spell or nonland permanent into its owner's library second from the top.
@@ -72,7 +73,7 @@ public class CommitMemory extends SplitCard {
// Memory
// Aftermath
// Each player shuffles his or her hand and graveyard into his or her library, then draws seven cards.
- ((CardImpl)(getRightHalfCard())).addAbility(new AftermathAbility());
+ ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
getRightHalfCard().getSpellAbility().addEffect(new MemoryEffect());
Effect effect = new DrawCardAllEffect(7);
effect.setText(", then draws seven cards");
diff --git a/Mage.Sets/src/mage/cards/c/CompulsoryRest.java b/Mage.Sets/src/mage/cards/c/CompulsoryRest.java
index 2b3da68be1b..33399d62341 100644
--- a/Mage.Sets/src/mage/cards/c/CompulsoryRest.java
+++ b/Mage.Sets/src/mage/cards/c/CompulsoryRest.java
@@ -1,87 +1,90 @@
-/*
- * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * The views and conclusions contained in the software and documentation are those of the
- * authors and should not be interpreted as representing official policies, either expressed
- * or implied, of BetaSteward_at_googlemail.com.
- */
-package mage.cards.c;
-
-import java.util.UUID;
-import mage.target.common.TargetCreaturePermanent;
-import mage.abilities.Ability;
-import mage.abilities.common.SimpleActivatedAbility;
-import mage.abilities.common.SimpleStaticAbility;
-import mage.abilities.costs.common.SacrificeSourceCost;
-import mage.abilities.costs.mana.GenericManaCost;
-import mage.abilities.effects.common.AttachEffect;
-import mage.abilities.effects.common.GainLifeEffect;
-import mage.abilities.effects.common.combat.CantAttackBlockAttachedEffect;
-import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
-import mage.constants.Outcome;
-import mage.target.TargetPermanent;
-import mage.abilities.keyword.EnchantAbility;
-import mage.cards.CardImpl;
-import mage.cards.CardSetInfo;
-import mage.constants.AttachmentType;
-import mage.constants.CardType;
-import mage.constants.Duration;
-import mage.constants.Zone;
-
-/**
- *
- * @author Styxo
- */
-public class CompulsoryRest extends CardImpl {
-
- public CompulsoryRest(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
-
- this.subtype.add("Aura");
-
- // Enchant creature
- TargetPermanent auraTarget = new TargetCreaturePermanent();
- this.getSpellAbility().addTarget(auraTarget);
- this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
- Ability ability = new EnchantAbility(auraTarget.getTargetName());
- this.addAbility(ability);
-
- // Enchanted creature can't attack or block.
- this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackBlockAttachedEffect(AttachmentType.AURA)));
-
- // Enchanted creature has "{2}, Sacrifice this creature: You gain 2 life."
- Ability grantedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(2), new GenericManaCost(2));
- grantedAbility.addCost(new SacrificeSourceCost());
- this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(grantedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield)));
-
- }
-
- public CompulsoryRest(final CompulsoryRest card) {
- super(card);
- }
-
- @Override
- public CompulsoryRest copy() {
- return new CompulsoryRest(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.cards.c;
+
+import java.util.UUID;
+import mage.target.common.TargetCreaturePermanent;
+import mage.abilities.Ability;
+import mage.abilities.common.SimpleActivatedAbility;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.costs.Cost;
+import mage.abilities.costs.common.SacrificeSourceCost;
+import mage.abilities.costs.mana.GenericManaCost;
+import mage.abilities.effects.common.AttachEffect;
+import mage.abilities.effects.common.GainLifeEffect;
+import mage.abilities.effects.common.combat.CantAttackBlockAttachedEffect;
+import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
+import mage.constants.Outcome;
+import mage.target.TargetPermanent;
+import mage.abilities.keyword.EnchantAbility;
+import mage.cards.CardImpl;
+import mage.cards.CardSetInfo;
+import mage.constants.AttachmentType;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.Zone;
+
+/**
+ *
+ * @author Styxo
+ */
+public class CompulsoryRest extends CardImpl {
+
+ public CompulsoryRest(UUID ownerId, CardSetInfo setInfo) {
+ super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
+
+ this.subtype.add("Aura");
+
+ // Enchant creature
+ TargetPermanent auraTarget = new TargetCreaturePermanent();
+ this.getSpellAbility().addTarget(auraTarget);
+ this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
+ Ability ability = new EnchantAbility(auraTarget.getTargetName());
+ this.addAbility(ability);
+
+ // Enchanted creature can't attack or block.
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackBlockAttachedEffect(AttachmentType.AURA)));
+
+ // Enchanted creature has "{2}, Sacrifice this creature: You gain 2 life."
+ Ability grantedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(2), new GenericManaCost(2));
+ Cost cost = new SacrificeSourceCost();
+ cost.setText("Sacrifice this creature");
+ grantedAbility.addCost(cost);
+ this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(grantedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield)));
+
+ }
+
+ public CompulsoryRest(final CompulsoryRest card) {
+ super(card);
+ }
+
+ @Override
+ public CompulsoryRest copy() {
+ return new CompulsoryRest(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/cards/c/CrimePunishment.java b/Mage.Sets/src/mage/cards/c/CrimePunishment.java
index d301d9426de..39788d32728 100644
--- a/Mage.Sets/src/mage/cards/c/CrimePunishment.java
+++ b/Mage.Sets/src/mage/cards/c/CrimePunishment.java
@@ -25,9 +25,9 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
-
package mage.cards.c;
+import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
@@ -35,6 +35,7 @@ import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Outcome;
+import mage.constants.SpellAbilityType;
import mage.filter.FilterCard;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
@@ -42,20 +43,17 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.common.TargetCardInOpponentsGraveyard;
-import java.util.UUID;
-
-
-
public class CrimePunishment extends SplitCard {
-
+
private static final FilterCard filter = new FilterCard("creature or enchantment card from an opponent's graveyard");
+
static {
filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE),
- new CardTypePredicate(CardType.ENCHANTMENT)));
+ new CardTypePredicate(CardType.ENCHANTMENT)));
}
public CrimePunishment(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{W}{B}","{X}{B}{G}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{W}{B}", "{X}{B}{G}", SpellAbilityType.SPLIT);
// Crime
// Put target creature or enchantment card from an opponent's graveyard onto the battlefield under your control.
@@ -79,29 +77,29 @@ public class CrimePunishment extends SplitCard {
}
class PunishmentEffect extends OneShotEffect {
-
+
PunishmentEffect() {
super(Outcome.DestroyPermanent);
this.staticText = "Destroy each artifact, creature, and enchantment with converted mana cost X";
}
-
+
PunishmentEffect(final PunishmentEffect effect) {
super(effect);
}
-
+
@Override
public PunishmentEffect copy() {
return new PunishmentEffect(this);
}
-
+
@Override
public boolean apply(Game game, Ability source) {
for (Permanent permanent : game.getBattlefield().getActivePermanents(source.getControllerId(), game)) {
if (permanent != null
&& permanent.getConvertedManaCost() == source.getManaCostsToPay().getX()
&& (permanent.isArtifact()
- || permanent.isCreature()
- || permanent.isEnchantment())) {
+ || permanent.isCreature()
+ || permanent.isEnchantment())) {
permanent.destroy(source.getSourceId(), game, false);
}
}
diff --git a/Mage.Sets/src/mage/cards/c/Cryptoplasm.java b/Mage.Sets/src/mage/cards/c/Cryptoplasm.java
index 9ce1d174c46..6a01c6f0a7f 100644
--- a/Mage.Sets/src/mage/cards/c/Cryptoplasm.java
+++ b/Mage.Sets/src/mage/cards/c/Cryptoplasm.java
@@ -27,6 +27,7 @@
*/
package mage.cards.c;
+import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
@@ -44,8 +45,6 @@ import mage.game.permanent.Permanent;
import mage.target.common.TargetCreaturePermanent;
import mage.util.functions.ApplyToPermanent;
-import java.util.UUID;
-
/**
* @author Loki
*/
@@ -58,7 +57,7 @@ public class Cryptoplasm extends CardImpl {
}
public Cryptoplasm(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}");
this.subtype.add("Shapeshifter");
this.power = new MageInt(2);
@@ -103,7 +102,7 @@ class CryptoplasmEffect extends OneShotEffect {
if (creatureToCopy != null) {
ApplyToPermanent applier = new ApplyToPermanent() {
@Override
- public boolean apply(Game game, Permanent permanent) {
+ public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
Ability upkeepAbility = new BeginningOfUpkeepTriggeredAbility(new CryptoplasmEffect(), TargetController.YOU, true);
upkeepAbility.addTarget(new TargetCreaturePermanent());
permanent.addAbility(upkeepAbility, source.getSourceId(), game);
@@ -111,7 +110,7 @@ class CryptoplasmEffect extends OneShotEffect {
}
@Override
- public boolean apply(Game game, MageObject mageObject) {
+ public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
Ability upkeepAbility = new BeginningOfUpkeepTriggeredAbility(new CryptoplasmEffect(), TargetController.YOU, true);
upkeepAbility.addTarget(new TargetCreaturePermanent());
mageObject.getAbilities().add(upkeepAbility);
diff --git a/Mage.Sets/src/mage/cards/c/CutRibbons.java b/Mage.Sets/src/mage/cards/c/CutRibbons.java
index 551324b99be..30abdaf1aaa 100644
--- a/Mage.Sets/src/mage/cards/c/CutRibbons.java
+++ b/Mage.Sets/src/mage/cards/c/CutRibbons.java
@@ -1,5 +1,6 @@
package mage.cards.c;
+import java.util.UUID;
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
@@ -8,17 +9,16 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
+import mage.constants.SpellAbilityType;
import mage.target.common.TargetCreaturePermanent;
-import java.util.UUID;
-
/**
* @author Stravant
*/
public class CutRibbons extends SplitCard {
public CutRibbons(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}", "{X}{B}{B}", false);
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, new CardType[]{CardType.SORCERY}, "{1}{R}", "{X}{B}{B}", SpellAbilityType.SPLIT_AFTERMATH);
// Cut
// Cut deals 4 damage to target creature.
@@ -26,7 +26,6 @@ public class CutRibbons extends SplitCard {
getLeftHalfCard().getSpellAbility().addEffect(new DamageTargetEffect(4));
// to
-
// Ribbons
// Each opponent loses X life.
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
diff --git a/Mage.Sets/src/mage/cards/d/DacksDuplicate.java b/Mage.Sets/src/mage/cards/d/DacksDuplicate.java
index eb51d754324..2ad15c3f0c1 100644
--- a/Mage.Sets/src/mage/cards/d/DacksDuplicate.java
+++ b/Mage.Sets/src/mage/cards/d/DacksDuplicate.java
@@ -27,8 +27,10 @@
*/
package mage.cards.d;
+import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
+import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CopyPermanentEffect;
@@ -42,8 +44,6 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.util.functions.ApplyToPermanent;
-import java.util.UUID;
-
/**
*
* @author LevelX2
@@ -51,7 +51,7 @@ import java.util.UUID;
public class DacksDuplicate extends CardImpl {
public DacksDuplicate(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{R}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{R}");
this.subtype.add("Shapeshifter");
this.power = new MageInt(0);
@@ -76,7 +76,7 @@ public class DacksDuplicate extends CardImpl {
class DacksDuplicateApplyToPermanent extends ApplyToPermanent {
@Override
- public boolean apply(Game game, Permanent permanent) {
+ public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
/**
* 29/05/2014 The ability of Dack’s Duplicate doesn’t target the
* creature.
@@ -87,7 +87,7 @@ class DacksDuplicateApplyToPermanent extends ApplyToPermanent {
}
@Override
- public boolean apply(Game game, MageObject mageObject) {
+ public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
mageObject.getAbilities().add(new DethroneAbility());
mageObject.getAbilities().add(HasteAbility.getInstance());
return true;
diff --git a/Mage.Sets/src/mage/cards/d/DeadGone.java b/Mage.Sets/src/mage/cards/d/DeadGone.java
index 560348b79bf..22eabe88201 100644
--- a/Mage.Sets/src/mage/cards/d/DeadGone.java
+++ b/Mage.Sets/src/mage/cards/d/DeadGone.java
@@ -1,30 +1,31 @@
package mage.cards.d;
+import java.util.UUID;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.Card;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
+import mage.constants.SpellAbilityType;
import mage.constants.TargetController;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.target.common.TargetCreaturePermanent;
-import java.util.UUID;
-
/**
* @author dustinconrad
*/
public class DeadGone extends SplitCard {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control");
+
static {
filter.add(new ControllerPredicate(TargetController.NOT_YOU));
}
public DeadGone(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}","{2}{R}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}", "{2}{R}", SpellAbilityType.SPLIT);
// Dead
// Dead deals 2 damage to target creature.
diff --git a/Mage.Sets/src/mage/cards/d/Decompose.java b/Mage.Sets/src/mage/cards/d/Decompose.java
index 4dceecffe6b..d27d07b5882 100644
--- a/Mage.Sets/src/mage/cards/d/Decompose.java
+++ b/Mage.Sets/src/mage/cards/d/Decompose.java
@@ -47,7 +47,7 @@ public class Decompose extends CardImpl {
// Exile up to three target cards from a single graveyard.
this.getSpellAbility().addEffect(new ExileTargetEffect());
- this.getSpellAbility().addTarget(new TargetCardInASingleGraveyard(0, 3, new FilterCard("cards")));
+ this.getSpellAbility().addTarget(new TargetCardInASingleGraveyard(0, 3, new FilterCard("cards from a single graveyard")));
}
public Decompose(final Decompose card) {
diff --git a/Mage.Sets/src/mage/cards/d/DestinedLead.java b/Mage.Sets/src/mage/cards/d/DestinedLead.java
index b7808914601..18824517760 100644
--- a/Mage.Sets/src/mage/cards/d/DestinedLead.java
+++ b/Mage.Sets/src/mage/cards/d/DestinedLead.java
@@ -25,9 +25,9 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
-
package mage.cards.d;
+import java.util.UUID;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.combat.MustBeBlockedByAllTargetEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
@@ -39,20 +39,13 @@ import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Duration;
+import mage.constants.SpellAbilityType;
import mage.target.common.TargetCreaturePermanent;
-import java.util.UUID;
-
-/**
- *
- * @author stravant
- */
-
-
public class DestinedLead extends SplitCard {
public DestinedLead(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY},"{1}{B}","{3}{G}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY}, "{1}{B}", "{3}{G}", SpellAbilityType.SPLIT_AFTERMATH);
// Destined
// Target creature gets +1/+0 and gains indestructible until end of turn.
@@ -66,10 +59,9 @@ public class DestinedLead extends SplitCard {
getLeftHalfCard().getSpellAbility().addEffect(effect);
// to
-
// Lead
// All creatures able to block target creature this turn must do so.
- ((CardImpl)(getRightHalfCard())).addAbility(new AftermathAbility());
+ ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
getRightHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
getRightHalfCard().getSpellAbility().addEffect(new MustBeBlockedByAllTargetEffect(Duration.EndOfTurn));
}
@@ -83,4 +75,3 @@ public class DestinedLead extends SplitCard {
return new DestinedLead(this);
}
}
-
diff --git a/Mage.Sets/src/mage/cards/d/DevotedCropMate.java b/Mage.Sets/src/mage/cards/d/DevotedCropMate.java
index 895dd3602e5..4f7251a732d 100644
--- a/Mage.Sets/src/mage/cards/d/DevotedCropMate.java
+++ b/Mage.Sets/src/mage/cards/d/DevotedCropMate.java
@@ -1,78 +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.cards.d;
-
-import java.util.UUID;
-import mage.MageInt;
-import mage.abilities.common.BecomesExertSourceTriggeredAbility;
-import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
-import mage.abilities.keyword.ExertAbility;
-import mage.cards.CardImpl;
-import mage.cards.CardSetInfo;
-import mage.constants.CardType;
-import mage.constants.ComparisonType;
-import mage.filter.common.FilterCreatureCard;
-import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
-import mage.target.common.TargetCardInYourGraveyard;
-
-/**
- *
- * @author Styxo
- */
-public class DevotedCropMate extends CardImpl {
-
- private static final FilterCreatureCard filter = new FilterCreatureCard("creature card with converted mana cost 2 or less from your graveyard");
-
- static {
- filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 3));
- }
-
- public DevotedCropMate(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
-
- this.subtype.add("Human");
- this.subtype.add("Warrior");
- this.power = new MageInt(3);
- this.toughness = new MageInt(2);
-
- // You may exert Devoted Crop-Mate as it attacks. When you do, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield.
- BecomesExertSourceTriggeredAbility ability = new BecomesExertSourceTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect());
- ability.addTarget(new TargetCardInYourGraveyard(filter));
- addAbility(new ExertAbility(ability));
-
- }
-
- public DevotedCropMate(final DevotedCropMate card) {
- super(card);
- }
-
- @Override
- public DevotedCropMate copy() {
- return new DevotedCropMate(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.cards.d;
+
+import java.util.UUID;
+import mage.MageInt;
+import mage.abilities.common.BecomesExertSourceTriggeredAbility;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
+import mage.abilities.keyword.ExertAbility;
+import mage.cards.CardImpl;
+import mage.cards.CardSetInfo;
+import mage.constants.CardType;
+import mage.constants.ComparisonType;
+import mage.filter.common.FilterCreatureCard;
+import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
+import mage.target.common.TargetCardInYourGraveyard;
+
+/**
+ *
+ * @author Styxo
+ */
+public class DevotedCropMate extends CardImpl {
+
+ private static final FilterCreatureCard filter = new FilterCreatureCard("creature card with converted mana cost 2 or less from your graveyard");
+
+ static {
+ filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 3));
+ }
+
+ public DevotedCropMate(UUID ownerId, CardSetInfo setInfo) {
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
+
+ this.subtype.add("Human");
+ this.subtype.add("Warrior");
+ this.power = new MageInt(3);
+ this.toughness = new MageInt(2);
+
+ // You may exert Devoted Crop-Mate as it attacks. When you do, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield.
+ Effect effect = new ReturnFromGraveyardToBattlefieldTargetEffect();
+ effect.setText("return target creature card with converted mana cost 2 or less from your graveyard to the battlefield");
+ BecomesExertSourceTriggeredAbility ability = new BecomesExertSourceTriggeredAbility(effect);
+ ability.addTarget(new TargetCardInYourGraveyard(filter));
+ addAbility(new ExertAbility(ability));
+
+ }
+
+ public DevotedCropMate(final DevotedCropMate card) {
+ super(card);
+ }
+
+ @Override
+ public DevotedCropMate copy() {
+ return new DevotedCropMate(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/cards/d/DimirDoppelganger.java b/Mage.Sets/src/mage/cards/d/DimirDoppelganger.java
index f81ac333125..c5203e307f1 100644
--- a/Mage.Sets/src/mage/cards/d/DimirDoppelganger.java
+++ b/Mage.Sets/src/mage/cards/d/DimirDoppelganger.java
@@ -27,6 +27,7 @@
*/
package mage.cards.d;
+import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
@@ -47,8 +48,6 @@ import mage.players.Player;
import mage.target.common.TargetCardInGraveyard;
import mage.util.functions.ApplyToPermanent;
-import java.util.UUID;
-
/**
*
* @author jeffwadsworth
@@ -110,7 +109,7 @@ class DimirDoppelgangerEffect extends OneShotEffect {
newBluePrint = new PermanentCard((Card) copyFromCard, source.getControllerId(), game);
newBluePrint.assignNewId();
ApplyToPermanent applier = new DimirDoppelgangerApplier();
- applier.apply(game, newBluePrint);
+ applier.apply(game, newBluePrint, source, dimirDoppelganger.getId());
CopyEffect copyEffect = new CopyEffect(Duration.Custom, newBluePrint, dimirDoppelganger.getId());
copyEffect.newId();
copyEffect.setApplier(applier);
@@ -127,7 +126,7 @@ class DimirDoppelgangerEffect extends OneShotEffect {
class DimirDoppelgangerApplier extends ApplyToPermanent {
@Override
- public boolean apply(Game game, Permanent permanent) {
+ public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DimirDoppelgangerEffect(), new ManaCostsImpl("{1}{U}{B}"));
ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card in a graveyard")));
permanent.getAbilities().add(ability);
@@ -135,7 +134,7 @@ class DimirDoppelgangerApplier extends ApplyToPermanent {
}
@Override
- public boolean apply(Game game, MageObject mageObject) {
+ public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DimirDoppelgangerEffect(), new ManaCostsImpl("{1}{U}{B}"));
ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card in a graveyard")));
mageObject.getAbilities().add(ability);
diff --git a/Mage.Sets/src/mage/cards/d/DownDirty.java b/Mage.Sets/src/mage/cards/d/DownDirty.java
index 1aedbb3d31f..fe4c76ced15 100644
--- a/Mage.Sets/src/mage/cards/d/DownDirty.java
+++ b/Mage.Sets/src/mage/cards/d/DownDirty.java
@@ -25,29 +25,22 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
-
package mage.cards.d;
+import java.util.UUID;
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.abilities.effects.common.discard.DiscardTargetEffect;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
+import mage.constants.SpellAbilityType;
import mage.target.TargetPlayer;
import mage.target.common.TargetCardInYourGraveyard;
-import java.util.UUID;
-
-/**
- *
- * @author LevelX2
- */
-
-
public class DownDirty extends SplitCard {
public DownDirty(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}","{2}{G}",true);
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}", "{2}{G}", SpellAbilityType.SPLIT_FUSED);
// Down
// Target player discards two cards.
diff --git a/Mage.Sets/src/mage/cards/d/DuskDawn.java b/Mage.Sets/src/mage/cards/d/DuskDawn.java
index e0b6d002333..247f8a50a0d 100644
--- a/Mage.Sets/src/mage/cards/d/DuskDawn.java
+++ b/Mage.Sets/src/mage/cards/d/DuskDawn.java
@@ -25,11 +25,11 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
-
package mage.cards.d;
+import java.util.Set;
+import java.util.UUID;
import mage.abilities.Ability;
-import mage.constants.ComparisonType;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DestroyAllEffect;
@@ -39,7 +39,9 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
+import mage.constants.ComparisonType;
import mage.constants.Outcome;
+import mage.constants.SpellAbilityType;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
@@ -48,23 +50,16 @@ import mage.filter.predicate.mageobject.PowerPredicate;
import mage.game.Game;
import mage.players.Player;
-import java.util.Set;
-import java.util.UUID;
-
-/**
- *
- * @author stravant
- */
-
-
public class DuskDawn extends SplitCard {
+
private static final FilterCreaturePermanent filterCreatures3orGreater = new FilterCreaturePermanent("creatures with power greater than or equal to 3");
+
static {
filterCreatures3orGreater.add(new PowerPredicate(ComparisonType.MORE_THAN, 2));
}
public DuskDawn(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{W}{W}","{3}{W}{W}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, new CardType[]{CardType.SORCERY}, "{2}{W}{W}", "{3}{W}{W}", SpellAbilityType.SPLIT_AFTERMATH);
// Dusk
// Destroy all creatures with power 3 or greater.
@@ -74,7 +69,7 @@ public class DuskDawn extends SplitCard {
// Dawn
// Return all creature cards with power less than or equal to 2 from your graveyard to your hand.
- ((CardImpl)(getRightHalfCard())).addAbility(new AftermathAbility());
+ ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
getRightHalfCard().getSpellAbility().addEffect(new DawnEffect());
}
@@ -92,6 +87,7 @@ public class DuskDawn extends SplitCard {
class DawnEffect extends OneShotEffect {
private static final FilterCard filter2orLess = new FilterCreatureCard("creatures with power less than or equal to 2");
+
static {
filter2orLess.add(new PowerPredicate(ComparisonType.FEWER_THAN, 3));
}
diff --git a/Mage.Sets/src/mage/cards/e/EnigmaDrake.java b/Mage.Sets/src/mage/cards/e/EnigmaDrake.java
index 4ba4683fb0e..c7e403ef48e 100644
--- a/Mage.Sets/src/mage/cards/e/EnigmaDrake.java
+++ b/Mage.Sets/src/mage/cards/e/EnigmaDrake.java
@@ -33,7 +33,6 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
import mage.abilities.effects.common.continuous.SetPowerSourceEffect;
import mage.abilities.keyword.FlyingAbility;
-import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@@ -59,7 +58,7 @@ public class EnigmaDrake extends CardImpl {
// Enigma Drakes's power is equal to the number of instant and sorcery cards in your graveyard.
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerSourceEffect(
- new CardsInControllerGraveyardCount(new FilterInstantOrSorceryCard("instant and sorcery cards in your graveyard")), Duration.EndOfGame)));
+ new CardsInControllerGraveyardCount(new FilterInstantOrSorceryCard("instant and sorcery cards")), Duration.EndOfGame)));
}
public EnigmaDrake(final EnigmaDrake card) {
diff --git a/Mage.Sets/src/mage/cards/e/EvilTwin.java b/Mage.Sets/src/mage/cards/e/EvilTwin.java
index 14c1201f6b6..22bbcd574a9 100644
--- a/Mage.Sets/src/mage/cards/e/EvilTwin.java
+++ b/Mage.Sets/src/mage/cards/e/EvilTwin.java
@@ -27,6 +27,7 @@
*/
package mage.cards.e;
+import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
@@ -49,8 +50,6 @@ import mage.game.permanent.Permanent;
import mage.target.common.TargetCreaturePermanent;
import mage.util.functions.ApplyToPermanent;
-import java.util.UUID;
-
/**
*
* @author BetaSteward
@@ -58,7 +57,7 @@ import java.util.UUID;
public class EvilTwin extends CardImpl {
public EvilTwin(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{B}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{B}");
this.subtype.add("Shapeshifter");
this.power = new MageInt(0);
@@ -90,7 +89,7 @@ class EvilTwinApplyToPermanent extends ApplyToPermanent {
}
@Override
- public boolean apply(Game game, Permanent permanent) {
+ public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{U}{B}"));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent(filter));
@@ -99,7 +98,7 @@ class EvilTwinApplyToPermanent extends ApplyToPermanent {
}
@Override
- public boolean apply(Game game, MageObject mageObject) {
+ public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{U}{B}"));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent(filter));
diff --git a/Mage.Sets/src/mage/cards/f/FaerieMacabre.java b/Mage.Sets/src/mage/cards/f/FaerieMacabre.java
index 51909bad25f..340d5e5e73a 100644
--- a/Mage.Sets/src/mage/cards/f/FaerieMacabre.java
+++ b/Mage.Sets/src/mage/cards/f/FaerieMacabre.java
@@ -29,22 +29,18 @@ package mage.cards.f;
import mage.MageInt;
import mage.abilities.Ability;
-import mage.abilities.Mode;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.DiscardSourceCost;
-import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.FlyingAbility;
-import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
-import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.FilterCard;
-import mage.game.Game;
import mage.target.common.TargetCardInGraveyard;
import java.util.UUID;
+import mage.abilities.effects.common.ExileTargetEffect;
/**
*
@@ -53,7 +49,7 @@ import java.util.UUID;
public class FaerieMacabre extends CardImpl {
public FaerieMacabre(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}");
this.subtype.add("Faerie");
this.subtype.add("Rogue");
@@ -63,7 +59,7 @@ public class FaerieMacabre extends CardImpl {
// Flying
this.addAbility(FlyingAbility.getInstance());
// Discard Faerie Macabre: Exile up to two target cards from graveyards.
- Ability ability = new SimpleActivatedAbility(Zone.HAND, new FaerieMacabreExileTargetEffect(), new DiscardSourceCost());
+ Ability ability = new SimpleActivatedAbility(Zone.HAND, new ExileTargetEffect(), new DiscardSourceCost());
ability.addTarget(new TargetCardInGraveyard(0, 2, new FilterCard("cards from graveyards")));
this.addAbility(ability);
}
@@ -77,35 +73,3 @@ public class FaerieMacabre extends CardImpl {
return new FaerieMacabre(this);
}
}
-
-class FaerieMacabreExileTargetEffect extends OneShotEffect {
-
- public FaerieMacabreExileTargetEffect() {
- super(Outcome.Exile);
- }
-
- public FaerieMacabreExileTargetEffect(final FaerieMacabreExileTargetEffect effect) {
- super(effect);
- }
-
- @Override
- public FaerieMacabreExileTargetEffect copy() {
- return new FaerieMacabreExileTargetEffect(this);
- }
-
- @Override
- public boolean apply(Game game, Ability source) {
- for(UUID uuid : source.getTargets().get(0).getTargets()){
- Card card = game.getCard(uuid);
- if (card != null) {
- card.moveToExile(null, "Faerie Macabre", source.getSourceId(), game);
- }
- }
- return true;
- }
-
- @Override
- public String getText(Mode mode) {
- return "Exile up to two target cards from graveyards";
- }
-}
diff --git a/Mage.Sets/src/mage/cards/f/FailureComply.java b/Mage.Sets/src/mage/cards/f/FailureComply.java
index 187cedcf021..8ed7542bf46 100644
--- a/Mage.Sets/src/mage/cards/f/FailureComply.java
+++ b/Mage.Sets/src/mage/cards/f/FailureComply.java
@@ -27,7 +27,13 @@
*/
package mage.cards.f;
+import java.util.UUID;
+import mage.MageObject;
import mage.abilities.Ability;
+import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.NameACardEffect;
+import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.keyword.AftermathAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -35,16 +41,11 @@ import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
+import mage.constants.SpellAbilityType;
import mage.game.Game;
import mage.game.events.GameEvent;
-import mage.target.TargetSpell;
-import mage.abilities.effects.common.ReturnToHandTargetEffect;
-import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
-import mage.MageObject;
import mage.game.events.GameEvent.EventType;
-import mage.abilities.effects.common.NameACardEffect;
-
-import java.util.UUID;
+import mage.target.TargetSpell;
/**
* @author spjspj
@@ -52,7 +53,7 @@ import java.util.UUID;
public class FailureComply extends SplitCard {
public FailureComply(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY}, "{1}{U}", "{W}", false);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY}, "{1}{U}", "{W}", SpellAbilityType.SPLIT_AFTERMATH);
// Failure
// Return target spell to it's owner's hand
@@ -63,7 +64,9 @@ public class FailureComply extends SplitCard {
// Comply
// Choose a card name. Until your next turn, your opponents can't cast spells with the chosen name
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
- getRightHalfCard().getSpellAbility().addEffect(new NameACardEffect(NameACardEffect.TypeOfName.ALL));
+ Effect effect = new NameACardEffect(NameACardEffect.TypeOfName.ALL);
+ effect.setText("Choose a card name");
+ getRightHalfCard().getSpellAbility().addEffect(effect);
getRightHalfCard().getSpellAbility().addEffect(new ComplyCantCastEffect());
}
@@ -81,7 +84,7 @@ class ComplyCantCastEffect extends ContinuousRuleModifyingEffectImpl {
public ComplyCantCastEffect() {
super(Duration.UntilYourNextTurn, Outcome.Benefit);
- staticText = "Your opponents can't cast spells with the chosen name";
+ staticText = "Until your next turn, your opponents can't cast spells with the chosen name";
}
public ComplyCantCastEffect(final ComplyCantCastEffect effect) {
diff --git a/Mage.Sets/src/mage/cards/f/FamishedGhoul.java b/Mage.Sets/src/mage/cards/f/FamishedGhoul.java
index e50230d2386..193aaeb313d 100644
--- a/Mage.Sets/src/mage/cards/f/FamishedGhoul.java
+++ b/Mage.Sets/src/mage/cards/f/FamishedGhoul.java
@@ -56,9 +56,9 @@ public class FamishedGhoul extends CardImpl {
this.toughness = new MageInt(2);
// {1}{B}, Sacrifice Famished Ghoul: Exile up to two target cards from a single graveyard.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect("Exile up to two target cards from a single graveyard"), new ManaCostsImpl("{1}{B}"));
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new ManaCostsImpl("{1}{B}"));
ability.addCost(new SacrificeSourceCost());
- ability.addTarget(new TargetCardInASingleGraveyard(0, 2, new FilterCard()));
+ ability.addTarget(new TargetCardInASingleGraveyard(0, 2, new FilterCard("cards from a single graveyard")));
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/f/FarAway.java b/Mage.Sets/src/mage/cards/f/FarAway.java
index bbfea62e1df..a37a00b7d5f 100644
--- a/Mage.Sets/src/mage/cards/f/FarAway.java
+++ b/Mage.Sets/src/mage/cards/f/FarAway.java
@@ -25,30 +25,23 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
-
package mage.cards.f;
+import java.util.UUID;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.effects.common.SacrificeEffect;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
+import mage.constants.SpellAbilityType;
import mage.filter.common.FilterCreaturePermanent;
import mage.target.TargetPlayer;
import mage.target.common.TargetCreaturePermanent;
-import java.util.UUID;
-
-/**
- *
- * @author LevelX2
- */
-
-
public class FarAway extends SplitCard {
public FarAway(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}","{2}{B}",true);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}", "{2}{B}", SpellAbilityType.SPLIT_FUSED);
// Far
// Return target creature to its owner's hand.
diff --git a/Mage.Sets/src/mage/cards/f/FireIce.java b/Mage.Sets/src/mage/cards/f/FireIce.java
index 44caebc9b2e..a704fa2cfc3 100644
--- a/Mage.Sets/src/mage/cards/f/FireIce.java
+++ b/Mage.Sets/src/mage/cards/f/FireIce.java
@@ -25,9 +25,9 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
-
package mage.cards.f;
+import java.util.UUID;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageMultiEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
@@ -35,21 +35,14 @@ import mage.abilities.effects.common.TapTargetEffect;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
+import mage.constants.SpellAbilityType;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreatureOrPlayerAmount;
-import java.util.UUID;
-
-/**
- *
- * @author LevelX2
- */
-
-
public class FireIce extends SplitCard {
public FireIce(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}","{1}{U}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}", "{1}{U}", SpellAbilityType.SPLIT);
// Fire
// Fire deals 2 damage divided as you choose among one or two target creatures and/or players.
diff --git a/Mage.Sets/src/mage/cards/f/FleshBlood.java b/Mage.Sets/src/mage/cards/f/FleshBlood.java
index d3bc9bc9503..14b6b98df3f 100644
--- a/Mage.Sets/src/mage/cards/f/FleshBlood.java
+++ b/Mage.Sets/src/mage/cards/f/FleshBlood.java
@@ -25,9 +25,9 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
-
package mage.cards.f;
+import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
@@ -35,6 +35,7 @@ import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Outcome;
+import mage.constants.SpellAbilityType;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.common.FilterCreatureCard;
@@ -47,18 +48,10 @@ import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetCreatureOrPlayer;
import mage.target.common.TargetCreaturePermanent;
-import java.util.UUID;
-
-/**
- *
- * @author LevelX2
- */
-
-
public class FleshBlood extends SplitCard {
public FleshBlood(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}{G}","{R}{G}",true);
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}{G}", "{R}{G}", SpellAbilityType.SPLIT_FUSED);
// Flesh
// Exile target creature card from a graveyard. Put X +1/+1 counters on target creature, where X is the power of the card you exiled.
@@ -90,7 +83,7 @@ class FleshEffect extends OneShotEffect {
public FleshEffect() {
super(Outcome.BoostCreature);
staticText = "Exile target creature card from a graveyard. Put X +1/+1 counters on target creature, where X is the power of the card you exiled";
- }
+ }
public FleshEffect(final FleshEffect effect) {
super(effect);
@@ -125,7 +118,7 @@ class BloodEffect extends OneShotEffect {
public BloodEffect() {
super(Outcome.Damage);
staticText = "Target creature you control deals damage equal to its power to target creature or player";
- }
+ }
public BloodEffect(final BloodEffect effect) {
super(effect);
diff --git a/Mage.Sets/src/mage/cards/g/GateToTheAfterlife.java b/Mage.Sets/src/mage/cards/g/GateToTheAfterlife.java
new file mode 100644
index 00000000000..b04415be311
--- /dev/null
+++ b/Mage.Sets/src/mage/cards/g/GateToTheAfterlife.java
@@ -0,0 +1,160 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are 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.g;
+
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
+import mage.abilities.condition.common.CardsInControllerGraveCondition;
+import mage.abilities.costs.common.SacrificeSourceCost;
+import mage.abilities.costs.common.TapSourceCost;
+import mage.abilities.costs.mana.GenericManaCost;
+import mage.abilities.decorator.ConditionalActivatedAbility;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.DrawDiscardControllerEffect;
+import mage.abilities.effects.common.GainLifeEffect;
+import mage.cards.Card;
+import mage.cards.CardImpl;
+import mage.cards.CardSetInfo;
+import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.TargetController;
+import mage.constants.Zone;
+import mage.filter.FilterCard;
+import mage.filter.common.FilterCreatureCard;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.Predicates;
+import mage.filter.predicate.mageobject.NamePredicate;
+import mage.filter.predicate.permanent.ControllerPredicate;
+import mage.filter.predicate.permanent.TokenPredicate;
+import mage.game.Game;
+import mage.players.Player;
+import mage.target.common.TargetCardInHand;
+import mage.target.common.TargetCardInLibrary;
+import mage.target.common.TargetCardInYourGraveyard;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class GateToTheAfterlife extends CardImpl {
+
+ private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a nontoken creature you control");
+
+ static {
+ filter.add(new ControllerPredicate(TargetController.YOU));
+ filter.add(Predicates.not(new TokenPredicate()));
+ }
+
+ public GateToTheAfterlife(UUID ownerId, CardSetInfo setInfo) {
+ super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
+
+ // Whenever a nontoken creature you control dies, you gain 1 life. Then you may draw a card. If you do, discard a card.
+ Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(1), filter, false);
+ Effect effect = new DrawDiscardControllerEffect(1, 1, true);
+ effect.setText("Then you may draw a card. If you do, discard a card");
+ ability.addEffect(effect);
+ this.addAbility(ability);
+
+ // {2}, {T}, Sacrifice Gate to the Afterlife: Search your graveyard, hand, and/or library for a card named God-Pharaoh's Gift and put it onto the battlefield. If you seearch your library this way, shuffle it. Activate this ability only if there are six or more creature cards in your graveyard.
+ ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
+ new GateToTheAfterlifeEffect(), new GenericManaCost(2), new CardsInControllerGraveCondition(6, new FilterCreatureCard()));
+ ability.addCost(new TapSourceCost());
+ ability.addCost(new SacrificeSourceCost());
+ ability.addEffect(effect);
+ this.addAbility(ability);
+ }
+
+ public GateToTheAfterlife(final GateToTheAfterlife card) {
+ super(card);
+ }
+
+ @Override
+ public GateToTheAfterlife copy() {
+ return new GateToTheAfterlife(this);
+ }
+}
+
+class GateToTheAfterlifeEffect extends OneShotEffect {
+
+ static private String cardName = "God-Pharaoh's Gift";
+
+ public GateToTheAfterlifeEffect() {
+ super(Outcome.Benefit);
+ this.staticText = "Search your graveyard, hand, and/or library for a card named "
+ + cardName
+ + " and put it onto the battlefield. If you search your library this way, shuffle it";
+ }
+
+ public GateToTheAfterlifeEffect(final GateToTheAfterlifeEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public GateToTheAfterlifeEffect copy() {
+ return new GateToTheAfterlifeEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Player controller = game.getPlayer(source.getControllerId());
+ if (controller == null) {
+ return false;
+ }
+ FilterCard filter = new FilterCard("card named " + cardName);
+ filter.add(new NamePredicate(cardName));
+ Card card = null;
+ // Graveyard check
+ if (controller.chooseUse(Outcome.Benefit, "Do you want to search your graveyard for " + cardName + "?", source, game)) {
+ TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(filter);
+ if (controller.choose(Outcome.PutCardInPlay, controller.getGraveyard(), target, game)) {
+ card = game.getCard(target.getFirstTarget());
+ }
+ }
+ // Hand check
+ if (card == null && controller.chooseUse(Outcome.Benefit, "Do you want to search your hand for " + cardName + "?", source, game)) {
+ TargetCardInHand target = new TargetCardInHand(filter);
+ if (controller.choose(Outcome.PutCardInPlay, controller.getHand(), target, game)) {
+ card = game.getCard(target.getFirstTarget());
+ }
+ }
+ // Library check
+ if (card == null && controller.chooseUse(Outcome.Benefit, "Do you want to search your library for " + cardName + "?", source, game)) {
+ TargetCardInLibrary target = new TargetCardInLibrary(filter);
+ if (controller.searchLibrary(target, game)) {
+ card = game.getCard(target.getFirstTarget());
+ }
+ controller.shuffleLibrary(source, game);
+ }
+ if (card != null) {
+ controller.moveCards(card, Zone.BATTLEFIELD, source, game);
+ }
+ return true;
+ }
+}
diff --git a/Mage.Sets/src/mage/cards/g/GideonOfTheTrials.java b/Mage.Sets/src/mage/cards/g/GideonOfTheTrials.java
index 427ccaf0e15..84bb2d89bfd 100644
--- a/Mage.Sets/src/mage/cards/g/GideonOfTheTrials.java
+++ b/Mage.Sets/src/mage/cards/g/GideonOfTheTrials.java
@@ -34,8 +34,6 @@ import mage.abilities.Ability;
import mage.abilities.LoyaltyAbility;
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
import mage.abilities.common.SimpleStaticAbility;
-import mage.abilities.dynamicvalue.common.StaticValue;
-import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.GetEmblemEffect;
@@ -48,7 +46,6 @@ import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterPlaneswalkerPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
-import mage.filter.predicate.permanent.ControllerPredicate;
import mage.game.Game;
import mage.game.command.Emblem;
import mage.game.events.GameEvent;
@@ -63,20 +60,22 @@ public class GideonOfTheTrials extends CardImpl {
public GideonOfTheTrials(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{1}{W}{W}");
-
+
this.subtype.add("Gideon");
//Starting Loyalty: 3
this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3));
// +1: Until your next turn, prevent all damage target permanent would deal.
- LoyaltyAbility ability = new LoyaltyAbility(new PreventDamageByTargetEffect(Duration.UntilYourNextTurn), 1);
+ Effect effect = new PreventDamageByTargetEffect(Duration.UntilYourNextTurn);
+ effect.setText("Until your next turn, prevent all damage target permanent would deal");
+ LoyaltyAbility ability = new LoyaltyAbility(effect, 1);
ability.addTarget(new TargetPermanent());
this.addAbility(ability);
// 0: Until end of turn, Gideon of the Trials becomes a 4/4 Human Soldier creature with indestructible that's still a planeswalker. Prevent all damage that would be dealt to him this turn.
ability = new LoyaltyAbility(new BecomesCreatureSourceEffect(new GideonOfTheTrialsToken(), "planeswalker", Duration.EndOfTurn), 0);
- Effect effect = new PreventAllDamageToSourceEffect(Duration.EndOfTurn);
+ effect = new PreventAllDamageToSourceEffect(Duration.EndOfTurn);
effect.setText("Prevent all damage that would be dealt to him this turn");
ability.addEffect(effect);
this.addAbility(ability);
@@ -106,7 +105,7 @@ class GideonOfTheTrialsCantLoseEffect extends ContinuousRuleModifyingEffectImpl
public GideonOfTheTrialsCantLoseEffect() {
super(Duration.EndOfGame, Outcome.Benefit);
- staticText = "As long as you control a Gideon planeswalker, you can't lose the game and your opponent can't win the game";
+ staticText = "As long as you control a Gideon planeswalker, you can't lose the game and your opponents can't win the game";
}
public GideonOfTheTrialsCantLoseEffect(final GideonOfTheTrialsCantLoseEffect effect) {
diff --git a/Mage.Sets/src/mage/cards/g/GideonsIntervention.java b/Mage.Sets/src/mage/cards/g/GideonsIntervention.java
index b4311796fc6..c4e9691e631 100644
--- a/Mage.Sets/src/mage/cards/g/GideonsIntervention.java
+++ b/Mage.Sets/src/mage/cards/g/GideonsIntervention.java
@@ -33,6 +33,7 @@ import mage.abilities.Ability;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
+import mage.abilities.effects.Effect;
import mage.abilities.effects.PreventionEffectImpl;
import mage.abilities.effects.common.NameACardEffect;
import mage.cards.CardImpl;
@@ -56,7 +57,9 @@ public class GideonsIntervention extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}");
// As Gideon's Intervention enters the battlefield, choose a card name.
- this.addAbility(new AsEntersBattlefieldAbility(new NameACardEffect(NameACardEffect.TypeOfName.ALL)));
+ Effect effect = new NameACardEffect(NameACardEffect.TypeOfName.ALL);
+ effect.setText("choose a card name");
+ this.addAbility(new AsEntersBattlefieldAbility(effect));
// Your opponents can't cast spells with the chosen name.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GideonsInterventionCantCastEffect()));
diff --git a/Mage.Sets/src/mage/cards/g/Gigantoplasm.java b/Mage.Sets/src/mage/cards/g/Gigantoplasm.java
index 8c123ec4ade..0f186bf7b02 100644
--- a/Mage.Sets/src/mage/cards/g/Gigantoplasm.java
+++ b/Mage.Sets/src/mage/cards/g/Gigantoplasm.java
@@ -27,6 +27,7 @@
*/
package mage.cards.g;
+import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
@@ -49,8 +50,6 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.util.functions.ApplyToPermanent;
-import java.util.UUID;
-
/**
*
* @author fireshoes
@@ -58,7 +57,7 @@ import java.util.UUID;
public class Gigantoplasm extends CardImpl {
public Gigantoplasm(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
this.subtype.add("Shapeshifter");
this.power = new MageInt(0);
this.toughness = new MageInt(0);
@@ -82,7 +81,7 @@ public class Gigantoplasm extends CardImpl {
class GigantoplasmApplyToPermanent extends ApplyToPermanent {
@Override
- public boolean apply(Game game, Permanent permanent) {
+ public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
DynamicValue variableMana = new ManacostVariableValue();
Effect effect = new SetPowerToughnessSourceEffect(variableMana, Duration.WhileOnBattlefield, SubLayer.SetPT_7b);
effect.setText("This creature has base power and toughness X/X");
@@ -92,7 +91,7 @@ class GigantoplasmApplyToPermanent extends ApplyToPermanent {
}
@Override
- public boolean apply(Game game, MageObject mageObject) {
+ public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
DynamicValue variableMana = new ManacostVariableValue();
Effect effect = new SetPowerToughnessSourceEffect(variableMana, Duration.WhileOnBattlefield, SubLayer.SetPT_7b);
effect.setText("This creature has base power and toughness X/X");
diff --git a/Mage.Sets/src/mage/cards/g/GiveTake.java b/Mage.Sets/src/mage/cards/g/GiveTake.java
index 39caae9cfa7..cb96d355b9a 100644
--- a/Mage.Sets/src/mage/cards/g/GiveTake.java
+++ b/Mage.Sets/src/mage/cards/g/GiveTake.java
@@ -27,6 +27,7 @@
*/
package mage.cards.g;
+import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
@@ -34,6 +35,7 @@ import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Outcome;
+import mage.constants.SpellAbilityType;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.permanent.Permanent;
@@ -41,8 +43,6 @@ import mage.players.Player;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
-import java.util.UUID;
-
/**
*
* @author LevelX2
@@ -50,7 +50,7 @@ import java.util.UUID;
public class GiveTake extends SplitCard {
public GiveTake(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}","{2}{U}",true);
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}", "{2}{U}", SpellAbilityType.SPLIT_FUSED);
// Give
// Put three +1/+1 counters on target creature.
diff --git a/Mage.Sets/src/mage/cards/h/HarshMentor.java b/Mage.Sets/src/mage/cards/h/HarshMentor.java
index 8d9a946549b..05e0f599ecf 100644
--- a/Mage.Sets/src/mage/cards/h/HarshMentor.java
+++ b/Mage.Sets/src/mage/cards/h/HarshMentor.java
@@ -52,7 +52,7 @@ import mage.target.targetpointer.FixedTarget;
public class HarshMentor extends CardImpl {
public HarshMentor(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "1{R}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
this.subtype.add("Human");
this.subtype.add("Cleric");
diff --git a/Mage.Sets/src/mage/cards/h/HeartPiercerManticore.java b/Mage.Sets/src/mage/cards/h/HeartPiercerManticore.java
index 4b36a404907..393e4d6e5aa 100644
--- a/Mage.Sets/src/mage/cards/h/HeartPiercerManticore.java
+++ b/Mage.Sets/src/mage/cards/h/HeartPiercerManticore.java
@@ -30,18 +30,27 @@ package mage.cards.h;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
+import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
-import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.mana.ManaCostsImpl;
-import mage.abilities.dynamicvalue.common.SacrificeCostCreaturesPower;
+import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamageTargetEffect;
-import mage.abilities.effects.common.DoIfCostPaid;
+import mage.abilities.effects.common.InfoEffect;
+import mage.abilities.effects.common.SendOptionUsedEventEffect;
import mage.abilities.keyword.EmbalmAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
+import mage.game.Game;
+import mage.game.events.GameEvent;
+import mage.game.events.GameEvent.EventType;
+import mage.game.permanent.Permanent;
+import mage.players.Player;
+import mage.target.Target;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetCreatureOrPlayer;
@@ -51,12 +60,6 @@ import mage.target.common.TargetCreatureOrPlayer;
*/
public class HeartPiercerManticore extends CardImpl {
- private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
-
- static {
- filter.add(new AnotherPredicate());
- }
-
public HeartPiercerManticore(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}");
@@ -65,12 +68,12 @@ public class HeartPiercerManticore extends CardImpl {
this.toughness = new MageInt(3);
// When Heart-Piercer Manticore enters the battlefield, you may sacrifice another creature.
+ Ability firstAbility = new EntersBattlefieldTriggeredAbility(new HeartPiercerManticoreSacrificeEffect(), true);
+ this.addAbility(firstAbility);
// When you do, Heart-Piercer Manticore deals damage equal to that creature's power to target creature or player.
- Ability ability = new EntersBattlefieldTriggeredAbility(new DoIfCostPaid(new DamageTargetEffect(new SacrificeCostCreaturesPower()),
- new SacrificeTargetCost(new TargetControlledCreaturePermanent(filter))), true);
- ability.addTarget(new TargetCreatureOrPlayer());
- this.addAbility(ability);
-
+ Ability secondAbility = new HeartPiercerManticoreSacrificeTriggeredAbility(firstAbility.getOriginalId());
+ secondAbility.addTarget(new TargetCreatureOrPlayer());
+ this.addAbility(secondAbility);
// Embalm {5}{R}
this.addAbility(new EmbalmAbility(new ManaCostsImpl("{5}{R}"), this));
@@ -85,3 +88,85 @@ public class HeartPiercerManticore extends CardImpl {
return new HeartPiercerManticore(this);
}
}
+
+class HeartPiercerManticoreSacrificeEffect extends OneShotEffect {
+
+ private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
+
+ static {
+ filter.add(new AnotherPredicate());
+ }
+
+ public HeartPiercerManticoreSacrificeEffect() {
+ super(Outcome.Damage);
+ this.staticText = "you may sacrifice another creature";
+ }
+
+ public HeartPiercerManticoreSacrificeEffect(final HeartPiercerManticoreSacrificeEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public HeartPiercerManticoreSacrificeEffect copy() {
+ return new HeartPiercerManticoreSacrificeEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Player controller = game.getPlayer(source.getControllerId());
+ if (controller != null) {
+ Target target = new TargetControlledCreaturePermanent(1, 1, filter, true);
+ if (controller.choose(outcome, target, source.getSourceId(), game)) {
+ Permanent toSacrifice = game.getPermanent(target.getFirstTarget());
+ if (toSacrifice != null) {
+ toSacrifice.sacrifice(source.getSourceId(), game);
+ return new SendOptionUsedEventEffect(toSacrifice.getPower().getValue()).apply(game, source);
+ }
+ }
+ return true;
+ }
+ return false;
+ }
+}
+
+class HeartPiercerManticoreSacrificeTriggeredAbility extends TriggeredAbilityImpl {
+
+ private final UUID relatedTriggerdAbilityOriginalId;
+
+ public HeartPiercerManticoreSacrificeTriggeredAbility(UUID relatedTriggerdAbilityOriginalId) {
+ super(Zone.BATTLEFIELD, new InfoEffect("{this} deals damage equal to that creature's power to target creature or player"));
+ this.relatedTriggerdAbilityOriginalId = relatedTriggerdAbilityOriginalId;
+ }
+
+ public HeartPiercerManticoreSacrificeTriggeredAbility(final HeartPiercerManticoreSacrificeTriggeredAbility ability) {
+ super(ability);
+ this.relatedTriggerdAbilityOriginalId = ability.relatedTriggerdAbilityOriginalId;
+ }
+
+ @Override
+ public HeartPiercerManticoreSacrificeTriggeredAbility copy() {
+ return new HeartPiercerManticoreSacrificeTriggeredAbility(this);
+ }
+
+ @Override
+ public boolean checkEventType(GameEvent event, Game game) {
+ return event.getType() == EventType.OPTION_USED;
+ }
+
+ @Override
+ public boolean checkTrigger(GameEvent event, Game game) {
+ if (event.getPlayerId().equals(this.getControllerId())
+ && event.getTargetId().equals(relatedTriggerdAbilityOriginalId)
+ && event.getSourceId().equals(getSourceId())) {
+ getEffects().clear();
+ getEffects().add(new DamageTargetEffect(event.getAmount()));
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public String getRule() {
+ return "When you do, {this} deals damage equal to that creature's power to target creature or player.";
+ }
+}
diff --git a/Mage.Sets/src/mage/cards/h/HeavenEarth.java b/Mage.Sets/src/mage/cards/h/HeavenEarth.java
index 2dc83692710..0dff7803efb 100644
--- a/Mage.Sets/src/mage/cards/h/HeavenEarth.java
+++ b/Mage.Sets/src/mage/cards/h/HeavenEarth.java
@@ -9,6 +9,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
+import mage.constants.SpellAbilityType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.AbilityPredicate;
@@ -28,7 +29,7 @@ public class HeavenEarth extends SplitCard {
}
public HeavenEarth(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY}, "{X}{G}", "{X}{R}{R}", false);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY}, "{X}{G}", "{X}{R}{R}", SpellAbilityType.SPLIT_AFTERMATH);
// Falling
// Falling deals X damage to each creature with flying.
diff --git a/Mage.Sets/src/mage/cards/h/HideSeek.java b/Mage.Sets/src/mage/cards/h/HideSeek.java
index 169f4f5c98a..5a7a79386ea 100644
--- a/Mage.Sets/src/mage/cards/h/HideSeek.java
+++ b/Mage.Sets/src/mage/cards/h/HideSeek.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.cards.h;
import java.util.UUID;
@@ -37,6 +36,7 @@ import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Outcome;
+import mage.constants.SpellAbilityType;
import mage.constants.Zone;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
import mage.game.Game;
@@ -52,7 +52,7 @@ import mage.target.common.TargetOpponent;
public class HideSeek extends SplitCard {
public HideSeek(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}{W}","{W}{B}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}{W}", "{W}{B}", SpellAbilityType.SPLIT);
// Hide
// Put target artifact or enchantment on the bottom of its owner's library.
diff --git a/Mage.Sets/src/mage/cards/h/HitRun.java b/Mage.Sets/src/mage/cards/h/HitRun.java
index b0c0db9cbbe..a0b2f3c12d9 100644
--- a/Mage.Sets/src/mage/cards/h/HitRun.java
+++ b/Mage.Sets/src/mage/cards/h/HitRun.java
@@ -37,6 +37,7 @@ import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
+import mage.constants.SpellAbilityType;
import mage.filter.common.FilterAttackingCreature;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
@@ -55,7 +56,7 @@ import mage.target.targetpointer.FixedTarget;
public class HitRun extends SplitCard {
public HitRun(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}{R}","{3}{R}{G}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}{R}", "{3}{R}{G}", SpellAbilityType.SPLIT);
// Hit
// Target player sacrifices an artifact or creature. Hit deals damage to that player equal to that permanent's converted mana cost.
diff --git a/Mage.Sets/src/mage/cards/h/HoodedBrawler.java b/Mage.Sets/src/mage/cards/h/HoodedBrawler.java
index 619dced9a50..b23dab89290 100644
--- a/Mage.Sets/src/mage/cards/h/HoodedBrawler.java
+++ b/Mage.Sets/src/mage/cards/h/HoodedBrawler.java
@@ -52,8 +52,7 @@ public class HoodedBrawler extends CardImpl {
this.toughness = new MageInt(2);
// You may exert Hooded Brawler as it attacks. When you do, it gets +2/+2 until end of turn.
- BecomesExertSourceTriggeredAbility ability = new BecomesExertSourceTriggeredAbility(new BoostSourceEffect(2, 2, Duration.EndOfTurn));
- this.addAbility(new ExertAbility(ability));
+ this.addAbility(new ExertAbility(new BecomesExertSourceTriggeredAbility(new BoostSourceEffect(2, 2, Duration.EndOfTurn))));
}
public HoodedBrawler(final HoodedBrawler card) {
diff --git a/Mage.Sets/src/mage/cards/i/IllusionReality.java b/Mage.Sets/src/mage/cards/i/IllusionReality.java
index b203fb8b3d7..2b6b4d6138d 100644
--- a/Mage.Sets/src/mage/cards/i/IllusionReality.java
+++ b/Mage.Sets/src/mage/cards/i/IllusionReality.java
@@ -34,6 +34,7 @@ import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Duration;
+import mage.constants.SpellAbilityType;
import mage.target.Target;
import mage.target.common.TargetArtifactPermanent;
import mage.target.common.TargetSpellOrPermanent;
@@ -42,11 +43,10 @@ import mage.target.common.TargetSpellOrPermanent;
*
* @author LevelX2
*/
-
public class IllusionReality extends SplitCard {
public IllusionReality(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}","{2}{G}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}", "{2}{G}", SpellAbilityType.SPLIT);
// Illusion
// Target spell or permanent becomes the color of your choice until end of turn.
diff --git a/Mage.Sets/src/mage/cards/i/InsultInjury.java b/Mage.Sets/src/mage/cards/i/InsultInjury.java
index d859b1344d9..b4721e71740 100644
--- a/Mage.Sets/src/mage/cards/i/InsultInjury.java
+++ b/Mage.Sets/src/mage/cards/i/InsultInjury.java
@@ -1,10 +1,9 @@
package mage.cards.i;
+import java.util.UUID;
import mage.abilities.Ability;
-import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.ReplacementEffectImpl;
-import mage.abilities.effects.common.LoseLifeOpponentsEffect;
import mage.abilities.effects.common.continuous.DamageCantBePreventedEffect;
import mage.abilities.keyword.AftermathAbility;
import mage.cards.CardImpl;
@@ -13,9 +12,7 @@ import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
-import mage.filter.Filter;
-import mage.filter.common.FilterControlledCreaturePermanent;
-import mage.filter.predicate.mageobject.PowerPredicate;
+import mage.constants.SpellAbilityType;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
@@ -23,14 +20,13 @@ import mage.players.Player;
import mage.target.TargetPlayer;
import mage.target.common.TargetCreaturePermanent;
-import java.util.UUID;
-
/**
* @author Stravant
*/
public class InsultInjury extends SplitCard {
+
public InsultInjury(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{R}","{2}{R}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, new CardType[]{CardType.SORCERY}, "{2}{R}", "{2}{R}", SpellAbilityType.SPLIT_AFTERMATH);
// Insult
// Damage can't be prevented this turn. If a source you control would deal damage this turn it deals
@@ -39,7 +35,6 @@ public class InsultInjury extends SplitCard {
getLeftHalfCard().getSpellAbility().addEffect(new InsultDoubleDamageEffect());
// to
-
// Injury
// Injury deals 2 damage to target creature and 2 damage to target player.
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
@@ -59,6 +54,7 @@ public class InsultInjury extends SplitCard {
}
class InsultDoubleDamageEffect extends ReplacementEffectImpl {
+
public InsultDoubleDamageEffect() {
super(Duration.EndOfTurn, Outcome.Damage);
staticText = "If a source you control would deal damage this turn, it deals double that damage to that creature or player instead.";
@@ -98,6 +94,7 @@ class InsultDoubleDamageEffect extends ReplacementEffectImpl {
}
class InjuryEffect extends OneShotEffect {
+
InjuryEffect() {
super(Outcome.Damage);
this.staticText = "{this} deals 2 damage to target creature and 2 damage to target player";
@@ -127,4 +124,4 @@ class InjuryEffect extends OneShotEffect {
public InjuryEffect copy() {
return new InjuryEffect(this);
}
-}
\ No newline at end of file
+}
diff --git a/Mage.Sets/src/mage/cards/l/LazavDimirMastermind.java b/Mage.Sets/src/mage/cards/l/LazavDimirMastermind.java
index 89238d190cc..229874c009e 100644
--- a/Mage.Sets/src/mage/cards/l/LazavDimirMastermind.java
+++ b/Mage.Sets/src/mage/cards/l/LazavDimirMastermind.java
@@ -109,7 +109,7 @@ class LazavDimirMastermindEffect extends OneShotEffect {
newBluePrint = new PermanentCard((Card) copyFromCard, source.getControllerId(), game);
newBluePrint.assignNewId();
ApplyToPermanent applier = new LazavDimirMastermindApplier();
- applier.apply(game, newBluePrint);
+ applier.apply(game, newBluePrint, source, lazavDimirMastermind.getId());
CopyEffect copyEffect = new CopyEffect(Duration.Custom, newBluePrint, lazavDimirMastermind.getId());
copyEffect.newId();
copyEffect.setApplier(applier);
@@ -126,7 +126,7 @@ class LazavDimirMastermindEffect extends OneShotEffect {
class LazavDimirMastermindApplier extends ApplyToPermanent {
@Override
- public boolean apply(Game game, Permanent permanent) {
+ public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
Ability ability = new PutCardIntoGraveFromAnywhereAllTriggeredAbility(
new LazavDimirMastermindEffect(), true,
new FilterCreatureCard("a creature card"),
@@ -139,7 +139,7 @@ class LazavDimirMastermindApplier extends ApplyToPermanent {
}
@Override
- public boolean apply(Game game, MageObject mageObject) {
+ public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
Ability ability = new PutCardIntoGraveFromAnywhereAllTriggeredAbility(
new LazavDimirMastermindEffect(), true,
new FilterCreatureCard("a creature card"),
diff --git a/Mage.Sets/src/mage/cards/l/LifeDeath.java b/Mage.Sets/src/mage/cards/l/LifeDeath.java
index 28f858db072..8506ce86324 100644
--- a/Mage.Sets/src/mage/cards/l/LifeDeath.java
+++ b/Mage.Sets/src/mage/cards/l/LifeDeath.java
@@ -38,6 +38,7 @@ import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
+import mage.constants.SpellAbilityType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledLandPermanent;
import mage.filter.common.FilterCreatureCard;
@@ -54,7 +55,7 @@ import mage.target.common.TargetCardInYourGraveyard;
public class LifeDeath extends SplitCard {
public LifeDeath(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{G}","{1}{B}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}", "{1}{B}", SpellAbilityType.SPLIT);
// Life
// All lands you control become 1/1 creatures until end of turn. They're still lands.
diff --git a/Mage.Sets/src/mage/cards/m/ManticoreOfTheGauntlet.java b/Mage.Sets/src/mage/cards/m/ManticoreOfTheGauntlet.java
index b1892b6e449..d8798b8a515 100644
--- a/Mage.Sets/src/mage/cards/m/ManticoreOfTheGauntlet.java
+++ b/Mage.Sets/src/mage/cards/m/ManticoreOfTheGauntlet.java
@@ -53,20 +53,27 @@ public class ManticoreOfTheGauntlet extends CardImpl {
public ManticoreOfTheGauntlet(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}");
-
+
this.subtype.add("Manticore");
this.power = new MageInt(5);
this.toughness = new MageInt(4);
// When Manticore of the Gauntlet enters the battlefield, put a -1/-1 counter on target creature you control. Manticore of the Gauntlet deals 3 damage to target opponent.
- Effect counters = new AddCountersTargetEffect(CounterType.M1M1.createInstance(), new StaticValue(1));
+ Effect counters = new AddCountersTargetEffect(CounterType.M1M1.createInstance());
+ counters.setText("put a -1/-1 counter on target creature you control");
counters.setTargetPointer(new FirstTargetPointer());
- Ability ability = new EntersBattlefieldTriggeredAbility(counters);
+
Effect damage = new DamageTargetEffect(new StaticValue(3), true, "", true);
+ damage.setText("{this} deals 3 damage to target opponent.");
damage.setTargetPointer(new SecondTargetPointer());
+
+ Ability ability = new EntersBattlefieldTriggeredAbility(counters);
+ ability.addEffect(damage);
+
ability.addTarget(new TargetControlledCreaturePermanent());
ability.addTarget(new TargetOpponent());
- addAbility(ability);
+
+ this.addAbility(ability);
}
public ManticoreOfTheGauntlet(final ManticoreOfTheGauntlet card) {
@@ -77,4 +84,4 @@ public class ManticoreOfTheGauntlet extends CardImpl {
public ManticoreOfTheGauntlet copy() {
return new ManticoreOfTheGauntlet(this);
}
-}
\ No newline at end of file
+}
diff --git a/Mage.Sets/src/mage/cards/m/MercilessJavelineer.java b/Mage.Sets/src/mage/cards/m/MercilessJavelineer.java
index b5e3f8ee594..b0fee3a7f17 100644
--- a/Mage.Sets/src/mage/cards/m/MercilessJavelineer.java
+++ b/Mage.Sets/src/mage/cards/m/MercilessJavelineer.java
@@ -69,7 +69,9 @@ public class MercilessJavelineer extends CardImpl {
new StaticValue(1),
Outcome.Removal),
new ManaCostsImpl("{2}"));
- ability.addEffect(new CantBlockTargetEffect(Duration.EndOfTurn));
+ ability.addEffect(
+ new CantBlockTargetEffect(Duration.EndOfTurn)
+ .setText("That creature can't block this turn."));
ability.addCost(new DiscardCardCost());
ability.addTarget(new TargetCreaturePermanent());
addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/m/MouthFeed.java b/Mage.Sets/src/mage/cards/m/MouthFeed.java
index cf53da5c5a1..5231431900e 100644
--- a/Mage.Sets/src/mage/cards/m/MouthFeed.java
+++ b/Mage.Sets/src/mage/cards/m/MouthFeed.java
@@ -1,6 +1,6 @@
package mage.cards.m;
-import mage.constants.ComparisonType;
+import java.util.UUID;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CreateTokenEffect;
@@ -10,35 +10,36 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
+import mage.constants.ComparisonType;
+import mage.constants.SpellAbilityType;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate;
import mage.game.permanent.token.HippoToken2;
-import java.util.UUID;
-
/**
* @author Stravant
*/
public class MouthFeed extends SplitCard {
+
private static final FilterControlledCreaturePermanent filterCreaturesYouControlPower3orGreater
= new FilterControlledCreaturePermanent("creature you control with power 3 or greater.");
+
static {
filterCreaturesYouControlPower3orGreater.add(new PowerPredicate(ComparisonType.MORE_THAN, 2));
}
public MouthFeed(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}","{3}{G}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, new CardType[]{CardType.SORCERY}, "{2}{G}", "{3}{G}", SpellAbilityType.SPLIT_AFTERMATH);
// Mouth
// Create a 3/3 green Hippo creature token
getLeftHalfCard().getSpellAbility().addEffect(new CreateTokenEffect(new HippoToken2()));
// to
-
// Feed
// Draw a card for each creature you control with power 3 or greater
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
- Effect draw = new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(filterCreaturesYouControlPower3orGreater));
+ Effect draw = new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(filterCreaturesYouControlPower3orGreater));
getRightHalfCard().getSpellAbility().addEffect(draw);
}
@@ -51,4 +52,4 @@ public class MouthFeed extends SplitCard {
public MouthFeed copy() {
return new MouthFeed(this);
}
-}
\ No newline at end of file
+}
diff --git a/Mage.Sets/src/mage/cards/n/NagaOracle.java b/Mage.Sets/src/mage/cards/n/NagaOracle.java
index aecbaac5309..ad03cf6e25d 100644
--- a/Mage.Sets/src/mage/cards/n/NagaOracle.java
+++ b/Mage.Sets/src/mage/cards/n/NagaOracle.java
@@ -29,8 +29,9 @@ package mage.cards.n;
import java.util.UUID;
import mage.MageInt;
-import mage.abilities.common.EntersBattlefieldAbility;
+import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.common.StaticValue;
+import mage.abilities.effects.Effect;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -46,15 +47,15 @@ public class NagaOracle extends CardImpl {
public NagaOracle(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
-
+
this.subtype.add("Naga");
this.subtype.add("Cleric");
this.power = new MageInt(2);
this.toughness = new MageInt(4);
- // When Naga Oracle enters the battlefield, look at the top three cards of your library. Put any number of them into your graveyard and the rest back on top of your library in any order.
- addAbility(new EntersBattlefieldAbility(
- new LookLibraryAndPickControllerEffect(
+ // When Naga Oracle enters the battlefield, look at the top three cards of your library. Put any number of them into your graveyard
+ // and the rest back on top of your library in any order.
+ Effect effect = new LookLibraryAndPickControllerEffect(
/* oh god, Microsoft looks conservative with their function parameters in comparison */
new StaticValue(3),
false,
@@ -65,7 +66,10 @@ public class NagaOracle extends CardImpl {
false,
true,
Zone.GRAVEYARD,
- false)));
+ false);
+ effect.setText("look at the top three cards of your library. Put any number of them into your graveyard "
+ + "and the rest back on top of your library in any order");
+ addAbility(new EntersBattlefieldTriggeredAbility(effect));
}
public NagaOracle(final NagaOracle card) {
diff --git a/Mage.Sets/src/mage/cards/n/NefCropEntangler.java b/Mage.Sets/src/mage/cards/n/NefCropEntangler.java
index ecd68bdd752..04df91609a9 100644
--- a/Mage.Sets/src/mage/cards/n/NefCropEntangler.java
+++ b/Mage.Sets/src/mage/cards/n/NefCropEntangler.java
@@ -29,10 +29,14 @@ package mage.cards.n;
import java.util.UUID;
import mage.MageInt;
+import mage.abilities.common.BecomesExertSourceTriggeredAbility;
+import mage.abilities.effects.common.continuous.BoostSourceEffect;
+import mage.abilities.keyword.ExertAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
+import mage.constants.Duration;
/**
*
@@ -42,7 +46,7 @@ public class NefCropEntangler extends CardImpl {
public NefCropEntangler(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
-
+
this.subtype.add("Human");
this.subtype.add("Warrior");
this.power = new MageInt(2);
@@ -52,6 +56,7 @@ public class NefCropEntangler extends CardImpl {
this.addAbility(TrampleAbility.getInstance());
// You may exert Nef-Crop Entangler as it attacks. When you do, it gets +1/+2 until end of turn.
+ this.addAbility(new ExertAbility(new BecomesExertSourceTriggeredAbility(new BoostSourceEffect(1, 2, Duration.EndOfTurn))));
}
public NefCropEntangler(final NefCropEntangler card) {
diff --git a/Mage.Sets/src/mage/cards/n/NehebTheWorthy.java b/Mage.Sets/src/mage/cards/n/NehebTheWorthy.java
index 5ff5f1f79ac..7336239f8b2 100644
--- a/Mage.Sets/src/mage/cards/n/NehebTheWorthy.java
+++ b/Mage.Sets/src/mage/cards/n/NehebTheWorthy.java
@@ -82,7 +82,7 @@ public class NehebTheWorthy extends CardImpl {
// As long as you have one or fewer cards in hand, Minotaurs you control get +2/+0.
Condition condition = new CardsInHandCondition(ComparisonType.FEWER_THAN, 2);
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
- new BoostControlledEffect(2, 0, Duration.WhileOnBattlefield, filter), condition, "As long as you have one or fewer cards in hand, Minotaurs you control gets +2/+0"));
+ new BoostControlledEffect(2, 0, Duration.WhileOnBattlefield, filter), condition, "As long as you have one or fewer cards in hand, Minotaurs you control get +2/+0"));
this.addAbility(ability);
// Whenever Neheb, the Worthy deals combat damage to a player, each player discards a card.
diff --git a/Mage.Sets/src/mage/cards/n/NeverReturn.java b/Mage.Sets/src/mage/cards/n/NeverReturn.java
index 5e58ac303d4..3fa5d9af014 100644
--- a/Mage.Sets/src/mage/cards/n/NeverReturn.java
+++ b/Mage.Sets/src/mage/cards/n/NeverReturn.java
@@ -36,6 +36,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
+import mage.constants.SpellAbilityType;
import mage.game.permanent.token.ZombieToken;
import mage.target.common.TargetCardInGraveyard;
import mage.target.common.TargetCreatureOrPlaneswalker;
@@ -47,7 +48,7 @@ import mage.target.common.TargetCreatureOrPlaneswalker;
public class NeverReturn extends SplitCard {
public NeverReturn(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}{B}", "{3}{B}", false);
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, new CardType[]{CardType.SORCERY}, "{1}{B}{B}", "{3}{B}", SpellAbilityType.SPLIT_AFTERMATH);
// Never
// Destroy target creature or planeswalker.
@@ -56,7 +57,7 @@ public class NeverReturn extends SplitCard {
// Return
// Exile target card from a graveyard. Create a 2/2 black Zombie creature token.
- ((CardImpl)(getRightHalfCard())).addAbility(new AftermathAbility());
+ ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
getRightHalfCard().getSpellAbility().addEffect(new ExileTargetEffect());
getRightHalfCard().getSpellAbility().addTarget(new TargetCardInGraveyard());
getRightHalfCard().getSpellAbility().addEffect(new CreateTokenEffect(new ZombieToken()));
diff --git a/Mage.Sets/src/mage/cards/n/NewPerspectives.java b/Mage.Sets/src/mage/cards/n/NewPerspectives.java
new file mode 100644
index 00000000000..fdd28604a6b
--- /dev/null
+++ b/Mage.Sets/src/mage/cards/n/NewPerspectives.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.cards.n;
+
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.common.EntersBattlefieldTriggeredAbility;
+import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.condition.Condition;
+import mage.abilities.condition.common.CardsInHandCondition;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.decorator.ConditionalReplacementEffect;
+import mage.abilities.effects.ReplacementEffectImpl;
+import mage.abilities.effects.common.DrawCardSourceControllerEffect;
+import mage.cards.CardImpl;
+import mage.cards.CardSetInfo;
+import mage.constants.CardType;
+import mage.constants.ComparisonType;
+import mage.constants.Duration;
+import mage.constants.Outcome;
+import mage.constants.Zone;
+import mage.game.Game;
+import mage.game.events.CostEvent;
+import mage.game.events.GameEvent;
+import mage.game.events.GameEvent.EventType;
+import mage.players.Player;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class NewPerspectives extends CardImpl {
+
+ public NewPerspectives(UUID ownerId, CardSetInfo setInfo) {
+ super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{5}{U}");
+
+ // When New Perspectives enters the battlefield, draw three cards.
+ this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(3), false));
+
+ // As long as you have seven or more cards in hand, you may pay {0} rather than pay cycling costs.
+ Condition condition = new CardsInHandCondition(ComparisonType.MORE_THAN, 6);
+ Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD,
+ new ConditionalReplacementEffect(
+ new PerspectivesReplaceCylcingCosts(), condition));
+ this.addAbility(ability);
+ }
+
+ public NewPerspectives(final NewPerspectives card) {
+ super(card);
+ }
+
+ @Override
+ public NewPerspectives copy() {
+ return new NewPerspectives(this);
+ }
+}
+
+class PerspectivesReplaceCylcingCosts extends ReplacementEffectImpl {
+
+ public PerspectivesReplaceCylcingCosts() {
+ super(Duration.WhileOnBattlefield, Outcome.Benefit);
+ staticText = "As long as you have seven or more cards in hand, you may pay {0} rather than pay cycling costs";
+ }
+
+ public PerspectivesReplaceCylcingCosts(final PerspectivesReplaceCylcingCosts effect) {
+ super(effect);
+ }
+
+ @Override
+ public PerspectivesReplaceCylcingCosts copy() {
+ return new PerspectivesReplaceCylcingCosts(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ return true;
+ }
+
+ @Override
+ public boolean replaceEvent(GameEvent event, Ability source, Game game) {
+ if (event.getType() == EventType.CAN_PAY_CYCLE_COST) {
+ ((CostEvent) event).setCost(new ManaCostsImpl<>("{0}"));
+ return false;
+ }
+ Player controller = game.getPlayer(source.getControllerId());
+ if (controller != null && controller.chooseUse(outcome, "Pay {0} rather than normal cycling costs?", source, game)) {
+ ((CostEvent) event).setCost(new ManaCostsImpl<>("{0}"));
+ }
+ return false;
+ }
+
+ @Override
+ public boolean checksEventType(GameEvent event, Game game) {
+ return event.getType() == EventType.PAY_CYCLE_COST || event.getType() == EventType.CAN_PAY_CYCLE_COST;
+ }
+
+ @Override
+ public boolean applies(GameEvent event, Ability source, Game game) {
+ return event.getPlayerId().equals(source.getControllerId());
+ }
+
+}
diff --git a/Mage.Sets/src/mage/cards/n/NightDay.java b/Mage.Sets/src/mage/cards/n/NightDay.java
index 47d9ba373b2..19d3f0da575 100644
--- a/Mage.Sets/src/mage/cards/n/NightDay.java
+++ b/Mage.Sets/src/mage/cards/n/NightDay.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.cards.n;
import java.util.Iterator;
@@ -35,12 +34,13 @@ import mage.MageObjectReference;
import mage.abilities.Ability;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
-import mage.constants.CardType;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
+import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.Outcome;
+import mage.constants.SpellAbilityType;
import mage.constants.SubLayer;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
@@ -52,15 +52,14 @@ import mage.target.common.TargetCreaturePermanent;
*
* @author LevelX2
*/
-
public class NightDay extends SplitCard {
public NightDay(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{B}","{2}{W}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}", "{2}{W}", SpellAbilityType.SPLIT);
// Night
// Target creature gets -1/-1 until end of turn.
- getLeftHalfCard().getSpellAbility().addEffect(new BoostTargetEffect(-1,-1,Duration.EndOfTurn));
+ getLeftHalfCard().getSpellAbility().addEffect(new BoostTargetEffect(-1, -1, Duration.EndOfTurn));
getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
// Day
diff --git a/Mage.Sets/src/mage/cards/n/NissaStewardOfElements.java b/Mage.Sets/src/mage/cards/n/NissaStewardOfElements.java
index f9d22ebf8c0..d364652cec9 100644
--- a/Mage.Sets/src/mage/cards/n/NissaStewardOfElements.java
+++ b/Mage.Sets/src/mage/cards/n/NissaStewardOfElements.java
@@ -53,6 +53,7 @@ import mage.players.Player;
import mage.target.TargetPermanent;
import java.util.UUID;
+import mage.abilities.effects.Effect;
/**
*
@@ -65,7 +66,9 @@ public class NissaStewardOfElements extends CardImpl {
this.subtype.add("Nissa");
- this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.LOYALTY.createInstance())));
+ Ability abilityETB = new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.LOYALTY.createInstance()));
+ abilityETB.setRuleVisible(false);
+ this.addAbility(abilityETB);
// +2: Scry 2.
this.addAbility(new LoyaltyAbility(new ScryEffect(2), 2));
@@ -75,8 +78,12 @@ public class NissaStewardOfElements extends CardImpl {
this.addAbility(new LoyaltyAbility(new NissaStewardOfElementsEffect(), 0));
// -6: Untap up to two target lands you control. They become 5/5 Elemental creatures with flying and haste until end of turn. They're still lands.
- LoyaltyAbility ability = new LoyaltyAbility(new UntapTargetEffect(), 6);
- ability.addEffect(new BecomesCreatureTargetEffect(new NissaStewardOfElementsToken(), false, true, Duration.EndOfTurn));
+ Effect effect = new UntapTargetEffect();
+ effect.setText("Untap up to two target lands you control");
+ LoyaltyAbility ability = new LoyaltyAbility(effect, 6);
+ effect = new BecomesCreatureTargetEffect(new NissaStewardOfElementsToken(), false, true, Duration.EndOfTurn);
+ effect.setText("They become 5/5 Elemental creatures with flying and haste until end of turn. They're still lands");
+ ability.addEffect(effect);
ability.addTarget(new TargetPermanent(0, 2, new FilterControlledLandPermanent(), false));
this.addAbility(ability);
}
@@ -95,7 +102,7 @@ class NissaStewardOfElementsEffect extends OneShotEffect {
public NissaStewardOfElementsEffect() {
super(Outcome.PutCardInPlay);
- this.staticText = "look at the top card of your library. If it's a land card or a creature card with converted mana cost less than or equal"
+ this.staticText = "look at the top card of your library. If it's a land card or a creature card with converted mana cost less than or equal "
+ "to the number of loyalty counters on {this}, you may put that card onto the battlefield";
}
diff --git a/Mage.Sets/src/mage/cards/o/OddsEnds.java b/Mage.Sets/src/mage/cards/o/OddsEnds.java
index bdbfc26aad8..e7e0fd23916 100644
--- a/Mage.Sets/src/mage/cards/o/OddsEnds.java
+++ b/Mage.Sets/src/mage/cards/o/OddsEnds.java
@@ -25,18 +25,18 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
-
package mage.cards.o;
import java.util.UUID;
-import mage.constants.CardType;
-import mage.constants.Outcome;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CopyTargetSpellEffect;
import mage.abilities.effects.common.SacrificeEffect;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
+import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.SpellAbilityType;
import mage.filter.FilterSpell;
import mage.filter.common.FilterAttackingCreature;
import mage.filter.predicate.Predicates;
@@ -46,15 +46,10 @@ import mage.players.Player;
import mage.target.TargetPlayer;
import mage.target.TargetSpell;
-/**
- *
- * @author LevelX2
- */
-
-
public class OddsEnds extends SplitCard {
private static final FilterSpell filter = new FilterSpell("instant or sorcery spell");
+
static {
filter.add(Predicates.or(
new CardTypePredicate(CardType.INSTANT),
@@ -62,7 +57,7 @@ public class OddsEnds extends SplitCard {
}
public OddsEnds(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}{R}","{3}{R}{W}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}{R}", "{3}{R}{W}", SpellAbilityType.SPLIT);
// Odds
// Flip a coin. If it comes up heads, counter target instant or sorcery spell. If it comes up tails, copy that spell and you may choose new targets for the copy.
diff --git a/Mage.Sets/src/mage/cards/o/OnwardVictory.java b/Mage.Sets/src/mage/cards/o/OnwardVictory.java
index 552a41b10cc..4b260fb53e1 100644
--- a/Mage.Sets/src/mage/cards/o/OnwardVictory.java
+++ b/Mage.Sets/src/mage/cards/o/OnwardVictory.java
@@ -25,9 +25,9 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
-
package mage.cards.o;
+import java.util.UUID;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.dynamicvalue.common.TargetPermanentPowerCount;
import mage.abilities.effects.Effect;
@@ -40,20 +40,13 @@ import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Duration;
+import mage.constants.SpellAbilityType;
import mage.target.common.TargetCreaturePermanent;
-import java.util.UUID;
-
-/**
- *
- * @author stravant
- */
-
-
public class OnwardVictory extends SplitCard {
public OnwardVictory(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY},"{2}{R}","{2}{W}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY}, "{2}{R}", "{2}{W}", SpellAbilityType.SPLIT_AFTERMATH);
// Onward
// Target creature gets +X/+0 until end of turn where X is its power.
@@ -61,10 +54,9 @@ public class OnwardVictory extends SplitCard {
getLeftHalfCard().getSpellAbility().addEffect(new BoostTargetEffect(new TargetPermanentPowerCount(), new StaticValue(0), Duration.EndOfTurn, true));
// to
-
// Victory
// Target creature gains double strike until end of turn.
- ((CardImpl)(getRightHalfCard())).addAbility(new AftermathAbility());
+ ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
Effect effect = new GainAbilityTargetEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn);
getRightHalfCard().getSpellAbility().addEffect(effect);
getRightHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
@@ -79,4 +71,3 @@ public class OnwardVictory extends SplitCard {
return new OnwardVictory(this);
}
}
-
diff --git a/Mage.Sets/src/mage/cards/o/OrderChaos.java b/Mage.Sets/src/mage/cards/o/OrderChaos.java
index 4335d11af8f..6edc36300c9 100644
--- a/Mage.Sets/src/mage/cards/o/OrderChaos.java
+++ b/Mage.Sets/src/mage/cards/o/OrderChaos.java
@@ -25,30 +25,24 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
-
package mage.cards.o;
import java.util.UUID;
-import mage.constants.CardType;
import mage.abilities.effects.common.ExileTargetEffect;
import mage.abilities.effects.common.combat.CantBlockAllEffect;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
+import mage.constants.CardType;
import mage.constants.Duration;
+import mage.constants.SpellAbilityType;
import mage.filter.common.FilterCreaturePermanent;
import mage.target.Target;
import mage.target.common.TargetAttackingCreature;
-/**
- *
- * @author LevelX2
- */
-
-
public class OrderChaos extends SplitCard {
public OrderChaos(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{W}","{2}{R}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{W}", "{2}{R}", SpellAbilityType.SPLIT);
// Order
// Exile target attacking creature.
diff --git a/Mage.Sets/src/mage/cards/p/PainSuffering.java b/Mage.Sets/src/mage/cards/p/PainSuffering.java
index 21d7ad4c703..389e5e15f15 100644
--- a/Mage.Sets/src/mage/cards/p/PainSuffering.java
+++ b/Mage.Sets/src/mage/cards/p/PainSuffering.java
@@ -33,6 +33,7 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
+import mage.constants.SpellAbilityType;
import mage.target.TargetPlayer;
import mage.target.common.TargetLandPermanent;
@@ -43,13 +44,13 @@ import mage.target.common.TargetLandPermanent;
public class PainSuffering extends SplitCard {
public PainSuffering(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{B}","{3}{R}",false);
-
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}", "{3}{R}", SpellAbilityType.SPLIT);
+
// Pain
// Target player discards a card.
this.getLeftHalfCard().getSpellAbility().addEffect(new DiscardTargetEffect(1));
this.getLeftHalfCard().getSpellAbility().addTarget(new TargetPlayer());
-
+
// Suffering
// Destroy target land.
this.getRightHalfCard().getSpellAbility().addEffect(new DestroyTargetEffect());
diff --git a/Mage.Sets/src/mage/cards/p/PathmakerInitiate.java b/Mage.Sets/src/mage/cards/p/PathmakerInitiate.java
index 81db59f2c7c..2e9ea7b7df6 100644
--- a/Mage.Sets/src/mage/cards/p/PathmakerInitiate.java
+++ b/Mage.Sets/src/mage/cards/p/PathmakerInitiate.java
@@ -48,14 +48,16 @@ import mage.target.common.TargetCreaturePermanent;
* @author stravant
*/
public class PathmakerInitiate extends CardImpl {
+
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 2 or less");
+
static {
filter.add(new PowerPredicate(ComparisonType.FEWER_THAN, 3));
}
public PathmakerInitiate(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
-
+
this.subtype.add("Human");
this.subtype.add("Wizard");
this.power = new MageInt(2);
@@ -64,6 +66,7 @@ public class PathmakerInitiate extends CardImpl {
// {T}: Target creature with power 2 or less can't be blocked this turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(Duration.EndOfTurn), new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent(filter));
+ this.addAbility(ability);
}
public PathmakerInitiate(final PathmakerInitiate card) {
diff --git a/Mage.Sets/src/mage/cards/p/PhantasmalImage.java b/Mage.Sets/src/mage/cards/p/PhantasmalImage.java
index 4d61e41c0e1..e7e9809f7f4 100644
--- a/Mage.Sets/src/mage/cards/p/PhantasmalImage.java
+++ b/Mage.Sets/src/mage/cards/p/PhantasmalImage.java
@@ -30,6 +30,7 @@ package mage.cards.p;
import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
+import mage.abilities.Ability;
import mage.abilities.common.BecomesTargetTriggeredAbility;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.effects.Effect;
@@ -53,7 +54,7 @@ public class PhantasmalImage extends CardImpl {
ApplyToPermanent phantasmalImageApplier = new ApplyToPermanent() {
@Override
- public boolean apply(Game game, Permanent permanent) {
+ public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
if (!permanent.getSubtype(game).contains("Illusion")) {
permanent.getSubtype(game).add("Illusion");
}
@@ -64,7 +65,7 @@ public class PhantasmalImage extends CardImpl {
}
@Override
- public boolean apply(Game game, MageObject mageObject) {
+ public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
if (!mageObject.getSubtype(game).contains("Illusion")) {
mageObject.getSubtype(game).add("Illusion");
}
@@ -76,7 +77,7 @@ public class PhantasmalImage extends CardImpl {
};
public PhantasmalImage(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
this.subtype.add("Illusion");
this.color.setBlue(true);
diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianMetamorph.java b/Mage.Sets/src/mage/cards/p/PhyrexianMetamorph.java
index 805cda4b1c2..26c3605d00f 100644
--- a/Mage.Sets/src/mage/cards/p/PhyrexianMetamorph.java
+++ b/Mage.Sets/src/mage/cards/p/PhyrexianMetamorph.java
@@ -69,12 +69,12 @@ public class PhyrexianMetamorph extends CardImpl {
ApplyToPermanent phyrexianMetamorphApplier = new ApplyToPermanent() {
@Override
- public boolean apply(Game game, Permanent permanent) {
- return apply(game, (MageObject) permanent);
+ public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
+ return apply(game, (MageObject) permanent, source, copyToObjectId);
}
@Override
- public boolean apply(Game game, MageObject mageObject) {
+ public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
if (!mageObject.isArtifact()) {
mageObject.addCardType(CardType.ARTIFACT);
}
diff --git a/Mage.Sets/src/mage/cards/p/PreparedFight.java b/Mage.Sets/src/mage/cards/p/PrepareFight.java
similarity index 79%
rename from Mage.Sets/src/mage/cards/p/PreparedFight.java
rename to Mage.Sets/src/mage/cards/p/PrepareFight.java
index 386fed956cc..d6bc3413405 100644
--- a/Mage.Sets/src/mage/cards/p/PreparedFight.java
+++ b/Mage.Sets/src/mage/cards/p/PrepareFight.java
@@ -25,56 +25,41 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
-
package mage.cards.p;
-import mage.abilities.Ability;
-import mage.abilities.condition.common.OpponentControlsPermanentCondition;
+import java.util.UUID;
import mage.abilities.effects.Effect;
-import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.*;
-import mage.abilities.effects.common.combat.MustBeBlockedByAllTargetEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.AftermathAbility;
-import mage.abilities.keyword.IndestructibleAbility;
import mage.abilities.keyword.LifelinkAbility;
-import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.*;
-import mage.filter.Filter;
-import mage.filter.FilterCard;
-import mage.filter.common.FilterCreatureCard;
import mage.filter.common.FilterCreaturePermanent;
-import mage.filter.predicate.mageobject.PowerPredicate;
import mage.filter.predicate.permanent.ControllerPredicate;
-import mage.game.Game;
-import mage.players.Player;
import mage.target.Target;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
-import java.util.Set;
-import java.util.UUID;
-
/**
*
* @author stravant
*/
+public class PrepareFight extends SplitCard {
-
-public class PreparedFight extends SplitCard {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control");
+
static {
filter.add(new ControllerPredicate(TargetController.NOT_YOU));
}
- public PreparedFight(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY},"{1}{W}","{3}{G}",false);
+ public PrepareFight(UUID ownerId, CardSetInfo setInfo) {
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY}, "{1}{W}", "{3}{G}", SpellAbilityType.SPLIT_AFTERMATH);
- // Prepared
+ // Prepare
// Untap target creature. It gets +2/+2 and gains lifelink until end of turn.
getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
Effect effect = new UntapTargetEffect();
@@ -88,22 +73,21 @@ public class PreparedFight extends SplitCard {
getLeftHalfCard().getSpellAbility().addEffect(effect);
// to
-
// Fight
// Target creature you control fights target creature you don't control.
- ((CardImpl)(getRightHalfCard())).addAbility(new AftermathAbility());
+ ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
getRightHalfCard().getSpellAbility().addEffect(new FightTargetsEffect());
getRightHalfCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
Target target = new TargetCreaturePermanent(filter);
getRightHalfCard().getSpellAbility().addTarget(target);
}
- public PreparedFight(final PreparedFight card) {
+ public PrepareFight(final PrepareFight card) {
super(card);
}
@Override
- public PreparedFight copy() {
- return new PreparedFight(this);
+ public PrepareFight copy() {
+ return new PrepareFight(this);
}
}
diff --git a/Mage.Sets/src/mage/cards/p/ProfitLoss.java b/Mage.Sets/src/mage/cards/p/ProfitLoss.java
index 55ac7582286..b0cc82fdef0 100644
--- a/Mage.Sets/src/mage/cards/p/ProfitLoss.java
+++ b/Mage.Sets/src/mage/cards/p/ProfitLoss.java
@@ -25,40 +25,34 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
-
package mage.cards.p;
import java.util.UUID;
-
-import mage.constants.CardType;
-import mage.constants.Duration;
import mage.abilities.effects.common.continuous.BoostAllEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.SpellAbilityType;
import mage.constants.TargetController;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
-/**
- *
- * @author LevelX2
- */
-
-
public class ProfitLoss extends SplitCard {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures your opponents control");
+
static {
filter.add(new ControllerPredicate(TargetController.OPPONENT));
}
public ProfitLoss(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}","{2}{B}",true);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}", "{2}{B}", SpellAbilityType.SPLIT_FUSED);
// Profit
// Creatures you control get +1/+1 until end of turn.
- getLeftHalfCard().getSpellAbility().addEffect(new BoostControlledEffect(1,1, Duration.EndOfTurn, new FilterCreaturePermanent()));
+ getLeftHalfCard().getSpellAbility().addEffect(new BoostControlledEffect(1, 1, Duration.EndOfTurn, new FilterCreaturePermanent()));
// Loss
// Creatures your opponents control get -1/-1 until end of turn.
diff --git a/Mage.Sets/src/mage/cards/p/ProtectServe.java b/Mage.Sets/src/mage/cards/p/ProtectServe.java
index 457fa384cf3..715919587e7 100644
--- a/Mage.Sets/src/mage/cards/p/ProtectServe.java
+++ b/Mage.Sets/src/mage/cards/p/ProtectServe.java
@@ -25,36 +25,30 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
-
package mage.cards.p;
import java.util.UUID;
-import mage.constants.CardType;
-import mage.constants.Duration;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.SpellAbilityType;
import mage.target.common.TargetCreaturePermanent;
-/**
- *
- * @author LevelX2
- */
-
-
public class ProtectServe extends SplitCard {
public ProtectServe(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{W}","{1}{U}",true);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}", "{1}{U}", SpellAbilityType.SPLIT_FUSED);
// Protect
// Target creature gets +2/+4 until end of turn.
- getLeftHalfCard().getSpellAbility().addEffect(new BoostTargetEffect(2,4, Duration.EndOfTurn));
+ getLeftHalfCard().getSpellAbility().addEffect(new BoostTargetEffect(2, 4, Duration.EndOfTurn));
getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
// Serve
// Target creature gets -6/-0 until end of turn.
- getRightHalfCard().getSpellAbility().addEffect(new BoostTargetEffect(-6,0, Duration.EndOfTurn));
+ getRightHalfCard().getSpellAbility().addEffect(new BoostTargetEffect(-6, 0, Duration.EndOfTurn));
getRightHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
}
diff --git a/Mage.Sets/src/mage/cards/p/PureSimple.java b/Mage.Sets/src/mage/cards/p/PureSimple.java
index 191c8cf6bc9..b1ef05c5b20 100644
--- a/Mage.Sets/src/mage/cards/p/PureSimple.java
+++ b/Mage.Sets/src/mage/cards/p/PureSimple.java
@@ -33,6 +33,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
+import mage.constants.SpellAbilityType;
import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.MulticoloredPredicate;
@@ -54,7 +55,7 @@ public class PureSimple extends SplitCard {
}
public PureSimple(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{R}{G}","{1}{G}{W}",true);
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}{G}", "{1}{G}{W}", SpellAbilityType.SPLIT_FUSED);
// Pure
// Destroy target multicolored permanent.
diff --git a/Mage.Sets/src/mage/cards/p/PursueGlory.java b/Mage.Sets/src/mage/cards/p/PursueGlory.java
index 1b66e14bac5..a62a0f4bc0d 100644
--- a/Mage.Sets/src/mage/cards/p/PursueGlory.java
+++ b/Mage.Sets/src/mage/cards/p/PursueGlory.java
@@ -35,22 +35,19 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
-import mage.filter.StaticFilters;
import mage.filter.common.FilterAttackingCreature;
-import mage.filter.common.FilterCreaturePermanent;
/**
*
* @author stravant
*/
public class PursueGlory extends CardImpl {
- private static final FilterAttackingCreature filter = new FilterAttackingCreature("Attacking creatures");
public PursueGlory(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}");
// Attacking creatures get +2/+0 until end of turn.
- getSpellAbility().addEffect(new BoostAllEffect(2, 0, Duration.EndOfTurn, filter, false));
+ getSpellAbility().addEffect(new BoostAllEffect(2, 0, Duration.EndOfTurn, new FilterAttackingCreature("Attacking creatures"), false));
// Cycling {2}
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
diff --git a/Mage.Sets/src/mage/cards/p/PyramidOfThePantheon.java b/Mage.Sets/src/mage/cards/p/PyramidOfThePantheon.java
new file mode 100644
index 00000000000..9fb79dec0fc
--- /dev/null
+++ b/Mage.Sets/src/mage/cards/p/PyramidOfThePantheon.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.cards.p;
+
+import java.util.UUID;
+import mage.abilities.Ability;
+import mage.abilities.condition.common.SourceHasCounterCondition;
+import mage.abilities.costs.common.TapSourceCost;
+import mage.abilities.costs.mana.GenericManaCost;
+import mage.abilities.effects.common.AddManaOfAnyColorEffect;
+import mage.abilities.effects.common.counter.AddCountersSourceEffect;
+import mage.abilities.mana.ActivateIfConditionManaAbility;
+import mage.abilities.mana.AnyColorManaAbility;
+import mage.cards.CardImpl;
+import mage.cards.CardSetInfo;
+import mage.constants.CardType;
+import mage.constants.Zone;
+import mage.counters.CounterType;
+
+/**
+ *
+ * @author spjspj
+ */
+public class PyramidOfThePantheon extends CardImpl {
+
+ public PyramidOfThePantheon(UUID ownerId, CardSetInfo setInfo) {
+ super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}");
+
+ // {2}, {T}: Add one mana of any color to your mana pool. Put a brick counter on Pyramid of the Pantheon.
+ Ability ability = new AnyColorManaAbility(new GenericManaCost(2));
+ ability.addCost(new TapSourceCost());
+ ability.addEffect(new AddCountersSourceEffect(CounterType.BRICK.createInstance()));
+ this.addAbility(ability);
+
+ // {T}: Add three mana of any one color to your mana pool. Activate this ability only of there are three or more brick counters on Pyramid of the Pantheon.
+ this.addAbility(new ActivateIfConditionManaAbility(Zone.BATTLEFIELD,
+ new AddManaOfAnyColorEffect(3),
+ new TapSourceCost(),
+ new SourceHasCounterCondition(CounterType.BRICK, 3)));
+ }
+
+ public PyramidOfThePantheon(final PyramidOfThePantheon card) {
+ super(card);
+ }
+
+ @Override
+ public PyramidOfThePantheon copy() {
+ return new PyramidOfThePantheon(this);
+ }
+}
diff --git a/Mage.Sets/src/mage/cards/q/QuicksilverGargantuan.java b/Mage.Sets/src/mage/cards/q/QuicksilverGargantuan.java
index 35a62c8d1a2..370facf9dd9 100644
--- a/Mage.Sets/src/mage/cards/q/QuicksilverGargantuan.java
+++ b/Mage.Sets/src/mage/cards/q/QuicksilverGargantuan.java
@@ -46,7 +46,7 @@ import mage.util.functions.ApplyToPermanent;
public class QuicksilverGargantuan extends CardImpl {
public QuicksilverGargantuan(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}{U}");
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}{U}");
this.subtype.add("Shapeshifter");
this.power = new MageInt(7);
@@ -70,14 +70,14 @@ public class QuicksilverGargantuan extends CardImpl {
class QuicksilverGargantuanApplyToPermanent extends ApplyToPermanent {
@Override
- public boolean apply(Game game, Permanent permanent) {
+ public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
permanent.getPower().modifyBaseValue(7);
permanent.getToughness().modifyBaseValue(7);
return true;
}
@Override
- public boolean apply(Game game, MageObject mageObject) {
+ public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
mageObject.getPower().modifyBaseValue(7);
mageObject.getToughness().modifyBaseValue(7);
return true;
diff --git a/Mage.Sets/src/mage/cards/r/RagDealer.java b/Mage.Sets/src/mage/cards/r/RagDealer.java
index 7cdfc773433..ec087aefd6a 100644
--- a/Mage.Sets/src/mage/cards/r/RagDealer.java
+++ b/Mage.Sets/src/mage/cards/r/RagDealer.java
@@ -25,25 +25,21 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
-
package mage.cards.r;
import java.util.UUID;
import mage.constants.CardType;
-import mage.constants.Outcome;
import mage.constants.Zone;
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.OneShotEffect;
-import mage.cards.Card;
+import mage.abilities.effects.common.ExileTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.filter.FilterCard;
-import mage.game.Game;
import mage.target.common.TargetCardInASingleGraveyard;
/**
@@ -52,23 +48,22 @@ import mage.target.common.TargetCardInASingleGraveyard;
*/
public class RagDealer extends CardImpl {
- public RagDealer (UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}");
+ public RagDealer(UUID ownerId, CardSetInfo setInfo) {
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}");
this.subtype.add("Human");
this.subtype.add("Rogue");
-
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// {2}{B}, {T}: Exile up to three target cards from a single graveyard.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RagDealerExileEffect(), new ManaCostsImpl("{2}{B}"));
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new ManaCostsImpl("{2}{B}"));
ability.addCost(new TapSourceCost());
- ability.addTarget(new TargetCardInASingleGraveyard(0, 3, new FilterCard("up to three target cards from a single graveyard")));
+ ability.addTarget(new TargetCardInASingleGraveyard(0, 3, new FilterCard("cards from a single graveyard")));
this.addAbility(ability);
}
- public RagDealer (final RagDealer card) {
+ public RagDealer(final RagDealer card) {
super(card);
}
@@ -78,31 +73,3 @@ public class RagDealer extends CardImpl {
}
}
-
-class RagDealerExileEffect extends OneShotEffect {
-
- public RagDealerExileEffect() {
- super(Outcome.Exile);
- this.staticText = "Exile up to three target cards from a single graveyard";
- }
-
- public RagDealerExileEffect(final RagDealerExileEffect effect) {
- super(effect);
- }
-
- @Override
- public RagDealerExileEffect copy() {
- return new RagDealerExileEffect(this);
- }
-
- @Override
- public boolean apply(Game game, Ability source) {
- for (UUID targetID : source.getTargets().get(0).getTargets()) {
- Card card = game.getCard(targetID);
- if (card != null) {
- card.moveToExile(null, "", source.getSourceId(), game);
- }
- }
- return true;
- }
-}
diff --git a/Mage.Sets/src/mage/cards/r/RagsRiches.java b/Mage.Sets/src/mage/cards/r/RagsRiches.java
index 347d3b8515f..d14601815eb 100644
--- a/Mage.Sets/src/mage/cards/r/RagsRiches.java
+++ b/Mage.Sets/src/mage/cards/r/RagsRiches.java
@@ -1,5 +1,6 @@
package mage.cards.r;
+import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
@@ -10,28 +11,25 @@ import mage.cards.*;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
-import mage.filter.StaticFilters;
+import mage.constants.SpellAbilityType;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetControlledCreaturePermanent;
-import mage.target.common.TargetCreaturePermanent;
import mage.target.targetpointer.FixedTarget;
-import java.util.UUID;
-
/**
* @author Stravant
*/
public class RagsRiches extends SplitCard {
+
public RagsRiches(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}{B}","{5}{U}{U}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, new CardType[]{CardType.SORCERY}, "{2}{B}{B}", "{5}{U}{U}", SpellAbilityType.SPLIT_AFTERMATH);
// Rags
// All creatures get -2/-2 until end of turn.
getLeftHalfCard().getSpellAbility().addEffect(new BoostAllEffect(-2, -2, Duration.EndOfTurn));
// to
-
// Riches
// Each opponent chooses a creature he or she controls. You gain control of each of those creatures.
((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
@@ -86,7 +84,7 @@ class RichesEffect extends OneShotEffect {
// Has to be done as a separate loop in case there's a situation where one creature's
// controller depends on another creatures controller.
- for (UUID target: creaturesToSteal) {
+ for (UUID target : creaturesToSteal) {
GainControlTargetEffect eff = new GainControlTargetEffect(Duration.EndOfGame, true);
eff.setTargetPointer(new FixedTarget(target));
game.addEffect(eff, source);
@@ -96,4 +94,4 @@ class RichesEffect extends OneShotEffect {
}
return false;
}
-}
\ No newline at end of file
+}
diff --git a/Mage.Sets/src/mage/cards/r/RakdosDrake.java b/Mage.Sets/src/mage/cards/r/RakdosDrake.java
index 683e6d716d0..90751ddc78c 100644
--- a/Mage.Sets/src/mage/cards/r/RakdosDrake.java
+++ b/Mage.Sets/src/mage/cards/r/RakdosDrake.java
@@ -49,12 +49,6 @@ import mage.filter.predicate.permanent.ControllerPredicate;
public class RakdosDrake extends CardImpl {
- private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Other creatures you control");
- static {
- filter.add(new AnotherPredicate());
- filter.add(new ControllerPredicate(TargetController.YOU));
- }
-
public RakdosDrake (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}");
this.subtype.add("Drake");
diff --git a/Mage.Sets/src/mage/cards/r/RapidDecay.java b/Mage.Sets/src/mage/cards/r/RapidDecay.java
index 6d213812919..e5700cbda6a 100644
--- a/Mage.Sets/src/mage/cards/r/RapidDecay.java
+++ b/Mage.Sets/src/mage/cards/r/RapidDecay.java
@@ -28,17 +28,13 @@
package mage.cards.r;
import java.util.UUID;
-import mage.abilities.Ability;
import mage.abilities.costs.mana.ManaCostsImpl;
-import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.ExileTargetEffect;
import mage.abilities.keyword.CyclingAbility;
-import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
-import mage.constants.Outcome;
import mage.filter.FilterCard;
-import mage.game.Game;
import mage.target.common.TargetCardInASingleGraveyard;
/**
@@ -48,12 +44,12 @@ import mage.target.common.TargetCardInASingleGraveyard;
public class RapidDecay extends CardImpl {
public RapidDecay(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}");
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}");
// Exile up to three target cards from a single graveyard.
- this.getSpellAbility().addEffect(new RapidDecayExileEffect());
- this.getSpellAbility().addTarget(new TargetCardInASingleGraveyard(0, 3, new FilterCard("up to three target cards from a single graveyard")));
-
+ this.getSpellAbility().addEffect(new ExileTargetEffect());
+ this.getSpellAbility().addTarget(new TargetCardInASingleGraveyard(0, 3, new FilterCard("cards from a single graveyard")));
+
// Cycling {2}
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
}
@@ -67,31 +63,3 @@ public class RapidDecay extends CardImpl {
return new RapidDecay(this);
}
}
-
-class RapidDecayExileEffect extends OneShotEffect {
-
- public RapidDecayExileEffect() {
- super(Outcome.Exile);
- this.staticText = "Exile up to three target cards from a single graveyard";
- }
-
- public RapidDecayExileEffect(final RapidDecayExileEffect effect) {
- super(effect);
- }
-
- @Override
- public RapidDecayExileEffect copy() {
- return new RapidDecayExileEffect(this);
- }
-
- @Override
- public boolean apply(Game game, Ability source) {
- for (UUID targetID : source.getTargets().get(0).getTargets()) {
- Card card = game.getCard(targetID);
- if (card != null) {
- card.moveToExile(null, "", source.getSourceId(), game);
- }
- }
- return true;
- }
-}
diff --git a/Mage.Sets/src/mage/cards/r/ReadyWilling.java b/Mage.Sets/src/mage/cards/r/ReadyWilling.java
index 5fb6fc611b0..19771ff54ec 100644
--- a/Mage.Sets/src/mage/cards/r/ReadyWilling.java
+++ b/Mage.Sets/src/mage/cards/r/ReadyWilling.java
@@ -28,9 +28,6 @@
package mage.cards.r;
import java.util.UUID;
-
-import mage.constants.CardType;
-import mage.constants.Duration;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.UntapAllControllerEffect;
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
@@ -40,6 +37,9 @@ import mage.abilities.keyword.IndestructibleAbility;
import mage.abilities.keyword.LifelinkAbility;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
+import mage.constants.CardType;
+import mage.constants.Duration;
+import mage.constants.SpellAbilityType;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
@@ -50,18 +50,18 @@ import mage.filter.common.FilterCreaturePermanent;
public class ReadyWilling extends SplitCard {
public ReadyWilling(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}{W}","{1}{W}{B}",true);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}{W}", "{1}{W}{B}", SpellAbilityType.SPLIT_FUSED);
// Ready
// Creatures you control are indestructible this turn. Untap each creature you control.
Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent("Creatures you controll"), false);
effect.setText("Creatures you control are indestructible this turn");
getLeftHalfCard().getSpellAbility().addEffect(effect);
- getLeftHalfCard().getSpellAbility().addEffect(new UntapAllControllerEffect(new FilterControlledCreaturePermanent(),"Untap each creature you control"));
+ getLeftHalfCard().getSpellAbility().addEffect(new UntapAllControllerEffect(new FilterControlledCreaturePermanent(), "Untap each creature you control"));
// Willing
// Creatures you control gain deathtouch and lifelink until end of turn.
- getRightHalfCard().getSpellAbility().addEffect(new GainAbilityControlledEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent("Creatures")) );
+ getRightHalfCard().getSpellAbility().addEffect(new GainAbilityControlledEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent("Creatures")));
effect = new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent("Creatures"));
effect.setText("Creatures you control gain lifelink until end of turn");
getRightHalfCard().getSpellAbility().addEffect(effect);
diff --git a/Mage.Sets/src/mage/cards/r/ReduceRubble.java b/Mage.Sets/src/mage/cards/r/ReduceRubble.java
index 299c1ca41fa..59541ce56c4 100644
--- a/Mage.Sets/src/mage/cards/r/ReduceRubble.java
+++ b/Mage.Sets/src/mage/cards/r/ReduceRubble.java
@@ -37,6 +37,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
+import mage.constants.SpellAbilityType;
import mage.filter.common.FilterLandPermanent;
import mage.target.TargetPermanent;
import mage.target.TargetSpell;
@@ -48,7 +49,7 @@ import mage.target.TargetSpell;
public class ReduceRubble extends SplitCard {
public ReduceRubble(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY}, "{2}{U}", "{2}{R}", false);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY}, "{2}{U}", "{2}{R}", SpellAbilityType.SPLIT_AFTERMATH);
// Reduce
// Counter target spell unless its controller pays {3}.
@@ -57,7 +58,7 @@ public class ReduceRubble extends SplitCard {
// Rubble
// Up to three target lands don't untap during their controller's next untap step.
- ((CardImpl)(getRightHalfCard())).addAbility(new AftermathAbility());
+ ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
Effect effect = new DontUntapInControllersNextUntapStepTargetEffect();
effect.setText("Up to three target lands don't untap during their controller's next untap step");
getRightHalfCard().getSpellAbility().addEffect(effect);
diff --git a/Mage.Sets/src/mage/cards/r/RegalCaracal.java b/Mage.Sets/src/mage/cards/r/RegalCaracal.java
index bc3cf771124..74f0cacc639 100644
--- a/Mage.Sets/src/mage/cards/r/RegalCaracal.java
+++ b/Mage.Sets/src/mage/cards/r/RegalCaracal.java
@@ -32,6 +32,7 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
+import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
@@ -75,7 +76,9 @@ public class RegalCaracal extends CardImpl {
this.addAbility(ability);
// When Regal Caracal enters the battlefield, create two 1/1 white Cat creature tokens with lifelink.
- this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new CatToken2(), 2)));
+ Effect effect2 = new CreateTokenEffect(new CatToken2(), 2);
+ effect2.setText("create two 1/1 white Cat creature tokens with lifelink");
+ this.addAbility(new EntersBattlefieldTriggeredAbility(effect2));
}
public RegalCaracal(final RegalCaracal card) {
diff --git a/Mage.Sets/src/mage/cards/r/ResearchDevelopment.java b/Mage.Sets/src/mage/cards/r/ResearchDevelopment.java
index 1646982006a..8582f459ae5 100644
--- a/Mage.Sets/src/mage/cards/r/ResearchDevelopment.java
+++ b/Mage.Sets/src/mage/cards/r/ResearchDevelopment.java
@@ -33,12 +33,13 @@ import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.Card;
+import mage.cards.CardSetInfo;
import mage.cards.Cards;
import mage.cards.CardsImpl;
-import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Outcome;
+import mage.constants.SpellAbilityType;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.game.Game;
@@ -53,7 +54,7 @@ import mage.target.TargetCard;
public class ResearchDevelopment extends SplitCard {
public ResearchDevelopment(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}{U}","{3}{U}{R}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}{U}", "{3}{U}{R}", SpellAbilityType.SPLIT);
// Choose up to four cards you own from outside the game and shuffle them into your library.
getLeftHalfCard().getSpellAbility().addEffect(new ResearchEffect());
@@ -78,7 +79,6 @@ class ResearchEffect extends OneShotEffect {
private static final FilterCard filter = new FilterCard("card");
-
public ResearchEffect() {
super(Outcome.Benefit);
this.staticText = "Choose up to four cards you own from outside the game and shuffle them into your library";
@@ -102,7 +102,7 @@ class ResearchEffect extends OneShotEffect {
int count = 0;
while (player.chooseUse(Outcome.Benefit, textToAsk.toString(), source, game)) {
Cards cards = player.getSideboard();
- if(cards.isEmpty()) {
+ if (cards.isEmpty()) {
game.informPlayer(player, "You have no cards outside the game.");
break;
}
@@ -170,7 +170,7 @@ class DevelopmentEffect extends OneShotEffect {
for (UUID opponentUuid : opponents) {
Player opponent = game.getPlayer(opponentUuid);
if (opponent != null && opponent.chooseUse(Outcome.Detriment,
- "Allow " + player.getLogName() + " to draw a card instead? (" + Integer.toString(i+1) + ')', source, game)) {
+ "Allow " + player.getLogName() + " to draw a card instead? (" + Integer.toString(i + 1) + ')', source, game)) {
game.informPlayers(opponent.getLogName() + " had chosen to let " + player.getLogName() + " draw a card.");
player.drawCards(1, game);
putToken = false;
@@ -192,4 +192,4 @@ class DevelopmentEffect extends OneShotEffect {
return new DevelopmentEffect(this);
}
-}
\ No newline at end of file
+}
diff --git a/Mage.Sets/src/mage/cards/r/RhetCropSpearmaster.java b/Mage.Sets/src/mage/cards/r/RhetCropSpearmaster.java
index 6e04445ae1a..c49498febc2 100644
--- a/Mage.Sets/src/mage/cards/r/RhetCropSpearmaster.java
+++ b/Mage.Sets/src/mage/cards/r/RhetCropSpearmaster.java
@@ -30,6 +30,7 @@ package mage.cards.r;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.BecomesExertSourceTriggeredAbility;
+import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.ExertAbility;
@@ -47,17 +48,19 @@ public class RhetCropSpearmaster extends CardImpl {
public RhetCropSpearmaster(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
-
+
this.subtype.add("Human");
this.subtype.add("Warrior");
this.power = new MageInt(3);
this.toughness = new MageInt(1);
// You may exert Rhet-Crop Spearmaster as it attacks. When you do, it gets +1/+0 and gains first strike until end of turn.
- BecomesExertSourceTriggeredAbility ability =
- new BecomesExertSourceTriggeredAbility(
- new BoostSourceEffect(1, 0, Duration.EndOfTurn));
- ability.addEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn));
+ Effect effect = new BoostSourceEffect(1, 0, Duration.EndOfTurn);
+ effect.setText("it gets +1/+0");
+ BecomesExertSourceTriggeredAbility ability = new BecomesExertSourceTriggeredAbility(effect);
+ effect = new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn);
+ effect.setText(" and gains first strike until end of turn");
+ ability.addEffect(effect);
this.addAbility(new ExertAbility(ability));
}
diff --git a/Mage.Sets/src/mage/cards/r/RiseFall.java b/Mage.Sets/src/mage/cards/r/RiseFall.java
index 2f92cfdde7f..a8f403015e9 100644
--- a/Mage.Sets/src/mage/cards/r/RiseFall.java
+++ b/Mage.Sets/src/mage/cards/r/RiseFall.java
@@ -32,12 +32,13 @@ import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
+import mage.cards.CardSetInfo;
import mage.cards.Cards;
import mage.cards.CardsImpl;
-import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Outcome;
+import mage.constants.SpellAbilityType;
import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.game.Game;
@@ -54,7 +55,7 @@ import mage.target.common.TargetCreaturePermanent;
public class RiseFall extends SplitCard {
public RiseFall(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{U}{B}","{B}{R}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{U}{B}", "{B}{R}", SpellAbilityType.SPLIT);
// Rise
// Return target creature card from a graveyard and target creature on the battlefield to their owners' hands.
diff --git a/Mage.Sets/src/mage/cards/r/RiverSerpent.java b/Mage.Sets/src/mage/cards/r/RiverSerpent.java
index cf05d530fab..e5ed656644c 100644
--- a/Mage.Sets/src/mage/cards/r/RiverSerpent.java
+++ b/Mage.Sets/src/mage/cards/r/RiverSerpent.java
@@ -98,6 +98,10 @@ class RiverSerpentEffect extends RestrictionEffect {
@Override
public boolean applies(Permanent permanent, Ability source, Game game) {
- return new CardsInControllerGraveyardCount().calculate(game, source, this) < 5;
+ if (permanent.getId().equals(source.getSourceId())) {
+ return new CardsInControllerGraveyardCount().calculate(game, source, this) < 5;
+ } else {
+ return false;
+ }
}
}
\ No newline at end of file
diff --git a/Mage.Sets/src/mage/cards/r/RoughTumble.java b/Mage.Sets/src/mage/cards/r/RoughTumble.java
index e6a9d90472f..81ceab90bc0 100644
--- a/Mage.Sets/src/mage/cards/r/RoughTumble.java
+++ b/Mage.Sets/src/mage/cards/r/RoughTumble.java
@@ -34,6 +34,7 @@ import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
+import mage.constants.SpellAbilityType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.AbilityPredicate;
@@ -46,13 +47,14 @@ public class RoughTumble extends SplitCard {
private static final FilterCreaturePermanent filterFlying = new FilterCreaturePermanent("creature with flying");
private static final FilterCreaturePermanent filterWithoutFlying = new FilterCreaturePermanent("creature without flying");
+
static {
filterFlying.add(new AbilityPredicate(FlyingAbility.class));
filterWithoutFlying.add(Predicates.not(new AbilityPredicate(FlyingAbility.class)));
}
public RoughTumble(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{R}","{5}{R}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}", "{5}{R}", SpellAbilityType.SPLIT);
// Rough
// Rough deals 2 damage to each creature without flying.
diff --git a/Mage.Sets/src/mage/cards/s/SacredExcavation.java b/Mage.Sets/src/mage/cards/s/SacredExcavation.java
index 225bcedc658..a062f6954ee 100644
--- a/Mage.Sets/src/mage/cards/s/SacredExcavation.java
+++ b/Mage.Sets/src/mage/cards/s/SacredExcavation.java
@@ -29,17 +29,13 @@ package mage.cards.s;
import java.util.UUID;
-import mage.MageObject;
-import mage.abilities.Ability;
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.abilities.keyword.CyclingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterCard;
-import mage.filter.predicate.Predicate;
import mage.filter.predicate.mageobject.AbilityPredicate;
-import mage.game.Game;
import mage.target.common.TargetCardInYourGraveyard;
/**
@@ -47,9 +43,11 @@ import mage.target.common.TargetCardInYourGraveyard;
* @author stravant
*/
public class SacredExcavation extends CardImpl {
- private static final FilterCard cardsWithCycling = new FilterCard();
+
+ private static final FilterCard cardsWithCycling = new FilterCard("cards with cycling from your graveyard");
+
static {
- cardsWithCycling.add(new CyclingPredicate());
+ cardsWithCycling.add(new AbilityPredicate(CyclingAbility.class));
}
public SacredExcavation(UUID ownerId, CardSetInfo setInfo) {
@@ -69,15 +67,3 @@ public class SacredExcavation extends CardImpl {
return new SacredExcavation(this);
}
}
-
-class CyclingPredicate implements Predicate {
- @Override
- public boolean apply(MageObject input, Game game) {
- for (Ability ability : input.getAbilities()) {
- if (ability instanceof CyclingAbility) {
- return true;
- }
- }
- return false;
- }
-}
\ No newline at end of file
diff --git a/Mage.Sets/src/mage/cards/s/SakashimaTheImpostor.java b/Mage.Sets/src/mage/cards/s/SakashimaTheImpostor.java
index ee8f447117c..79066d5b54e 100644
--- a/Mage.Sets/src/mage/cards/s/SakashimaTheImpostor.java
+++ b/Mage.Sets/src/mage/cards/s/SakashimaTheImpostor.java
@@ -28,9 +28,9 @@
package mage.cards.s;
import java.util.UUID;
-
import mage.MageInt;
import mage.MageObject;
+import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
@@ -81,7 +81,7 @@ public class SakashimaTheImpostor extends CardImpl {
class SakashimaTheImpostorApplier extends ApplyToPermanent {
@Override
- public boolean apply(Game game, Permanent permanent) {
+ public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
permanent.addSuperType(SuperType.LEGENDARY);
permanent.setName("Sakashima the Impostor");
@@ -94,8 +94,8 @@ class SakashimaTheImpostorApplier extends ApplyToPermanent {
}
@Override
- public boolean apply(Game game, MageObject mageObject) {
- mageObject.addSuperType(SuperType.LEGENDARY);
+ public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
+ mageObject.addSuperType(SuperType.LEGENDARY);
mageObject.setName("Sakashima the Impostor");
// {2}{U}{U}: Return Sakashima the Impostor to its owner's hand at the beginning of the next end step
mageObject.getAbilities().add(new SimpleActivatedAbility(Zone.BATTLEFIELD,
diff --git a/Mage.Sets/src/mage/cards/s/ScarabFeast.java b/Mage.Sets/src/mage/cards/s/ScarabFeast.java
index 7cb2c8b46af..13862295ded 100644
--- a/Mage.Sets/src/mage/cards/s/ScarabFeast.java
+++ b/Mage.Sets/src/mage/cards/s/ScarabFeast.java
@@ -20,7 +20,7 @@ public class ScarabFeast extends CardImpl {
// Exile up to three target cards from a single graveyard.
getSpellAbility().addEffect(new ExileTargetEffect());
- getSpellAbility().addTarget(new TargetCardInASingleGraveyard(0, 3, new FilterCard("cards")));
+ getSpellAbility().addTarget(new TargetCardInASingleGraveyard(0, 3, new FilterCard("cards from a single graveyard")));
// Cycling {B}
addAbility(new CyclingAbility(new ManaCostsImpl("{B}")));
diff --git a/Mage.Sets/src/mage/cards/s/ScribeOfTheMindful.java b/Mage.Sets/src/mage/cards/s/ScribeOfTheMindful.java
index e6e37fd6686..4206208d505 100644
--- a/Mage.Sets/src/mage/cards/s/ScribeOfTheMindful.java
+++ b/Mage.Sets/src/mage/cards/s/ScribeOfTheMindful.java
@@ -34,6 +34,7 @@ import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
+import mage.abilities.effects.Effect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@@ -67,7 +68,9 @@ public class ScribeOfTheMindful extends CardImpl {
this.toughness = new MageInt(2);
// {1}, {T}, Sacrifice Scribe of the Mindful: Return target instant or sorcery card from your graveyard to your hand.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new GenericManaCost(1));
+ Effect effect = new ReturnToHandTargetEffect();
+ effect.setText("Return target instant or sorcery card from your graveyard to your hand");
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(1));
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetCardInYourGraveyard(filter));
diff --git a/Mage.Sets/src/mage/cards/s/SeekerOfInsight.java b/Mage.Sets/src/mage/cards/s/SeekerOfInsight.java
index 88f8e6f1429..c384bfd14b1 100644
--- a/Mage.Sets/src/mage/cards/s/SeekerOfInsight.java
+++ b/Mage.Sets/src/mage/cards/s/SeekerOfInsight.java
@@ -51,7 +51,7 @@ public class SeekerOfInsight extends CardImpl {
public SeekerOfInsight(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
-
+
this.subtype.add("Human");
this.subtype.add("Wizard");
this.power = new MageInt(1);
@@ -93,4 +93,9 @@ class CastNonCreatureSpellCondition implements Condition {
}
return false;
}
+
+ @Override
+ public String toString() {
+ return "you've cast a noncreature spell this turn";
+}
}
\ No newline at end of file
diff --git a/Mage.Sets/src/mage/cards/s/ShedWeakness.java b/Mage.Sets/src/mage/cards/s/ShedWeakness.java
index d3c03ff392c..078295130dc 100644
--- a/Mage.Sets/src/mage/cards/s/ShedWeakness.java
+++ b/Mage.Sets/src/mage/cards/s/ShedWeakness.java
@@ -52,6 +52,7 @@ import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.Target;
import mage.target.common.TargetCardInHand;
+import mage.target.common.TargetCreaturePermanent;
import mage.target.targetpointer.FixedTarget;
/**
@@ -66,6 +67,7 @@ public class ShedWeakness extends CardImpl {
// Target creature gets +2/+2 until end of turn. You may remove a -1/-1 counter from it.
getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn));
getSpellAbility().addEffect(new MayRemoveM1M1CouterTargetEffect());
+ getSpellAbility().addTarget(new TargetCreaturePermanent());
}
public ShedWeakness(final ShedWeakness card) {
diff --git a/Mage.Sets/src/mage/cards/s/Soulstinger.java b/Mage.Sets/src/mage/cards/s/Soulstinger.java
index 63605720d68..dc95c21c96c 100644
--- a/Mage.Sets/src/mage/cards/s/Soulstinger.java
+++ b/Mage.Sets/src/mage/cards/s/Soulstinger.java
@@ -59,9 +59,7 @@ public class Soulstinger extends CardImpl {
this.toughness = new MageInt(5);
// When Soulstinger enters the battlefield, put two -1/-1 counter on target creature you control.
- Ability ability =
- new EntersBattlefieldTriggeredAbility(
- new AddCountersTargetEffect(CounterType.M1M1.createInstance(), new StaticValue(2), Outcome.Detriment));
+ Ability ability = new EntersBattlefieldTriggeredAbility( new AddCountersTargetEffect(CounterType.M1M1.createInstance(2)));
ability.addTarget(new TargetControlledCreaturePermanent());
this.addAbility(ability);
@@ -72,7 +70,7 @@ public class Soulstinger extends CardImpl {
new CountersSourceCount(CounterType.M1M1),
Outcome.Detriment);
effect.setText("you may put a -1/-1 counter on target creature for each -1/-1 counter on {this}");
- ability = new DiesTriggeredAbility(effect);
+ ability = new DiesTriggeredAbility(effect, true);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/s/SpideryGrasp.java b/Mage.Sets/src/mage/cards/s/SpideryGrasp.java
index 852dea01298..8303471c548 100644
--- a/Mage.Sets/src/mage/cards/s/SpideryGrasp.java
+++ b/Mage.Sets/src/mage/cards/s/SpideryGrasp.java
@@ -38,6 +38,7 @@ import mage.constants.Duration;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
+import mage.abilities.effects.Effect;
/**
* @author nantuko
@@ -45,13 +46,19 @@ import java.util.UUID;
public class SpideryGrasp extends CardImpl {
public SpideryGrasp(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{G}");
-
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}");
// Untap target creature. It gets +2/+4 and gains reach until end of turn.
this.getSpellAbility().addEffect(new UntapTargetEffect());
- this.getSpellAbility().addEffect(new GainAbilityTargetEffect(ReachAbility.getInstance(), Duration.EndOfTurn));
- this.getSpellAbility().addEffect(new BoostTargetEffect(2, 4, Duration.EndOfTurn));
+
+ Effect effect = new BoostTargetEffect(2, 4, Duration.EndOfTurn);
+ effect.setText("It gets +2/+4");
+ this.getSpellAbility().addEffect(effect);
+
+ effect = new GainAbilityTargetEffect(ReachAbility.getInstance(), Duration.EndOfTurn);
+ effect.setText("and gains reach until end of turn");
+ this.getSpellAbility().addEffect(effect);
+
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
diff --git a/Mage.Sets/src/mage/cards/s/SpiteMalice.java b/Mage.Sets/src/mage/cards/s/SpiteMalice.java
index 5d108f25fa8..6f1f957a4fb 100644
--- a/Mage.Sets/src/mage/cards/s/SpiteMalice.java
+++ b/Mage.Sets/src/mage/cards/s/SpiteMalice.java
@@ -34,6 +34,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
+import mage.constants.SpellAbilityType;
import mage.filter.FilterSpell;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
@@ -47,25 +48,27 @@ import mage.target.common.TargetCreaturePermanent;
* @author FenrisulfrX
*/
public class SpiteMalice extends SplitCard {
-
- private static final FilterSpell filterNonCreatureSpell = new FilterSpell("noncreature spell");
+
+ private static final FilterSpell filterNonCreatureSpell = new FilterSpell("noncreature spell");
+
static {
filterNonCreatureSpell.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
}
-
+
private static final FilterCreaturePermanent filterNonBlackCreature = new FilterCreaturePermanent("nonblack creature");
+
static {
filterNonBlackCreature.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
}
public SpiteMalice(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{U}","{3}{B}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}", "{3}{B}", SpellAbilityType.SPLIT);
// Spite
// Counter target noncreature spell.
this.getLeftHalfCard().getSpellAbility().addEffect(new CounterTargetEffect());
- this.getLeftHalfCard().getSpellAbility().addTarget(new TargetSpell(filterNonCreatureSpell));
-
+ this.getLeftHalfCard().getSpellAbility().addTarget(new TargetSpell(filterNonCreatureSpell));
+
// Malice
// Destroy target nonblack creature. It can't be regenerated.
this.getRightHalfCard().getSpellAbility().addEffect(new DestroyTargetEffect(true));
diff --git a/Mage.Sets/src/mage/cards/s/SpringMind.java b/Mage.Sets/src/mage/cards/s/SpringMind.java
index 1632e303100..ae79efa8907 100644
--- a/Mage.Sets/src/mage/cards/s/SpringMind.java
+++ b/Mage.Sets/src/mage/cards/s/SpringMind.java
@@ -35,6 +35,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
+import mage.constants.SpellAbilityType;
import mage.filter.common.FilterBasicLandCard;
import mage.target.common.TargetCardInLibrary;
@@ -45,7 +46,7 @@ import mage.target.common.TargetCardInLibrary;
public class SpringMind extends SplitCard {
public SpringMind(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, new CardType[]{CardType.INSTANT}, "{2}{G}", "{4}{U}{U}", false);
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, new CardType[]{CardType.INSTANT}, "{2}{G}", "{4}{U}{U}", SpellAbilityType.SPLIT_AFTERMATH);
// Spring
// Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library.
@@ -54,7 +55,7 @@ public class SpringMind extends SplitCard {
// Mind
// Aftermath
// Draw two cards.
- ((CardImpl)(getRightHalfCard())).addAbility(new AftermathAbility());
+ ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
getRightHalfCard().getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2));
}
diff --git a/Mage.Sets/src/mage/cards/s/StandDeliver.java b/Mage.Sets/src/mage/cards/s/StandDeliver.java
index 3e1f1a2ac00..b4b2bd4238d 100644
--- a/Mage.Sets/src/mage/cards/s/StandDeliver.java
+++ b/Mage.Sets/src/mage/cards/s/StandDeliver.java
@@ -34,6 +34,7 @@ import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Duration;
+import mage.constants.SpellAbilityType;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
@@ -44,7 +45,7 @@ import mage.target.common.TargetCreaturePermanent;
public class StandDeliver extends SplitCard {
public StandDeliver(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}","{2}{U}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}", "{2}{U}", SpellAbilityType.SPLIT);
// Stand
// Prevent the next 2 damage that would be dealt to target creature this turn.
diff --git a/Mage.Sets/src/mage/cards/s/StartFinish.java b/Mage.Sets/src/mage/cards/s/StartFinish.java
index df35e908e24..1f467425ca3 100644
--- a/Mage.Sets/src/mage/cards/s/StartFinish.java
+++ b/Mage.Sets/src/mage/cards/s/StartFinish.java
@@ -29,6 +29,7 @@ package mage.cards.s;
import java.util.UUID;
import mage.abilities.costs.common.SacrificeTargetCost;
+import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.keyword.AftermathAbility;
@@ -36,6 +37,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
+import mage.constants.SpellAbilityType;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.permanent.token.WarriorVigilantToken;
@@ -49,16 +51,18 @@ import mage.target.common.TargetCreaturePermanent;
public class StartFinish extends SplitCard {
public StartFinish(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY}, "{2}{W}", "{2}{B}", false);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, new CardType[]{CardType.SORCERY}, "{2}{W}", "{2}{B}", SpellAbilityType.SPLIT_AFTERMATH);
// Start
// Create two 1/1 white Warrior creature tokens with vigilance.
- getLeftHalfCard().getSpellAbility().addEffect(new CreateTokenEffect(new WarriorVigilantToken(), 2));
+ Effect effect = new CreateTokenEffect(new WarriorVigilantToken(), 2);
+ effect.setText("Create two 1/1 white Warrior creature tokens with vigilance");
+ getLeftHalfCard().getSpellAbility().addEffect(effect);
// Finish
// Aftermath
// As an additional cost to cast Finish, sacrifice a creature. Destroy target creature.
- ((CardImpl)(getRightHalfCard())).addAbility(new AftermathAbility());
+ ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility());
getRightHalfCard().getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent("a creature"))));
getRightHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature (to destoy)")));
getRightHalfCard().getSpellAbility().addEffect(new DestroyTargetEffect("Destroy target creature"));
diff --git a/Mage.Sets/src/mage/cards/s/StingingShot.java b/Mage.Sets/src/mage/cards/s/StingingShot.java
index be4d986f783..930fe5962cd 100644
--- a/Mage.Sets/src/mage/cards/s/StingingShot.java
+++ b/Mage.Sets/src/mage/cards/s/StingingShot.java
@@ -29,14 +29,12 @@ package mage.cards.s;
import java.util.UUID;
import mage.abilities.costs.mana.ManaCostsImpl;
-import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.abilities.keyword.CyclingAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
-import mage.constants.Outcome;
import mage.counters.CounterType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.AbilityPredicate;
@@ -47,22 +45,19 @@ import mage.target.common.TargetCreaturePermanent;
* @author stravant
*/
public class StingingShot extends CardImpl {
- private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
+
+ private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with flying");
+
static {
filter.add(new AbilityPredicate(FlyingAbility.class));
}
public StingingShot(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}");
-
// Put three -1/-1 counters on target creature with flying.
getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
- getSpellAbility().addEffect(
- new AddCountersTargetEffect(
- CounterType.M1M1.createInstance(),
- new StaticValue(3),
- Outcome.Removal));
+ getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.M1M1.createInstance(3)));
// Cycling {2}
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
diff --git a/Mage.Sets/src/mage/cards/s/SupernaturalStamina.java b/Mage.Sets/src/mage/cards/s/SupernaturalStamina.java
index d03363ab44d..b2c1c33f3b5 100644
--- a/Mage.Sets/src/mage/cards/s/SupernaturalStamina.java
+++ b/Mage.Sets/src/mage/cards/s/SupernaturalStamina.java
@@ -28,10 +28,8 @@
package mage.cards.s;
import java.util.UUID;
-
-import mage.abilities.common.DiesCreatureTriggeredAbility;
import mage.abilities.common.DiesTriggeredAbility;
-import mage.abilities.effects.common.ReturnToBattlefieldUnderYourControlSourceEffect;
+import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.cards.CardImpl;
@@ -51,13 +49,14 @@ public class SupernaturalStamina extends CardImpl {
// Until end of turn, target creature gets +2/+0 and gains "When this creature dies, return it to the battlefield tapped under its owner's control."
getSpellAbility().addTarget(new TargetCreaturePermanent());
- getSpellAbility().addEffect(
- new BoostTargetEffect(2, 0, Duration.EndOfTurn));
+ getSpellAbility().addEffect(new BoostTargetEffect(2, 0, Duration.EndOfTurn));
getSpellAbility().addEffect(new GainAbilityTargetEffect(
new DiesTriggeredAbility(
- new ReturnToBattlefieldUnderYourControlSourceEffect(),
- /*optional=*/false),
- Duration.EndOfTurn));
+ new ReturnSourceFromGraveyardToBattlefieldEffect(true, true),
+ false),
+ Duration.EndOfTurn,
+ "and gains \"When this creature dies, return it to the battlefield tapped under its owner's control.\""
+ ));
}
public SupernaturalStamina(final SupernaturalStamina card) {
diff --git a/Mage.Sets/src/mage/cards/s/SupplyDemand.java b/Mage.Sets/src/mage/cards/s/SupplyDemand.java
index f1e4faeae37..4df895a5415 100644
--- a/Mage.Sets/src/mage/cards/s/SupplyDemand.java
+++ b/Mage.Sets/src/mage/cards/s/SupplyDemand.java
@@ -34,6 +34,7 @@ import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
+import mage.constants.SpellAbilityType;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.MulticoloredPredicate;
import mage.game.permanent.token.SaprolingToken;
@@ -52,7 +53,7 @@ public class SupplyDemand extends SplitCard {
}
public SupplyDemand(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{G}{W}","{1}{W}{U}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{G}{W}", "{1}{W}{U}", SpellAbilityType.SPLIT);
// Supply
// create X 1/1 green Saproling creature tokens.
diff --git a/Mage.Sets/src/mage/cards/s/SynchronizedStrike.java b/Mage.Sets/src/mage/cards/s/SynchronizedStrike.java
index 3f80324d29d..53d0258c4d7 100644
--- a/Mage.Sets/src/mage/cards/s/SynchronizedStrike.java
+++ b/Mage.Sets/src/mage/cards/s/SynchronizedStrike.java
@@ -28,6 +28,7 @@
package mage.cards.s;
import java.util.UUID;
+import mage.abilities.effects.Effect;
import mage.abilities.effects.common.UntapTargetEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
@@ -35,8 +36,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
-import mage.filter.StaticFilters;
-import mage.filter.common.FilterCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
/**
@@ -51,7 +50,9 @@ public class SynchronizedStrike extends CardImpl {
// Untap up to two target creatures. They each get +2/+2 until end of turn.
getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2));
getSpellAbility().addEffect(new UntapTargetEffect());
- getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn));
+ Effect effect = new BoostTargetEffect(2, 2, Duration.EndOfTurn);
+ effect.setText("They each get +2/+2 until end of turn");
+ getSpellAbility().addEffect(effect);
}
public SynchronizedStrike(final SynchronizedStrike card) {
diff --git a/Mage.Sets/src/mage/cards/t/ToilTrouble.java b/Mage.Sets/src/mage/cards/t/ToilTrouble.java
index 73613fa694a..a6906f7d5c4 100644
--- a/Mage.Sets/src/mage/cards/t/ToilTrouble.java
+++ b/Mage.Sets/src/mage/cards/t/ToilTrouble.java
@@ -25,9 +25,9 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
-
package mage.cards.t;
+import java.util.UUID;
import mage.abilities.dynamicvalue.common.CardsInTargetHandCount;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetEffect;
@@ -36,20 +36,13 @@ import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
+import mage.constants.SpellAbilityType;
import mage.target.TargetPlayer;
-import java.util.UUID;
-
-/**
- *
- * @author LevelX2
- */
-
-
public class ToilTrouble extends SplitCard {
public ToilTrouble(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}","{2}{R}",true);
+ super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}", "{2}{R}", SpellAbilityType.SPLIT_FUSED);
// Toil
// Target player draws two cards and loses 2 life.
diff --git a/Mage.Sets/src/mage/cards/t/TrespassersCurse.java b/Mage.Sets/src/mage/cards/t/TrespassersCurse.java
index e9b3ee94e9c..d918c5a861b 100644
--- a/Mage.Sets/src/mage/cards/t/TrespassersCurse.java
+++ b/Mage.Sets/src/mage/cards/t/TrespassersCurse.java
@@ -55,7 +55,7 @@ public class TrespassersCurse extends CardImpl {
public TrespassersCurse(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
-
+
this.subtype.add("Aura");
this.subtype.add("Curse");
@@ -67,6 +67,7 @@ public class TrespassersCurse extends CardImpl {
this.addAbility(ability);
// Whenever a creature enters the battlefield under enchanted player's control, that player loses 1 life and you gain 1 life.
+ this.addAbility(new TrespassersCurseTriggeredAbility());
}
public TrespassersCurse(final TrespassersCurse card) {
@@ -79,7 +80,6 @@ public class TrespassersCurse extends CardImpl {
}
}
-
class TrespassersCurseTriggeredAbility extends TriggeredAbilityImpl {
public TrespassersCurseTriggeredAbility() {
@@ -97,11 +97,12 @@ class TrespassersCurseTriggeredAbility extends TriggeredAbilityImpl {
@Override
public boolean checkTrigger(GameEvent event, Game game) {
- Permanent enchantment = game.getPermanent(this.getSourceId());
+ Permanent enchantment = game.getPermanent(this.sourceId);
if (enchantment != null
&& enchantment.getAttachedTo() != null
- && game.getControllerId(event.getSourceId()).equals(enchantment.getAttachedTo())) {
- for (Effect effect: this.getEffects()) {
+ && game.getControllerId(event.getTargetId()).equals(enchantment.getAttachedTo())
+ && game.getPermanent(event.getTargetId()).isCreature()) {
+ for (Effect effect : this.getEffects()) {
effect.setTargetPointer(new FixedTarget(enchantment.getAttachedTo()));
}
return true;
@@ -148,4 +149,4 @@ class TrespassersCurseEffect extends OneShotEffect {
}
return false;
}
-}
\ No newline at end of file
+}
diff --git a/Mage.Sets/src/mage/cards/t/TrialError.java b/Mage.Sets/src/mage/cards/t/TrialError.java
index ffff531c496..949cc57e9cc 100644
--- a/Mage.Sets/src/mage/cards/t/TrialError.java
+++ b/Mage.Sets/src/mage/cards/t/TrialError.java
@@ -38,6 +38,7 @@ import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Outcome;
+import mage.constants.SpellAbilityType;
import mage.constants.Zone;
import mage.filter.FilterSpell;
import mage.filter.predicate.mageobject.MulticoloredPredicate;
@@ -61,7 +62,7 @@ public class TrialError extends SplitCard {
}
public TrialError(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}{U}","{U}{B}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}{U}", "{U}{B}", SpellAbilityType.SPLIT);
// Trial
// Return all creatures blocking or blocked by target creature to their owner's hand.
diff --git a/Mage.Sets/src/mage/cards/t/TrialOfZeal.java b/Mage.Sets/src/mage/cards/t/TrialOfZeal.java
index 8665ee809e4..60af306da04 100644
--- a/Mage.Sets/src/mage/cards/t/TrialOfZeal.java
+++ b/Mage.Sets/src/mage/cards/t/TrialOfZeal.java
@@ -31,7 +31,6 @@ import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
-import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.ReturnToHandSourceEffect;
import mage.cards.CardImpl;
@@ -57,9 +56,7 @@ public class TrialOfZeal extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}");
// When Trial of Zeal enters the battlefield, it deals 3 damage to target creature or player.
- Effect effect = new DamageTargetEffect(3);
- effect.setText("it deals 3 damage to target creature an opponent controls");
- Ability ability = new EntersBattlefieldTriggeredAbility(effect);
+ Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3));
ability.addTarget(new TargetCreatureOrPlayer());
this.addAbility(ability);
diff --git a/Mage.Sets/src/mage/cards/t/TurnBurn.java b/Mage.Sets/src/mage/cards/t/TurnBurn.java
index 11eb1690de1..e90dec11338 100644
--- a/Mage.Sets/src/mage/cards/t/TurnBurn.java
+++ b/Mage.Sets/src/mage/cards/t/TurnBurn.java
@@ -27,6 +27,7 @@
*/
package mage.cards.t;
+import java.util.UUID;
import mage.MageInt;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetEffect;
@@ -35,12 +36,11 @@ import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Duration;
+import mage.constants.SpellAbilityType;
import mage.game.permanent.token.Token;
import mage.target.common.TargetCreatureOrPlayer;
import mage.target.common.TargetCreaturePermanent;
-import java.util.UUID;
-
/**
*
* @author LevelX2
@@ -48,7 +48,7 @@ import java.util.UUID;
public class TurnBurn extends SplitCard {
public TurnBurn(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}","{1}{R}",true);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}", "{1}{R}", SpellAbilityType.SPLIT_FUSED);
// Turn
// Until end of turn, target creature loses all abilities and becomes a red Weird with base power and toughness 0/1.
diff --git a/Mage.Sets/src/mage/cards/v/VesuvanDoppelganger.java b/Mage.Sets/src/mage/cards/v/VesuvanDoppelganger.java
index d911fd2833f..49adeaeb519 100644
--- a/Mage.Sets/src/mage/cards/v/VesuvanDoppelganger.java
+++ b/Mage.Sets/src/mage/cards/v/VesuvanDoppelganger.java
@@ -113,7 +113,7 @@ class VesuvanDoppelgangerCopyEffect extends OneShotEffect {
if (copyFromPermanent != null) {
game.copyPermanent(copyFromPermanent, sourcePermanent.getId(), source, new ApplyToPermanent() {
@Override
- public boolean apply(Game game, Permanent permanent) {
+ public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
permanent.getColor(game).setColor(sourcePermanent.getColor(game));
permanent.getAbilities().add(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD,
new VesuvanDoppelgangerCopyEffect(), TargetController.YOU, true, false, rule2));
@@ -121,7 +121,7 @@ class VesuvanDoppelgangerCopyEffect extends OneShotEffect {
}
@Override
- public boolean apply(Game game, MageObject mageObject) {
+ public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
mageObject.getColor(game).setColor(sourcePermanent.getColor(game));
mageObject.getAbilities().add(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD,
new VesuvanDoppelgangerCopyEffect(), TargetController.YOU, true, false, rule2));
diff --git a/Mage.Sets/src/mage/cards/v/VesuvanShapeshifter.java b/Mage.Sets/src/mage/cards/v/VesuvanShapeshifter.java
index 2c03aeaa70f..355654e9d1d 100644
--- a/Mage.Sets/src/mage/cards/v/VesuvanShapeshifter.java
+++ b/Mage.Sets/src/mage/cards/v/VesuvanShapeshifter.java
@@ -28,7 +28,6 @@
package mage.cards.v;
import java.util.UUID;
-
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
@@ -105,7 +104,7 @@ public class VesuvanShapeshifter extends CardImpl {
class VesuvanShapeShifterFaceUpApplier extends ApplyToPermanent {
@Override
- public boolean apply(Game game, Permanent permanent) {
+ public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
Effect effect = new VesuvanShapeshifterFaceDownEffect();
Ability ability = new BeginningOfUpkeepTriggeredAbility(effect, TargetController.YOU, true);
permanent.getAbilities().add(ability);
@@ -114,7 +113,7 @@ class VesuvanShapeShifterFaceUpApplier extends ApplyToPermanent {
}
@Override
- public boolean apply(Game game, MageObject mageObject) {
+ public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
Effect effect = new VesuvanShapeshifterFaceDownEffect();
Ability ability = new BeginningOfUpkeepTriggeredAbility(effect, TargetController.YOU, true);
mageObject.getAbilities().add(ability);
diff --git a/Mage.Sets/src/mage/cards/v/VizierOfDeferment.java b/Mage.Sets/src/mage/cards/v/VizierOfDeferment.java
index 93a2f3a47f5..4bc195b29b8 100644
--- a/Mage.Sets/src/mage/cards/v/VizierOfDeferment.java
+++ b/Mage.Sets/src/mage/cards/v/VizierOfDeferment.java
@@ -1,151 +1,151 @@
-/*
- * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * The views and conclusions contained in the software and documentation are 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.v;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-import mage.MageInt;
-import mage.MageObjectReference;
-import mage.abilities.Ability;
-import mage.abilities.common.EntersBattlefieldTriggeredAbility;
-import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
-import mage.abilities.effects.Effect;
-import mage.abilities.effects.OneShotEffect;
-import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlTargetEffect;
-import mage.abilities.keyword.FlashAbility;
-import mage.cards.CardImpl;
-import mage.cards.CardSetInfo;
-import mage.constants.CardType;
-import mage.constants.Outcome;
-import mage.constants.Zone;
-import mage.filter.common.FilterCreaturePermanent;
-import mage.filter.predicate.Predicates;
-import mage.filter.predicate.permanent.PermanentIdPredicate;
-import mage.game.Game;
-import mage.game.permanent.Permanent;
-import mage.players.Player;
-import mage.target.common.TargetCreaturePermanent;
-import mage.target.targetpointer.FixedTarget;
-import mage.watchers.common.AttackedThisTurnWatcher;
-import mage.watchers.common.BlockedThisTurnWatcher;
-
-/**
- *
- * @author jeffwadsworth
- */
-public class VizierOfDeferment extends CardImpl {
-
- public VizierOfDeferment(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
-
- this.subtype.add("Human");
- this.subtype.add("Cleric");
- this.power = new MageInt(2);
- this.toughness = new MageInt(2);
-
- // Flash
- this.addAbility(FlashAbility.getInstance());
-
- // When Vizier of Deferment enters the battlefield, you may exile target creature if it attacked or blocked this turn. Return that card to the battlefield under its owner's control at the beginning of the next end step.
- Ability ability = new EntersBattlefieldTriggeredAbility(new VizierOfDefermentEffect(), true);
- ability.addWatcher(new AttackedThisTurnWatcher());
- ability.addWatcher(new BlockedThisTurnWatcher());
- this.addAbility(ability);
-
- }
-
- @Override
- public void adjustTargets(Ability ability, Game game) {
- if (ability instanceof EntersBattlefieldTriggeredAbility) {
- List creaturesThatCanBeTargeted = new ArrayList<>();
- FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that attacked or blocked this turn.");
- AttackedThisTurnWatcher watcherAttacked = (AttackedThisTurnWatcher) game.getState().getWatchers().get("AttackedThisTurn");
- BlockedThisTurnWatcher watcherBlocked = (BlockedThisTurnWatcher) game.getState().getWatchers().get("BlockedThisTurn");
- if (watcherAttacked != null) {
- for (UUID creatureId : watcherAttacked.getAttackedThisTurnCreatures()) {
- creaturesThatCanBeTargeted.add(new PermanentIdPredicate(creatureId));
- }
- }
- if (watcherBlocked != null) {
- for (MageObjectReference mor : watcherBlocked.getBlockedThisTurnCreatures()) {
- creaturesThatCanBeTargeted.add(new PermanentIdPredicate(mor.getPermanent(game).getId()));
- }
- }
- filter.add(Predicates.or(creaturesThatCanBeTargeted));
- ability.getTargets().clear();
- ability.addTarget(new TargetCreaturePermanent(filter));
- }
- }
-
- public VizierOfDeferment(final VizierOfDeferment card) {
- super(card);
- }
-
- @Override
- public VizierOfDeferment copy() {
- return new VizierOfDeferment(this);
- }
-}
-
-class VizierOfDefermentEffect extends OneShotEffect {
-
- public VizierOfDefermentEffect() {
- super(Outcome.Detriment);
- staticText = "you may exile target creature if it attacked or blocked this turn. Return it to the battlefield under its owner's control at the beginning of the next end step";
- }
-
- public VizierOfDefermentEffect(final VizierOfDefermentEffect effect) {
- super(effect);
- }
-
- @Override
- public boolean apply(Game game, Ability source) {
- Permanent permanent = game.getPermanent(source.getFirstTarget());
- Player controller = game.getPlayer(source.getControllerId());
- Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
- if (controller != null
- && permanent != null
- && sourcePermanent != null) {
- if (controller.moveCardToExileWithInfo(permanent, source.getSourceId(), sourcePermanent.getIdName(), source.getSourceId(), game, Zone.BATTLEFIELD, true)) {
- Effect effect = new ReturnToBattlefieldUnderOwnerControlTargetEffect();
- effect.setText("Return that card to the battlefield under its owner's control at the beginning of the next end step");
- effect.setTargetPointer(new FixedTarget(source.getFirstTarget(), game));
- game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect), source);
- return true;
- }
- }
- return false;
- }
-
- @Override
- public VizierOfDefermentEffect copy() {
- return new VizierOfDefermentEffect(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.cards.v;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+import mage.MageInt;
+import mage.MageObjectReference;
+import mage.abilities.Ability;
+import mage.abilities.common.EntersBattlefieldTriggeredAbility;
+import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.OneShotEffect;
+import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlTargetEffect;
+import mage.abilities.keyword.FlashAbility;
+import mage.cards.CardImpl;
+import mage.cards.CardSetInfo;
+import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.Zone;
+import mage.filter.common.FilterCreaturePermanent;
+import mage.filter.predicate.Predicates;
+import mage.filter.predicate.permanent.PermanentIdPredicate;
+import mage.game.Game;
+import mage.game.permanent.Permanent;
+import mage.players.Player;
+import mage.target.common.TargetCreaturePermanent;
+import mage.target.targetpointer.FixedTarget;
+import mage.watchers.common.AttackedThisTurnWatcher;
+import mage.watchers.common.BlockedThisTurnWatcher;
+
+/**
+ *
+ * @author jeffwadsworth
+ */
+public class VizierOfDeferment extends CardImpl {
+
+ public VizierOfDeferment(UUID ownerId, CardSetInfo setInfo) {
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
+
+ this.subtype.add("Human");
+ this.subtype.add("Cleric");
+ this.power = new MageInt(2);
+ this.toughness = new MageInt(2);
+
+ // Flash
+ this.addAbility(FlashAbility.getInstance());
+
+ // When Vizier of Deferment enters the battlefield, you may exile target creature if it attacked or blocked this turn. Return that card to the battlefield under its owner's control at the beginning of the next end step.
+ Ability ability = new EntersBattlefieldTriggeredAbility(new VizierOfDefermentEffect(), true);
+ ability.addWatcher(new AttackedThisTurnWatcher());
+ ability.addWatcher(new BlockedThisTurnWatcher());
+ this.addAbility(ability);
+
+ }
+
+ @Override
+ public void adjustTargets(Ability ability, Game game) {
+ if (ability instanceof EntersBattlefieldTriggeredAbility) {
+ List creaturesThatCanBeTargeted = new ArrayList<>();
+ FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that attacked or blocked this turn.");
+ AttackedThisTurnWatcher watcherAttacked = (AttackedThisTurnWatcher) game.getState().getWatchers().get("AttackedThisTurn");
+ BlockedThisTurnWatcher watcherBlocked = (BlockedThisTurnWatcher) game.getState().getWatchers().get("BlockedThisTurn");
+ if (watcherAttacked != null) {
+ for (UUID creatureId : watcherAttacked.getAttackedThisTurnCreatures()) {
+ creaturesThatCanBeTargeted.add(new PermanentIdPredicate(creatureId));
+ }
+ }
+ if (watcherBlocked != null) {
+ for (MageObjectReference mor : watcherBlocked.getBlockedThisTurnCreatures()) {
+ creaturesThatCanBeTargeted.add(new PermanentIdPredicate(mor.getPermanent(game).getId()));
+ }
+ }
+ filter.add(Predicates.or(creaturesThatCanBeTargeted));
+ ability.getTargets().clear();
+ ability.addTarget(new TargetCreaturePermanent(filter));
+ }
+ }
+
+ public VizierOfDeferment(final VizierOfDeferment card) {
+ super(card);
+ }
+
+ @Override
+ public VizierOfDeferment copy() {
+ return new VizierOfDeferment(this);
+ }
+}
+
+class VizierOfDefermentEffect extends OneShotEffect {
+
+ public VizierOfDefermentEffect() {
+ super(Outcome.Detriment);
+ staticText = "you may exile target creature if it attacked or blocked this turn. Return that card to the battlefield under its owner's control at the beginning of the next end step";
+ }
+
+ public VizierOfDefermentEffect(final VizierOfDefermentEffect effect) {
+ super(effect);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Permanent permanent = game.getPermanent(source.getFirstTarget());
+ Player controller = game.getPlayer(source.getControllerId());
+ Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
+ if (controller != null
+ && permanent != null
+ && sourcePermanent != null) {
+ if (controller.moveCardToExileWithInfo(permanent, source.getSourceId(), sourcePermanent.getIdName(), source.getSourceId(), game, Zone.BATTLEFIELD, true)) {
+ Effect effect = new ReturnToBattlefieldUnderOwnerControlTargetEffect();
+ effect.setText("Return that card to the battlefield under its owner's control at the beginning of the next end step");
+ effect.setTargetPointer(new FixedTarget(source.getFirstTarget(), game));
+ game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect), source);
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public VizierOfDefermentEffect copy() {
+ return new VizierOfDefermentEffect(this);
+ }
+
+}
diff --git a/Mage.Sets/src/mage/cards/v/VizierOfManyFaces.java b/Mage.Sets/src/mage/cards/v/VizierOfManyFaces.java
new file mode 100644
index 00000000000..62ae1b9d40e
--- /dev/null
+++ b/Mage.Sets/src/mage/cards/v/VizierOfManyFaces.java
@@ -0,0 +1,156 @@
+/*
+ * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of BetaSteward_at_googlemail.com.
+ */
+package mage.cards.v;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.UUID;
+import mage.MageInt;
+import mage.MageObject;
+import mage.MageObjectReference;
+import mage.ObjectColor;
+import mage.abilities.Ability;
+import mage.abilities.common.EntersBattlefieldAbility;
+import mage.abilities.costs.mana.ManaCostsImpl;
+import mage.abilities.effects.Effect;
+import mage.abilities.effects.common.CopyPermanentEffect;
+import mage.abilities.keyword.EmbalmAbility;
+import mage.cards.CardImpl;
+import mage.cards.CardSetInfo;
+import mage.constants.CardType;
+import mage.constants.WatcherScope;
+import mage.game.Game;
+import mage.game.events.GameEvent;
+import mage.game.permanent.Permanent;
+import mage.game.permanent.PermanentToken;
+import mage.util.functions.ApplyToPermanent;
+import mage.watchers.Watcher;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class VizierOfManyFaces extends CardImpl {
+
+ public VizierOfManyFaces(UUID ownerId, CardSetInfo setInfo) {
+ super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}");
+
+ this.subtype.add("Shapeshifter");
+ this.subtype.add("Cleric");
+ this.power = new MageInt(0);
+ this.toughness = new MageInt(0);
+
+ // You may have Vizier of Many Faces enter the battlefield as a copy of any creature on the battlefield, except if Vizier of Many Faces was embalmed, the token has no mana cost, it's white, and it's a Zombie in addition to its other types.
+ Effect effect = new CopyPermanentEffect(new VizierOfManyFacesApplyToPermanent());
+ effect.setText("as a copy of any creature on the battlefield, except if {this} was embalmed, the token has no mana cost, it's white, and it's a Zombie in addition to its other types.");
+ this.addAbility(new EntersBattlefieldAbility(effect, true), new EmbalmedThisTurnWatcher());
+
+ // Embalm {3}{U}{U}
+ this.addAbility(new EmbalmAbility(new ManaCostsImpl("{3}{U}{U}"), this));
+
+ }
+
+ public VizierOfManyFaces(final VizierOfManyFaces card) {
+ super(card);
+ }
+
+ @Override
+ public VizierOfManyFaces copy() {
+ return new VizierOfManyFaces(this);
+ }
+}
+
+class VizierOfManyFacesApplyToPermanent extends ApplyToPermanent {
+
+ @Override
+ public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
+ return true;
+ }
+
+ @Override
+ public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
+ for (Permanent entering : game.getPermanentsEntering().values()) {
+ if (entering.getId().equals(copyToObjectId) && entering instanceof PermanentToken) {
+ UUID originalCardId = ((PermanentToken) entering).getToken().getCopySourceCard().getId();
+ EmbalmedThisTurnWatcher watcher = (EmbalmedThisTurnWatcher) game.getState().getWatchers().get(EmbalmedThisTurnWatcher.class.getName());
+ if (watcher != null) {
+ for (MageObjectReference mor : watcher.getEmbalmedThisTurnCards()) {
+ if (mor.getSourceId().equals(originalCardId) && game.getState().getZoneChangeCounter(originalCardId) == mor.getZoneChangeCounter()) {
+ permanent.getManaCost().clear();
+ if (!permanent.getSubtype(game).contains("Zombie")) {
+ permanent.getSubtype(game).add("Zombie");
+ }
+ permanent.getColor(game).setColor(ObjectColor.WHITE);
+
+ }
+ }
+ }
+ }
+ }
+ return true;
+ }
+
+}
+
+class EmbalmedThisTurnWatcher extends Watcher {
+
+ private final Set embalmedThisTurnTokens;
+
+ public EmbalmedThisTurnWatcher() {
+ super(EmbalmedThisTurnWatcher.class.getName(), WatcherScope.GAME);
+ embalmedThisTurnTokens = new HashSet<>();
+ }
+
+ public EmbalmedThisTurnWatcher(final EmbalmedThisTurnWatcher watcher) {
+ super(watcher);
+ embalmedThisTurnTokens = new HashSet<>(watcher.embalmedThisTurnTokens);
+ }
+
+ @Override
+ public Watcher copy() {
+ return new EmbalmedThisTurnWatcher(this);
+ }
+
+ @Override
+ public void watch(GameEvent event, Game game) {
+ if (event.getType() == GameEvent.EventType.EMBALMED_CREATURE) {
+ this.embalmedThisTurnTokens.add(new MageObjectReference(event.getSourceId(), game));
+ }
+ }
+
+ public Set getEmbalmedThisTurnCards() {
+ return this.embalmedThisTurnTokens;
+ }
+
+ @Override
+ public void reset() {
+ super.reset();
+ embalmedThisTurnTokens.clear();
+ }
+
+}
diff --git a/Mage.Sets/src/mage/cards/v/VizierOfTumblingSands.java b/Mage.Sets/src/mage/cards/v/VizierOfTumblingSands.java
index 8b1c4aec829..1af269c970e 100644
--- a/Mage.Sets/src/mage/cards/v/VizierOfTumblingSands.java
+++ b/Mage.Sets/src/mage/cards/v/VizierOfTumblingSands.java
@@ -34,12 +34,15 @@ import mage.abilities.common.CycleTriggeredAbility;
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.UntapTargetEffect;
import mage.abilities.keyword.CyclingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
+import mage.filter.FilterPermanent;
+import mage.filter.predicate.permanent.AnotherPredicate;
import mage.target.TargetPermanent;
/**
@@ -48,6 +51,12 @@ import mage.target.TargetPermanent;
*/
public class VizierOfTumblingSands extends CardImpl {
+ private static final FilterPermanent filter = new FilterPermanent("another target permanent");
+
+ static {
+ filter.add(new AnotherPredicate());
+ }
+
public VizierOfTumblingSands(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
@@ -57,8 +66,10 @@ public class VizierOfTumblingSands extends CardImpl {
this.toughness = new MageInt(3);
// {T}: Untap another target permanent.
- Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new TapSourceCost());
- ability.addTarget(new TargetPermanent());
+ Effect effect = new UntapTargetEffect();
+ effect.setText("Untap another target permanent");
+ Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost());
+ ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability);
// Cycling {1}{U}
diff --git a/Mage.Sets/src/mage/cards/w/WarfireJavelineer.java b/Mage.Sets/src/mage/cards/w/WarfireJavelineer.java
index 53cfa52352b..9fab807880e 100644
--- a/Mage.Sets/src/mage/cards/w/WarfireJavelineer.java
+++ b/Mage.Sets/src/mage/cards/w/WarfireJavelineer.java
@@ -56,7 +56,8 @@ public class WarfireJavelineer extends CardImpl {
EntersBattlefieldTriggeredAbility ability =
new EntersBattlefieldTriggeredAbility(
new DamageTargetEffect(
- new CardsInControllerGraveyardCount(new FilterInstantOrSorceryCard())));
+ new CardsInControllerGraveyardCount(new FilterInstantOrSorceryCard()))
+ .setText("it deals X damage to target creature an opponent controls, where X is the number of instant and sorcery cards in your graveyard."));
ability.addTarget(new TargetOpponentsCreaturePermanent());
this.addAbility(ability);
}
diff --git a/Mage.Sets/src/mage/cards/w/WatchersOfTheDead.java b/Mage.Sets/src/mage/cards/w/WatchersOfTheDead.java
index d8e390e013c..ff0588d8653 100644
--- a/Mage.Sets/src/mage/cards/w/WatchersOfTheDead.java
+++ b/Mage.Sets/src/mage/cards/w/WatchersOfTheDead.java
@@ -34,10 +34,7 @@ import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.ExileSourceCost;
import mage.abilities.effects.OneShotEffect;
-import mage.cards.Card;
-import mage.cards.CardImpl;
-import mage.cards.CardSetInfo;
-import mage.cards.Cards;
+import mage.cards.*;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
@@ -103,8 +100,8 @@ class WatchersOfTheDeadEffect extends OneShotEffect {
TargetCard target = new TargetCardInYourGraveyard(2, 2, new FilterCard());
target.setNotTarget(true);
Cards cardsInGraveyard = opponent.getGraveyard();
- opponent.choose(outcome, cardsInGraveyard, target, game);
- if (!cardsInGraveyard.isEmpty()) {
+ if (cardsInGraveyard.size() > 1) {
+ opponent.choose(outcome, cardsInGraveyard, target, game);
for (Card cardInGraveyard : cardsInGraveyard.getCards(game)) {
if (!target.getTargets().contains(cardInGraveyard.getId())) {
opponent.moveCardToExileWithInfo(cardInGraveyard, CardUtil.getCardExileZoneId(game, source.getId()),
diff --git a/Mage.Sets/src/mage/cards/w/WaxWane.java b/Mage.Sets/src/mage/cards/w/WaxWane.java
index 766c5462661..5b0aa63310e 100644
--- a/Mage.Sets/src/mage/cards/w/WaxWane.java
+++ b/Mage.Sets/src/mage/cards/w/WaxWane.java
@@ -34,6 +34,7 @@ import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
import mage.constants.CardType;
import mage.constants.Duration;
+import mage.constants.SpellAbilityType;
import mage.target.common.TargetCreaturePermanent;
import mage.target.common.TargetEnchantmentPermanent;
@@ -44,7 +45,7 @@ import mage.target.common.TargetEnchantmentPermanent;
public class WaxWane extends SplitCard {
public WaxWane(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}","{W}",false);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}", "{W}", SpellAbilityType.SPLIT);
// Wax
// Target creature gets +2/+2 until end of turn.
diff --git a/Mage.Sets/src/mage/cards/w/WearTear.java b/Mage.Sets/src/mage/cards/w/WearTear.java
index 4e7fa9aac17..4a803ac26e2 100644
--- a/Mage.Sets/src/mage/cards/w/WearTear.java
+++ b/Mage.Sets/src/mage/cards/w/WearTear.java
@@ -28,10 +28,11 @@
package mage.cards.w;
import java.util.UUID;
-import mage.constants.CardType;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardSetInfo;
import mage.cards.SplitCard;
+import mage.constants.CardType;
+import mage.constants.SpellAbilityType;
import mage.target.Target;
import mage.target.common.TargetArtifactPermanent;
import mage.target.common.TargetEnchantmentPermanent;
@@ -43,7 +44,7 @@ import mage.target.common.TargetEnchantmentPermanent;
public class WearTear extends SplitCard {
public WearTear(UUID ownerId, CardSetInfo setInfo) {
- super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}","{W}",true);
+ super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}", "{W}", SpellAbilityType.SPLIT_FUSED);
// Wear
// Destroy target artifact.
diff --git a/Mage.Sets/src/mage/sets/Amonkhet.java b/Mage.Sets/src/mage/sets/Amonkhet.java
index c2ec329ef62..db84579bc45 100644
--- a/Mage.Sets/src/mage/sets/Amonkhet.java
+++ b/Mage.Sets/src/mage/sets/Amonkhet.java
@@ -1,355 +1,360 @@
-/*
- * 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
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * The views and conclusions contained in the software and documentation are those 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.ArrayList;
-import java.util.List;
-import mage.cards.CardGraphicInfo;
-import mage.cards.ExpansionSet;
-import mage.cards.repository.CardCriteria;
-import mage.cards.repository.CardInfo;
-import mage.cards.repository.CardRepository;
-import mage.constants.Rarity;
-import mage.constants.SetType;
-
-/**
- *
- * @author fireshoes
- */
-public class Amonkhet extends ExpansionSet {
-
- private static final Amonkhet instance = new Amonkhet();
-
- public static Amonkhet getInstance() {
- return instance;
- }
-
- protected final List savedSpecialLand = new ArrayList<>();
-
- private Amonkhet() {
- super("Amonkhet", "AKH", ExpansionSet.buildDate(2017, 4, 28), SetType.EXPANSION);
- this.blockName = "Amonkhet";
- this.hasBoosters = true;
- this.hasBasicLands = true;
- this.numBoosterLands = 1;
- this.numBoosterCommon = 10;
- this.numBoosterUncommon = 3;
- this.numBoosterRare = 1;
- this.ratioBoosterMythic = 8;
- this.maxCardNumberInBooster = 269;
- this.ratioBoosterSpecialLand = 144;
-
- cards.add(new SetCardInfo("Ahn-Crop Champion", 194, Rarity.UNCOMMON, mage.cards.a.AhnCropChampion.class));
- cards.add(new SetCardInfo("Ahn-Crop Crasher", 117, Rarity.UNCOMMON, mage.cards.a.AhnCropCrasher.class));
- cards.add(new SetCardInfo("Ancient Crab", 40, Rarity.COMMON, mage.cards.a.AncientCrab.class));
- cards.add(new SetCardInfo("Angel of Sanctions", 1, Rarity.MYTHIC, mage.cards.a.AngelOfSanctions.class));
- cards.add(new SetCardInfo("Angler Drake", 41, Rarity.UNCOMMON, mage.cards.a.AnglerDrake.class));
- cards.add(new SetCardInfo("Anointed Procession", 2, Rarity.RARE, mage.cards.a.AnointedProcession.class));
- cards.add(new SetCardInfo("Anointer Priest", 3, Rarity.COMMON, mage.cards.a.AnointerPriest.class));
- cards.add(new SetCardInfo("Approach of the Second Sun", 4, Rarity.RARE, mage.cards.a.ApproachOfTheSecondSun.class));
- cards.add(new SetCardInfo("Archfiend of Ifnir", 78, Rarity.RARE, mage.cards.a.ArchfiendOfIfnir.class));
- cards.add(new SetCardInfo("As Foretold", 42, Rarity.MYTHIC, mage.cards.a.AsForetold.class));
- cards.add(new SetCardInfo("Aven Initiate", 43, Rarity.COMMON, mage.cards.a.AvenInitiate.class));
- cards.add(new SetCardInfo("Aven Mindcensor", 5, Rarity.RARE, mage.cards.a.AvenMindcensor.class));
- cards.add(new SetCardInfo("Aven Wind Guide", 195, Rarity.UNCOMMON, mage.cards.a.AvenWindGuide.class));
- cards.add(new SetCardInfo("Baleful Ammit", 79, Rarity.UNCOMMON, mage.cards.b.BalefulAmmit.class));
- cards.add(new SetCardInfo("Battlefield Scavenger", 118, Rarity.UNCOMMON, mage.cards.b.BattlefieldScavenger.class));
- cards.add(new SetCardInfo("Benefaction of Rhonas", 156, Rarity.COMMON, mage.cards.b.BenefactionOfRhonas.class));
- cards.add(new SetCardInfo("Binding Mummy", 6, Rarity.COMMON, mage.cards.b.BindingMummy.class));
- cards.add(new SetCardInfo("Bitterblade Warrior", 157, Rarity.COMMON, mage.cards.b.BitterbladeWarrior.class));
- cards.add(new SetCardInfo("Blazing Volley", 119, Rarity.COMMON, mage.cards.b.BlazingVolley.class));
- cards.add(new SetCardInfo("Blighted Bat", 80, Rarity.COMMON, mage.cards.b.BlightedBat.class));
- cards.add(new SetCardInfo("Bloodlust Inciter", 120, Rarity.COMMON, mage.cards.b.BloodlustInciter.class));
- cards.add(new SetCardInfo("Bloodrage Brawler", 121, Rarity.UNCOMMON, mage.cards.b.BloodrageBrawler.class));
- cards.add(new SetCardInfo("Bone Picker", 81, Rarity.UNCOMMON, mage.cards.b.BonePicker.class));
- cards.add(new SetCardInfo("Bounty of the Luxa", 196, Rarity.RARE, mage.cards.b.BountyOfTheLuxa.class));
- cards.add(new SetCardInfo("Bontu's Monument", 225, Rarity.UNCOMMON, mage.cards.b.BontusMonument.class));
- cards.add(new SetCardInfo("Bontu the Glorified", 82, Rarity.MYTHIC, mage.cards.b.BontuTheGlorified.class));
- cards.add(new SetCardInfo("Brute Strength", 122, Rarity.COMMON, mage.cards.b.BruteStrength.class));
- cards.add(new SetCardInfo("By Force", 123, Rarity.UNCOMMON, mage.cards.b.ByForce.class));
- cards.add(new SetCardInfo("Cancel", 44, Rarity.COMMON, mage.cards.c.Cancel.class));
- cards.add(new SetCardInfo("Canyon Slough", 239, Rarity.RARE, mage.cards.c.CanyonSlough.class));
- cards.add(new SetCardInfo("Cartouche of Ambition", 83, Rarity.COMMON, mage.cards.c.CartoucheOfAmbition.class));
- cards.add(new SetCardInfo("Cartouche of Knowledge", 45, Rarity.COMMON, mage.cards.c.CartoucheOfKnowledge.class));
- cards.add(new SetCardInfo("Cartouche of Solidarity", 7, Rarity.COMMON, mage.cards.c.CartoucheOfSolidarity.class));
- cards.add(new SetCardInfo("Cartouche of Strength", 158, Rarity.COMMON, mage.cards.c.CartoucheOfStrength.class));
- cards.add(new SetCardInfo("Cartouche of Zeal", 124, Rarity.COMMON, mage.cards.c.CartoucheOfZeal.class));
- cards.add(new SetCardInfo("Cascading Cataracts", 240, Rarity.RARE, mage.cards.c.CascadingCataracts.class));
- cards.add(new SetCardInfo("Cast Out", 8, Rarity.UNCOMMON, mage.cards.c.CastOut.class));
- cards.add(new SetCardInfo("Censor", 46, Rarity.UNCOMMON, mage.cards.c.Censor.class));
- cards.add(new SetCardInfo("Champion of Rhonas", 159, Rarity.RARE, mage.cards.c.ChampionOfRhonas.class));
- cards.add(new SetCardInfo("Channeler Initiate", 160, Rarity.RARE, mage.cards.c.ChannelerInitiate.class));
- cards.add(new SetCardInfo("Colossapede", 161, Rarity.COMMON, mage.cards.c.Colossapede.class));
- cards.add(new SetCardInfo("Combat Celebrant", 125, Rarity.MYTHIC, mage.cards.c.CombatCelebrant.class));
- cards.add(new SetCardInfo("Commit // Memory", 211, Rarity.RARE, mage.cards.c.CommitMemory.class));
- cards.add(new SetCardInfo("Companion of the Trials", 271, Rarity.UNCOMMON, mage.cards.c.CompanionOfTheTrials.class));
- cards.add(new SetCardInfo("Compelling Argument", 47, Rarity.COMMON, mage.cards.c.CompellingArgument.class));
- cards.add(new SetCardInfo("Compulsory Rest", 9, Rarity.COMMON, mage.cards.c.CompulsoryRest.class));
- cards.add(new SetCardInfo("Consuming Fervor", 126, Rarity.UNCOMMON, mage.cards.c.ConsumingFervor.class));
- cards.add(new SetCardInfo("Cradle of the Accursed", 241, Rarity.COMMON, mage.cards.c.CradleOfTheAccursed.class));
- cards.add(new SetCardInfo("Crocodile of the Crossing", 162, Rarity.UNCOMMON, mage.cards.c.CrocodileOfTheCrossing.class));
- cards.add(new SetCardInfo("Cryptic Serpent", 48, Rarity.UNCOMMON, mage.cards.c.CrypticSerpent.class));
- cards.add(new SetCardInfo("Cruel Reality", 84, Rarity.MYTHIC, mage.cards.c.CruelReality.class));
- cards.add(new SetCardInfo("Curator of Mysteries", 49, Rarity.RARE, mage.cards.c.CuratorOfMysteries.class));
- cards.add(new SetCardInfo("Cursed Minotaur", 85, Rarity.COMMON, mage.cards.c.CursedMinotaur.class));
- cards.add(new SetCardInfo("Cut // Ribbons", 223, Rarity.RARE, mage.cards.c.CutRibbons.class));
- cards.add(new SetCardInfo("Decimator Beetle", 197, Rarity.UNCOMMON, mage.cards.d.DecimatorBeetle.class));
- cards.add(new SetCardInfo("Decision Paralysis", 50, Rarity.COMMON, mage.cards.d.DecisionParalysis.class));
- cards.add(new SetCardInfo("Deem Worthy", 127, Rarity.UNCOMMON, mage.cards.d.DeemWorthy.class));
- cards.add(new SetCardInfo("Defiant Greatmaw", 163, Rarity.UNCOMMON, mage.cards.d.DefiantGreatmaw.class));
- cards.add(new SetCardInfo("Desert Cerodon", 128, Rarity.COMMON, mage.cards.d.DesertCerodon.class));
- cards.add(new SetCardInfo("Desiccated Naga", 276, Rarity.UNCOMMON, mage.cards.d.DesiccatedNaga.class));
- cards.add(new SetCardInfo("Destined // Lead", 217, Rarity.UNCOMMON, mage.cards.d.DestinedLead.class));
- cards.add(new SetCardInfo("Devoted Crop-Mate", 10, Rarity.UNCOMMON, mage.cards.d.DevotedCropMate.class));
- cards.add(new SetCardInfo("Dispossess", 86, Rarity.RARE, mage.cards.d.Dispossess.class));
- cards.add(new SetCardInfo("Dissenter's Deliverance", 164, Rarity.COMMON, mage.cards.d.DissentersDeliverance.class));
- cards.add(new SetCardInfo("Djeru's Resolve", 11, Rarity.COMMON, mage.cards.d.DjerusResolve.class));
- cards.add(new SetCardInfo("Doomed Dissenter", 87, Rarity.COMMON, mage.cards.d.DoomedDissenter.class));
- cards.add(new SetCardInfo("Drake Haven", 51, Rarity.RARE, mage.cards.d.DrakeHaven.class));
- cards.add(new SetCardInfo("Dread Wanderer", 88, Rarity.RARE, mage.cards.d.DreadWanderer.class));
- cards.add(new SetCardInfo("Dune Beetle", 89, Rarity.COMMON, mage.cards.d.DuneBeetle.class));
- cards.add(new SetCardInfo("Dusk // Dawn", 210, Rarity.RARE, mage.cards.d.DuskDawn.class));
- cards.add(new SetCardInfo("Edifice of Authority", 226, Rarity.UNCOMMON, mage.cards.e.EdificeOfAuthority.class));
- cards.add(new SetCardInfo("Electrify", 129, Rarity.COMMON, mage.cards.e.Electrify.class));
- cards.add(new SetCardInfo("Embalmer's Tools", 227, Rarity.UNCOMMON, mage.cards.e.EmbalmersTools.class));
- cards.add(new SetCardInfo("Emberhorn Minotaur", 130, Rarity.COMMON, mage.cards.e.EmberhornMinotaur.class));
- cards.add(new SetCardInfo("Enigma Drake", 198, Rarity.UNCOMMON, mage.cards.e.EnigmaDrake.class));
- cards.add(new SetCardInfo("Essence Scatter", 52, Rarity.COMMON, mage.cards.e.EssenceScatter.class));
- cards.add(new SetCardInfo("Evolving Wilds", 242, Rarity.COMMON, mage.cards.e.EvolvingWilds.class));
- cards.add(new SetCardInfo("Exemplar of Strength", 165, Rarity.UNCOMMON, mage.cards.e.ExemplarOfStrength.class));
- cards.add(new SetCardInfo("Failure // Comply", 221, Rarity.RARE, mage.cards.f.FailureComply.class));
- cards.add(new SetCardInfo("Faith of the Devoted", 90, Rarity.UNCOMMON, mage.cards.f.FaithOfTheDevoted.class));
- cards.add(new SetCardInfo("Fan Bearer", 12, Rarity.COMMON, mage.cards.f.FanBearer.class));
- cards.add(new SetCardInfo("Festering Mummy", 91, Rarity.COMMON, mage.cards.f.FesteringMummy.class));
- cards.add(new SetCardInfo("Fetid Pools", 243, Rarity.RARE, mage.cards.f.FetidPools.class));
- cards.add(new SetCardInfo("Final Reward", 92, Rarity.COMMON, mage.cards.f.FinalReward.class));
- cards.add(new SetCardInfo("Flameblade Adept", 131, Rarity.UNCOMMON, mage.cards.f.FlamebladeAdept.class));
- cards.add(new SetCardInfo("Fling", 132, Rarity.COMMON, mage.cards.f.Fling.class));
- cards.add(new SetCardInfo("Floodwaters", 53, Rarity.COMMON, mage.cards.f.Floodwaters.class));
- cards.add(new SetCardInfo("Forest", 254, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(null, true)));
- cards.add(new SetCardInfo("Forest", 267, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(null, true)));
- cards.add(new SetCardInfo("Forest", 268, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(null, true)));
- cards.add(new SetCardInfo("Forest", 269, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(null, true)));
- cards.add(new SetCardInfo("Forsake the Worldly", 13, Rarity.COMMON, mage.cards.f.ForsakeTheWorldly.class));
- cards.add(new SetCardInfo("Foul Orchard", 279, Rarity.COMMON, mage.cards.f.FoulOrchard.class));
- cards.add(new SetCardInfo("Galestrike", 54, Rarity.UNCOMMON, mage.cards.g.Galestrike.class));
- cards.add(new SetCardInfo("Giant Spider", 166, Rarity.COMMON, mage.cards.g.GiantSpider.class));
- cards.add(new SetCardInfo("Gideon of the Trials", 14, Rarity.MYTHIC, mage.cards.g.GideonOfTheTrials.class));
- cards.add(new SetCardInfo("Gideon's Intervention", 15, Rarity.RARE, mage.cards.g.GideonsIntervention.class));
- cards.add(new SetCardInfo("Gideon's Resolve", 272, Rarity.RARE, mage.cards.g.GideonsResolve.class));
- cards.add(new SetCardInfo("Gideon, Martial Paragon", 270, Rarity.MYTHIC, mage.cards.g.GideonMartialParagon.class));
- cards.add(new SetCardInfo("Gift of Paradise", 167, Rarity.COMMON, mage.cards.g.GiftOfParadise.class));
- cards.add(new SetCardInfo("Glorious End", 133, Rarity.MYTHIC, mage.cards.g.GloriousEnd.class));
- cards.add(new SetCardInfo("Glory-Bound Initiate", 16, Rarity.RARE, mage.cards.g.GloryBoundInitiate.class));
- cards.add(new SetCardInfo("Glorybringer", 134, Rarity.RARE, mage.cards.g.Glorybringer.class));
- cards.add(new SetCardInfo("Glyph Keeper", 55, Rarity.RARE, mage.cards.g.GlyphKeeper.class));
- cards.add(new SetCardInfo("Graceful Cat", 273, Rarity.COMMON, mage.cards.g.GracefulCat.class));
- cards.add(new SetCardInfo("Grasping Dunes", 244, Rarity.UNCOMMON, mage.cards.g.GraspingDunes.class));
- cards.add(new SetCardInfo("Gravedigger", 93, Rarity.UNCOMMON, mage.cards.g.Gravedigger.class));
- cards.add(new SetCardInfo("Greater Sandwurm", 168, Rarity.COMMON, mage.cards.g.GreaterSandwurm.class));
- cards.add(new SetCardInfo("Grim Strider", 94, Rarity.UNCOMMON, mage.cards.g.GrimStrider.class));
- cards.add(new SetCardInfo("Gust Walker", 17, Rarity.COMMON, mage.cards.g.GustWalker.class));
- cards.add(new SetCardInfo("Hapatra's Mark", 169, Rarity.UNCOMMON, mage.cards.h.HapatrasMark.class));
- cards.add(new SetCardInfo("Hapatra, Vizier of Poisons", 199, Rarity.RARE, mage.cards.h.HapatraVizierOfPoisons.class));
- cards.add(new SetCardInfo("Harsh Mentor", 135, Rarity.RARE, mage.cards.h.HarshMentor.class));
- cards.add(new SetCardInfo("Harvest Season", 170, Rarity.RARE, mage.cards.h.HarvestSeason.class));
- cards.add(new SetCardInfo("Haze of Pollen", 171, Rarity.COMMON, mage.cards.h.HazeOfPollen.class));
- cards.add(new SetCardInfo("Hazoret the Fervent", 136, Rarity.MYTHIC, mage.cards.h.HazoretTheFervent.class));
- cards.add(new SetCardInfo("Hazoret's Favor", 137, Rarity.RARE, mage.cards.h.HazoretsFavor.class));
- cards.add(new SetCardInfo("Hazoret's Monument", 229, Rarity.UNCOMMON, mage.cards.h.HazoretsMonument.class));
- cards.add(new SetCardInfo("Heart-Piercer Manticore", 138, Rarity.RARE, mage.cards.h.HeartPiercerManticore.class));
- cards.add(new SetCardInfo("Heaven // Earth", 224, Rarity.RARE, mage.cards.h.HeavenEarth.class));
- cards.add(new SetCardInfo("Hekma Sentinels", 56, Rarity.COMMON, mage.cards.h.HekmaSentinels.class));
- cards.add(new SetCardInfo("Hieroglyphic Illumination", 57, Rarity.COMMON, mage.cards.h.HieroglyphicIllumination.class));
- cards.add(new SetCardInfo("Honed Khopesh", 230, Rarity.COMMON, mage.cards.h.HonedKhopesh.class));
- cards.add(new SetCardInfo("Honored Crop-Captain", 200, Rarity.UNCOMMON, mage.cards.h.HonoredCropCaptain.class));
- cards.add(new SetCardInfo("Honored Hydra", 172, Rarity.RARE, mage.cards.h.HonoredHydra.class));
- cards.add(new SetCardInfo("Hooded Brawler", 173, Rarity.COMMON, mage.cards.h.HoodedBrawler.class));
- cards.add(new SetCardInfo("Horror of the Broken Lands", 95, Rarity.COMMON, mage.cards.h.HorrorOfTheBrokenLands.class));
- cards.add(new SetCardInfo("Hyena Pack", 139, Rarity.COMMON, mage.cards.h.HyenaPack.class));
- cards.add(new SetCardInfo("Illusory Wrappings", 58, Rarity.COMMON, mage.cards.i.IllusoryWrappings.class));
- cards.add(new SetCardInfo("Impeccable Timing", 18, Rarity.COMMON, mage.cards.i.ImpeccableTiming.class));
- cards.add(new SetCardInfo("In Oketra's Name", 19, Rarity.COMMON, mage.cards.i.InOketrasName.class));
- cards.add(new SetCardInfo("Initiate's Companion", 174, Rarity.COMMON, mage.cards.i.InitiatesCompanion.class));
- cards.add(new SetCardInfo("Insult // Injury", 213, Rarity.RARE, mage.cards.i.InsultInjury.class));
- cards.add(new SetCardInfo("Irrigated Farmland", 245, Rarity.RARE, mage.cards.i.IrrigatedFarmland.class));
- cards.add(new SetCardInfo("Island", 251, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(null, true)));
- cards.add(new SetCardInfo("Island", 258, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(null, true)));
- cards.add(new SetCardInfo("Island", 259, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(null, true)));
- cards.add(new SetCardInfo("Island", 260, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(null, true)));
- cards.add(new SetCardInfo("Kefnet the Mindful", 59, Rarity.MYTHIC, mage.cards.k.KefnetTheMindful.class));
- cards.add(new SetCardInfo("Kefnet's Monument", 231, Rarity.UNCOMMON, mage.cards.k.KefnetsMonument.class));
- cards.add(new SetCardInfo("Khenra Charioteer", 201, Rarity.UNCOMMON, mage.cards.k.KhenraCharioteer.class));
- cards.add(new SetCardInfo("Labyrinth Guardian", 60, Rarity.UNCOMMON, mage.cards.l.LabyrinthGuardian.class));
- cards.add(new SetCardInfo("Lay Bare the Heart", 96, Rarity.UNCOMMON, mage.cards.l.LayBareTheHeart.class));
- cards.add(new SetCardInfo("Lay Claim", 61, Rarity.UNCOMMON, mage.cards.l.LayClaim.class));
- cards.add(new SetCardInfo("Liliana's Influence", 277, Rarity.RARE, mage.cards.l.LilianasInfluence.class));
- cards.add(new SetCardInfo("Liliana's Mastery", 98, Rarity.RARE, mage.cards.l.LilianasMastery.class));
- cards.add(new SetCardInfo("Liliana, Death Wielder", 274, Rarity.MYTHIC, mage.cards.l.LilianaDeathWielder.class));
- cards.add(new SetCardInfo("Liliana, Death's Majesty", 97, Rarity.MYTHIC, mage.cards.l.LilianaDeathsMajesty.class));
- cards.add(new SetCardInfo("Limits of Solidarity", 140, Rarity.UNCOMMON, mage.cards.l.LimitsOfSolidarity.class));
- cards.add(new SetCardInfo("Lord of the Accursed", 99, Rarity.UNCOMMON, mage.cards.l.LordOfTheAccursed.class));
- cards.add(new SetCardInfo("Luxa River Shrine", 232, Rarity.COMMON, mage.cards.l.LuxaRiverShrine.class));
- cards.add(new SetCardInfo("Magma Spray", 141, Rarity.COMMON, mage.cards.m.MagmaSpray.class));
- cards.add(new SetCardInfo("Manglehorn", 175, Rarity.UNCOMMON, mage.cards.m.Manglehorn.class));
- cards.add(new SetCardInfo("Manticore of the Gauntlet", 142, Rarity.COMMON, mage.cards.m.ManticoreOfTheGauntlet.class));
- cards.add(new SetCardInfo("Merciless Javelineer", 202, Rarity.UNCOMMON, mage.cards.m.MercilessJavelineer.class));
- cards.add(new SetCardInfo("Miasmic Mummy", 100, Rarity.COMMON, mage.cards.m.MiasmicMummy.class));
- cards.add(new SetCardInfo("Mighty Leap", 20, Rarity.COMMON, mage.cards.m.MightyLeap.class));
- cards.add(new SetCardInfo("Minotaur Sureshot", 143, Rarity.COMMON, mage.cards.m.MinotaurSureshot.class));
- cards.add(new SetCardInfo("Mountain", 253, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(null, true)));
- cards.add(new SetCardInfo("Mountain", 264, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(null, true)));
- cards.add(new SetCardInfo("Mountain", 265, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(null, true)));
- cards.add(new SetCardInfo("Mountain", 266, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(null, true)));
- cards.add(new SetCardInfo("Mouth // Feed", 214, Rarity.RARE, mage.cards.m.MouthFeed.class));
- cards.add(new SetCardInfo("Naga Oracle", 62, Rarity.COMMON, mage.cards.n.NagaOracle.class));
- cards.add(new SetCardInfo("Naga Vitalist", 176, Rarity.COMMON, mage.cards.n.NagaVitalist.class));
- cards.add(new SetCardInfo("Nef-Crop Entangler", 144, Rarity.COMMON, mage.cards.n.NefCropEntangler.class));
- cards.add(new SetCardInfo("Neheb, the Worthy", 203, Rarity.RARE, mage.cards.n.NehebTheWorthy.class));
- cards.add(new SetCardInfo("Nest of Scarabs", 101, Rarity.UNCOMMON, mage.cards.n.NestOfScarabs.class));
- cards.add(new SetCardInfo("Never // Return", 212, Rarity.RARE, mage.cards.n.NeverReturn.class));
- cards.add(new SetCardInfo("Nimble-Blade Khenra", 145, Rarity.COMMON, mage.cards.n.NimbleBladeKhenra.class));
- cards.add(new SetCardInfo("Nissa, Steward of Elements", 204, Rarity.MYTHIC, mage.cards.n.NissaStewardOfElements.class));
- cards.add(new SetCardInfo("Oashra Cultivator", 177, Rarity.COMMON, mage.cards.o.OashraCultivator.class));
- cards.add(new SetCardInfo("Oketra the True", 21, Rarity.MYTHIC, mage.cards.o.OketraTheTrue.class));
- cards.add(new SetCardInfo("Oketra's Attendant", 22, Rarity.UNCOMMON, mage.cards.o.OketrasAttendant.class));
- cards.add(new SetCardInfo("Oketra's Monument", 233, Rarity.UNCOMMON, mage.cards.o.OketrasMonument.class));
- cards.add(new SetCardInfo("Onward // Victory", 218, Rarity.UNCOMMON, mage.cards.o.OnwardVictory.class));
- cards.add(new SetCardInfo("Open into Wonder", 64, Rarity.UNCOMMON, mage.cards.o.OpenIntoWonder.class));
- cards.add(new SetCardInfo("Oracle's Vault", 234, Rarity.RARE, mage.cards.o.OraclesVault.class));
- cards.add(new SetCardInfo("Ornery Kudu", 178, Rarity.COMMON, mage.cards.o.OrneryKudu.class));
- cards.add(new SetCardInfo("Painful Lesson", 102, Rarity.COMMON, mage.cards.p.PainfulLesson.class));
- cards.add(new SetCardInfo("Painted Bluffs", 246, Rarity.COMMON, mage.cards.p.PaintedBluffs.class));
- cards.add(new SetCardInfo("Pathmaker Initiate", 146, Rarity.COMMON, mage.cards.p.PathmakerInitiate.class));
- cards.add(new SetCardInfo("Pitiless Vizier", 103, Rarity.COMMON, mage.cards.p.PitilessVizier.class));
- cards.add(new SetCardInfo("Plague Belcher", 104, Rarity.RARE, mage.cards.p.PlagueBelcher.class));
- cards.add(new SetCardInfo("Plains", 250, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true)));
- cards.add(new SetCardInfo("Plains", 255, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true)));
- cards.add(new SetCardInfo("Plains", 256, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true)));
- cards.add(new SetCardInfo("Plains", 257, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true)));
- cards.add(new SetCardInfo("Pouncing Cheetah", 179, Rarity.COMMON, mage.cards.p.PouncingCheetah.class));
- cards.add(new SetCardInfo("Prepared // Fight", 220, Rarity.RARE, mage.cards.p.PreparedFight.class));
- cards.add(new SetCardInfo("Protection of the Hekma", 23, Rarity.UNCOMMON, mage.cards.p.ProtectionOfTheHekma.class));
- cards.add(new SetCardInfo("Prowling Serpopard", 180, Rarity.RARE, mage.cards.p.ProwlingSerpopard.class));
- cards.add(new SetCardInfo("Pull from Tomorrow", 65, Rarity.RARE, mage.cards.p.PullFromTomorrow.class));
- cards.add(new SetCardInfo("Pursue Glory", 147, Rarity.COMMON, mage.cards.p.PursueGlory.class));
- cards.add(new SetCardInfo("Quarry Hauler", 181, Rarity.COMMON, mage.cards.q.QuarryHauler.class));
- cards.add(new SetCardInfo("Rags // Riches", 222, Rarity.RARE, mage.cards.r.RagsRiches.class));
- cards.add(new SetCardInfo("Reduce // Rubble", 216, Rarity.UNCOMMON, mage.cards.r.ReduceRubble.class));
- cards.add(new SetCardInfo("Regal Caracal", 24, Rarity.RARE, mage.cards.r.RegalCaracal.class));
- cards.add(new SetCardInfo("Renewed Faith", 25, Rarity.UNCOMMON, mage.cards.r.RenewedFaith.class));
- cards.add(new SetCardInfo("Rhet-Crop Spearmaster", 26, Rarity.COMMON, mage.cards.r.RhetCropSpearmaster.class));
- cards.add(new SetCardInfo("Rhonas's Monument", 236, Rarity.UNCOMMON, mage.cards.r.RhonassMonument.class));
- cards.add(new SetCardInfo("Rhonas, the Indomitable", 182, Rarity.MYTHIC, mage.cards.r.RhonasTheIndomitable.class));
- cards.add(new SetCardInfo("River Serpent", 66, Rarity.COMMON, mage.cards.r.RiverSerpent.class));
- cards.add(new SetCardInfo("Ruthless Sniper", 105, Rarity.UNCOMMON, mage.cards.r.RuthlessSniper.class));
- cards.add(new SetCardInfo("Sacred Cat", 27, Rarity.COMMON, mage.cards.s.SacredCat.class));
- cards.add(new SetCardInfo("Sacred Excavation", 67, Rarity.UNCOMMON, mage.cards.s.SacredExcavation.class));
- cards.add(new SetCardInfo("Samut, Voice of Dissent", 205, Rarity.MYTHIC, mage.cards.s.SamutVoiceOfDissent.class));
- cards.add(new SetCardInfo("Sandwurm Convergence", 183, Rarity.RARE, mage.cards.s.SandwurmConvergence.class));
- cards.add(new SetCardInfo("Scaled Behemoth", 184, Rarity.UNCOMMON, mage.cards.s.ScaledBehemoth.class));
- cards.add(new SetCardInfo("Scarab Feast", 106, Rarity.COMMON, mage.cards.s.ScarabFeast.class));
- cards.add(new SetCardInfo("Scattered Groves", 247, Rarity.RARE, mage.cards.s.ScatteredGroves.class));
- cards.add(new SetCardInfo("Scribe of the Mindful", 68, Rarity.COMMON, mage.cards.s.ScribeOfTheMindful.class));
- cards.add(new SetCardInfo("Seeker of Insight", 69, Rarity.COMMON, mage.cards.s.SeekerOfInsight.class));
- cards.add(new SetCardInfo("Seraph of the Suns", 28, Rarity.UNCOMMON, mage.cards.s.SeraphOfTheSuns.class));
- cards.add(new SetCardInfo("Shadow of the Grave", 107, Rarity.RARE, mage.cards.s.ShadowOfTheGrave.class));
- cards.add(new SetCardInfo("Shadowstorm Vizier", 206, Rarity.UNCOMMON, mage.cards.s.ShadowstormVizier.class));
- cards.add(new SetCardInfo("Shed Weakness", 185, Rarity.COMMON, mage.cards.s.ShedWeakness.class));
- cards.add(new SetCardInfo("Shefet Monitor", 186, Rarity.UNCOMMON, mage.cards.s.ShefetMonitor.class));
- cards.add(new SetCardInfo("Sheltered Thicket", 248, Rarity.RARE, mage.cards.s.ShelteredThicket.class));
- cards.add(new SetCardInfo("Shimmerscale Drake", 70, Rarity.COMMON, mage.cards.s.ShimmerscaleDrake.class));
- cards.add(new SetCardInfo("Sixth Sense", 187, Rarity.UNCOMMON, mage.cards.s.SixthSense.class));
- cards.add(new SetCardInfo("Slither Blade", 71, Rarity.COMMON, mage.cards.s.SlitherBlade.class));
- cards.add(new SetCardInfo("Soul-Scar Mage", 148, Rarity.RARE, mage.cards.s.SoulScarMage.class));
- cards.add(new SetCardInfo("Soulstinger", 108, Rarity.COMMON, mage.cards.s.Soulstinger.class));
- cards.add(new SetCardInfo("Sparring Mummy", 29, Rarity.COMMON, mage.cards.s.SparringMummy.class));
- cards.add(new SetCardInfo("Spidery Grasp", 188, Rarity.COMMON, mage.cards.s.SpideryGrasp.class));
- cards.add(new SetCardInfo("Splendid Agony", 109, Rarity.COMMON, mage.cards.s.SplendidAgony.class));
- cards.add(new SetCardInfo("Spring // Mind", 219, Rarity.UNCOMMON, mage.cards.s.SpringMind.class));
- cards.add(new SetCardInfo("Start // Finish", 215, Rarity.UNCOMMON, mage.cards.s.StartFinish.class));
- cards.add(new SetCardInfo("Stinging Shot", 189, Rarity.COMMON, mage.cards.s.StingingShot.class));
- cards.add(new SetCardInfo("Stir the Sands", 110, Rarity.UNCOMMON, mage.cards.s.StirTheSands.class));
- cards.add(new SetCardInfo("Sunscorched Desert", 249, Rarity.COMMON, mage.cards.s.SunscorchedDesert.class));
- cards.add(new SetCardInfo("Supernatural Stamina", 111, Rarity.COMMON, mage.cards.s.SupernaturalStamina.class));
- cards.add(new SetCardInfo("Supply Caravan", 30, Rarity.COMMON, mage.cards.s.SupplyCaravan.class));
- cards.add(new SetCardInfo("Swamp", 252, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(null, true)));
- cards.add(new SetCardInfo("Swamp", 261, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(null, true)));
- cards.add(new SetCardInfo("Swamp", 262, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(null, true)));
- cards.add(new SetCardInfo("Swamp", 263, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(null, true)));
- cards.add(new SetCardInfo("Sweltering Suns", 149, Rarity.RARE, mage.cards.s.SwelteringSuns.class));
- cards.add(new SetCardInfo("Synchronized Strike", 190, Rarity.UNCOMMON, mage.cards.s.SynchronizedStrike.class));
- cards.add(new SetCardInfo("Tah-Crop Elite", 31, Rarity.COMMON, mage.cards.t.TahCropElite.class));
- cards.add(new SetCardInfo("Tah-Crop Skirmisher", 72, Rarity.COMMON, mage.cards.t.TahCropSkirmisher.class));
- cards.add(new SetCardInfo("Tattered Mummy", 278, Rarity.COMMON, mage.cards.t.TatteredMummy.class));
- cards.add(new SetCardInfo("Temmet, Vizier of Naktamun", 207, Rarity.RARE, mage.cards.t.TemmetVizierOfNaktamun.class));
- cards.add(new SetCardInfo("Those Who Serve", 32, Rarity.COMMON, mage.cards.t.ThoseWhoServe.class));
- cards.add(new SetCardInfo("Thresher Lizard", 150, Rarity.COMMON, mage.cards.t.ThresherLizard.class));
- cards.add(new SetCardInfo("Throne of the God-Pharaoh", 237, Rarity.RARE, mage.cards.t.ThroneOfTheGodPharaoh.class));
- cards.add(new SetCardInfo("Time to Reflect", 33, Rarity.UNCOMMON, mage.cards.t.TimeToReflect.class));
- cards.add(new SetCardInfo("Tormenting Voice", 151, Rarity.COMMON, mage.cards.t.TormentingVoice.class));
- cards.add(new SetCardInfo("Trespasser's Curse", 112, Rarity.COMMON, mage.cards.t.TrespassersCurse.class));
- cards.add(new SetCardInfo("Trial of Ambition", 113, Rarity.UNCOMMON, mage.cards.t.TrialOfAmbition.class));
- cards.add(new SetCardInfo("Trial of Knowledge", 73, Rarity.UNCOMMON, mage.cards.t.TrialOfKnowledge.class));
- cards.add(new SetCardInfo("Trial of Solidarity", 34, Rarity.UNCOMMON, mage.cards.t.TrialOfSolidarity.class));
- cards.add(new SetCardInfo("Trial of Strength", 191, Rarity.UNCOMMON, mage.cards.t.TrialOfStrength.class));
- cards.add(new SetCardInfo("Trial of Zeal", 152, Rarity.UNCOMMON, mage.cards.t.TrialOfZeal.class));
- cards.add(new SetCardInfo("Trueheart Duelist", 35, Rarity.UNCOMMON, mage.cards.t.TrueheartDuelist.class));
- cards.add(new SetCardInfo("Trueheart Twins", 153, Rarity.UNCOMMON, mage.cards.t.TrueheartTwins.class));
- cards.add(new SetCardInfo("Unburden", 114, Rarity.COMMON, mage.cards.u.Unburden.class));
- cards.add(new SetCardInfo("Unwavering Initiate", 36, Rarity.COMMON, mage.cards.u.UnwaveringInitiate.class));
- cards.add(new SetCardInfo("Violent Impact", 154, Rarity.COMMON, mage.cards.v.ViolentImpact.class));
- cards.add(new SetCardInfo("Vizier of Deferment", 37, Rarity.UNCOMMON, mage.cards.v.VizierOfDeferment.class));
- cards.add(new SetCardInfo("Vizier of Remedies", 38, Rarity.UNCOMMON, mage.cards.v.VizierOfRemedies.class));
- cards.add(new SetCardInfo("Vizier of Tumbling Sands", 75, Rarity.UNCOMMON, mage.cards.v.VizierOfTumblingSands.class));
- cards.add(new SetCardInfo("Vizier of the Menagerie", 192, Rarity.MYTHIC, mage.cards.v.VizierOfTheMenagerie.class));
- cards.add(new SetCardInfo("Wander in Death", 115, Rarity.COMMON, mage.cards.w.WanderInDeath.class));
- cards.add(new SetCardInfo("Warfire Javelineer", 155, Rarity.UNCOMMON, mage.cards.w.WarfireJavelineer.class));
- cards.add(new SetCardInfo("Wasteland Scorpion", 116, Rarity.COMMON, mage.cards.w.WastelandScorpion.class));
- cards.add(new SetCardInfo("Watchers of the Dead", 238, Rarity.UNCOMMON, mage.cards.w.WatchersOfTheDead.class));
- cards.add(new SetCardInfo("Watchful Naga", 193, Rarity.UNCOMMON, mage.cards.w.WatchfulNaga.class));
- cards.add(new SetCardInfo("Wayward Servant", 208, Rarity.UNCOMMON, mage.cards.w.WaywardServant.class));
- cards.add(new SetCardInfo("Weaver of Currents", 209, Rarity.UNCOMMON, mage.cards.w.WeaverOfCurrents.class));
- cards.add(new SetCardInfo("Winds of Rebuke", 76, Rarity.COMMON, mage.cards.w.WindsOfRebuke.class));
- cards.add(new SetCardInfo("Winged Shepherd", 39, Rarity.COMMON, mage.cards.w.WingedShepherd.class));
- cards.add(new SetCardInfo("Zenith Seeker", 77, Rarity.UNCOMMON, mage.cards.z.ZenithSeeker.class));
- }
-
- @Override
- public List getSpecialLand() {
- if (savedSpecialLand.isEmpty()) {
- CardCriteria criteria = new CardCriteria();
- criteria.setCodes("MPS-AKH");
- criteria.minCardNumber(1);
- criteria.maxCardNumber(30);
- savedSpecialLand.addAll(CardRepository.instance.findCards(criteria));
- }
-
- return new ArrayList<>(savedSpecialLand);
- }
-}
+/*
+ * 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
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those 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.ArrayList;
+import java.util.List;
+import mage.cards.CardGraphicInfo;
+import mage.cards.ExpansionSet;
+import mage.cards.repository.CardCriteria;
+import mage.cards.repository.CardInfo;
+import mage.cards.repository.CardRepository;
+import mage.constants.Rarity;
+import mage.constants.SetType;
+
+/**
+ *
+ * @author fireshoes
+ */
+public class Amonkhet extends ExpansionSet {
+
+ private static final Amonkhet instance = new Amonkhet();
+
+ public static Amonkhet getInstance() {
+ return instance;
+ }
+
+ protected final List savedSpecialLand = new ArrayList<>();
+
+ private Amonkhet() {
+ super("Amonkhet", "AKH", ExpansionSet.buildDate(2017, 4, 28), SetType.EXPANSION);
+ this.blockName = "Amonkhet";
+ this.hasBoosters = true;
+ this.hasBasicLands = true;
+ this.numBoosterLands = 1;
+ this.numBoosterCommon = 10;
+ this.numBoosterUncommon = 3;
+ this.numBoosterRare = 1;
+ this.ratioBoosterMythic = 8;
+ this.maxCardNumberInBooster = 269;
+ this.ratioBoosterSpecialLand = 144;
+
+ cards.add(new SetCardInfo("Ahn-Crop Champion", 194, Rarity.UNCOMMON, mage.cards.a.AhnCropChampion.class));
+ cards.add(new SetCardInfo("Ahn-Crop Crasher", 117, Rarity.UNCOMMON, mage.cards.a.AhnCropCrasher.class));
+ cards.add(new SetCardInfo("Ancient Crab", 40, Rarity.COMMON, mage.cards.a.AncientCrab.class));
+ cards.add(new SetCardInfo("Angel of Sanctions", 1, Rarity.MYTHIC, mage.cards.a.AngelOfSanctions.class));
+ cards.add(new SetCardInfo("Angler Drake", 41, Rarity.UNCOMMON, mage.cards.a.AnglerDrake.class));
+ cards.add(new SetCardInfo("Anointed Procession", 2, Rarity.RARE, mage.cards.a.AnointedProcession.class));
+ cards.add(new SetCardInfo("Anointer Priest", 3, Rarity.COMMON, mage.cards.a.AnointerPriest.class));
+ cards.add(new SetCardInfo("Approach of the Second Sun", 4, Rarity.RARE, mage.cards.a.ApproachOfTheSecondSun.class));
+ cards.add(new SetCardInfo("Archfiend of Ifnir", 78, Rarity.RARE, mage.cards.a.ArchfiendOfIfnir.class));
+ cards.add(new SetCardInfo("As Foretold", 42, Rarity.MYTHIC, mage.cards.a.AsForetold.class));
+ cards.add(new SetCardInfo("Aven Initiate", 43, Rarity.COMMON, mage.cards.a.AvenInitiate.class));
+ cards.add(new SetCardInfo("Aven Mindcensor", 5, Rarity.RARE, mage.cards.a.AvenMindcensor.class));
+ cards.add(new SetCardInfo("Aven Wind Guide", 195, Rarity.UNCOMMON, mage.cards.a.AvenWindGuide.class));
+ cards.add(new SetCardInfo("Baleful Ammit", 79, Rarity.UNCOMMON, mage.cards.b.BalefulAmmit.class));
+ cards.add(new SetCardInfo("Battlefield Scavenger", 118, Rarity.UNCOMMON, mage.cards.b.BattlefieldScavenger.class));
+ cards.add(new SetCardInfo("Benefaction of Rhonas", 156, Rarity.COMMON, mage.cards.b.BenefactionOfRhonas.class));
+ cards.add(new SetCardInfo("Binding Mummy", 6, Rarity.COMMON, mage.cards.b.BindingMummy.class));
+ cards.add(new SetCardInfo("Bitterblade Warrior", 157, Rarity.COMMON, mage.cards.b.BitterbladeWarrior.class));
+ cards.add(new SetCardInfo("Blazing Volley", 119, Rarity.COMMON, mage.cards.b.BlazingVolley.class));
+ cards.add(new SetCardInfo("Blighted Bat", 80, Rarity.COMMON, mage.cards.b.BlightedBat.class));
+ cards.add(new SetCardInfo("Bloodlust Inciter", 120, Rarity.COMMON, mage.cards.b.BloodlustInciter.class));
+ cards.add(new SetCardInfo("Bloodrage Brawler", 121, Rarity.UNCOMMON, mage.cards.b.BloodrageBrawler.class));
+ cards.add(new SetCardInfo("Bone Picker", 81, Rarity.UNCOMMON, mage.cards.b.BonePicker.class));
+ cards.add(new SetCardInfo("Bounty of the Luxa", 196, Rarity.RARE, mage.cards.b.BountyOfTheLuxa.class));
+ cards.add(new SetCardInfo("Bontu's Monument", 225, Rarity.UNCOMMON, mage.cards.b.BontusMonument.class));
+ cards.add(new SetCardInfo("Bontu the Glorified", 82, Rarity.MYTHIC, mage.cards.b.BontuTheGlorified.class));
+ cards.add(new SetCardInfo("Brute Strength", 122, Rarity.COMMON, mage.cards.b.BruteStrength.class));
+ cards.add(new SetCardInfo("By Force", 123, Rarity.UNCOMMON, mage.cards.b.ByForce.class));
+ cards.add(new SetCardInfo("Cancel", 44, Rarity.COMMON, mage.cards.c.Cancel.class));
+ cards.add(new SetCardInfo("Canyon Slough", 239, Rarity.RARE, mage.cards.c.CanyonSlough.class));
+ cards.add(new SetCardInfo("Cartouche of Ambition", 83, Rarity.COMMON, mage.cards.c.CartoucheOfAmbition.class));
+ cards.add(new SetCardInfo("Cartouche of Knowledge", 45, Rarity.COMMON, mage.cards.c.CartoucheOfKnowledge.class));
+ cards.add(new SetCardInfo("Cartouche of Solidarity", 7, Rarity.COMMON, mage.cards.c.CartoucheOfSolidarity.class));
+ cards.add(new SetCardInfo("Cartouche of Strength", 158, Rarity.COMMON, mage.cards.c.CartoucheOfStrength.class));
+ cards.add(new SetCardInfo("Cartouche of Zeal", 124, Rarity.COMMON, mage.cards.c.CartoucheOfZeal.class));
+ cards.add(new SetCardInfo("Cascading Cataracts", 240, Rarity.RARE, mage.cards.c.CascadingCataracts.class));
+ cards.add(new SetCardInfo("Cast Out", 8, Rarity.UNCOMMON, mage.cards.c.CastOut.class));
+ cards.add(new SetCardInfo("Censor", 46, Rarity.UNCOMMON, mage.cards.c.Censor.class));
+ cards.add(new SetCardInfo("Champion of Rhonas", 159, Rarity.RARE, mage.cards.c.ChampionOfRhonas.class));
+ cards.add(new SetCardInfo("Channeler Initiate", 160, Rarity.RARE, mage.cards.c.ChannelerInitiate.class));
+ cards.add(new SetCardInfo("Colossapede", 161, Rarity.COMMON, mage.cards.c.Colossapede.class));
+ cards.add(new SetCardInfo("Combat Celebrant", 125, Rarity.MYTHIC, mage.cards.c.CombatCelebrant.class));
+ cards.add(new SetCardInfo("Commit // Memory", 211, Rarity.RARE, mage.cards.c.CommitMemory.class));
+ cards.add(new SetCardInfo("Companion of the Trials", 271, Rarity.UNCOMMON, mage.cards.c.CompanionOfTheTrials.class));
+ cards.add(new SetCardInfo("Compelling Argument", 47, Rarity.COMMON, mage.cards.c.CompellingArgument.class));
+ cards.add(new SetCardInfo("Compulsory Rest", 9, Rarity.COMMON, mage.cards.c.CompulsoryRest.class));
+ cards.add(new SetCardInfo("Consuming Fervor", 126, Rarity.UNCOMMON, mage.cards.c.ConsumingFervor.class));
+ cards.add(new SetCardInfo("Cradle of the Accursed", 241, Rarity.COMMON, mage.cards.c.CradleOfTheAccursed.class));
+ cards.add(new SetCardInfo("Crocodile of the Crossing", 162, Rarity.UNCOMMON, mage.cards.c.CrocodileOfTheCrossing.class));
+ cards.add(new SetCardInfo("Cryptic Serpent", 48, Rarity.UNCOMMON, mage.cards.c.CrypticSerpent.class));
+ cards.add(new SetCardInfo("Cruel Reality", 84, Rarity.MYTHIC, mage.cards.c.CruelReality.class));
+ cards.add(new SetCardInfo("Curator of Mysteries", 49, Rarity.RARE, mage.cards.c.CuratorOfMysteries.class));
+ cards.add(new SetCardInfo("Cursed Minotaur", 85, Rarity.COMMON, mage.cards.c.CursedMinotaur.class));
+ cards.add(new SetCardInfo("Cut // Ribbons", 223, Rarity.RARE, mage.cards.c.CutRibbons.class));
+ cards.add(new SetCardInfo("Decimator Beetle", 197, Rarity.UNCOMMON, mage.cards.d.DecimatorBeetle.class));
+ cards.add(new SetCardInfo("Decision Paralysis", 50, Rarity.COMMON, mage.cards.d.DecisionParalysis.class));
+ cards.add(new SetCardInfo("Deem Worthy", 127, Rarity.UNCOMMON, mage.cards.d.DeemWorthy.class));
+ cards.add(new SetCardInfo("Defiant Greatmaw", 163, Rarity.UNCOMMON, mage.cards.d.DefiantGreatmaw.class));
+ cards.add(new SetCardInfo("Desert Cerodon", 128, Rarity.COMMON, mage.cards.d.DesertCerodon.class));
+ cards.add(new SetCardInfo("Desiccated Naga", 276, Rarity.UNCOMMON, mage.cards.d.DesiccatedNaga.class));
+ cards.add(new SetCardInfo("Destined // Lead", 217, Rarity.UNCOMMON, mage.cards.d.DestinedLead.class));
+ cards.add(new SetCardInfo("Devoted Crop-Mate", 10, Rarity.UNCOMMON, mage.cards.d.DevotedCropMate.class));
+ cards.add(new SetCardInfo("Dispossess", 86, Rarity.RARE, mage.cards.d.Dispossess.class));
+ cards.add(new SetCardInfo("Dissenter's Deliverance", 164, Rarity.COMMON, mage.cards.d.DissentersDeliverance.class));
+ cards.add(new SetCardInfo("Djeru's Resolve", 11, Rarity.COMMON, mage.cards.d.DjerusResolve.class));
+ cards.add(new SetCardInfo("Doomed Dissenter", 87, Rarity.COMMON, mage.cards.d.DoomedDissenter.class));
+ cards.add(new SetCardInfo("Drake Haven", 51, Rarity.RARE, mage.cards.d.DrakeHaven.class));
+ cards.add(new SetCardInfo("Dread Wanderer", 88, Rarity.RARE, mage.cards.d.DreadWanderer.class));
+ cards.add(new SetCardInfo("Dune Beetle", 89, Rarity.COMMON, mage.cards.d.DuneBeetle.class));
+ cards.add(new SetCardInfo("Dusk // Dawn", 210, Rarity.RARE, mage.cards.d.DuskDawn.class));
+ cards.add(new SetCardInfo("Edifice of Authority", 226, Rarity.UNCOMMON, mage.cards.e.EdificeOfAuthority.class));
+ cards.add(new SetCardInfo("Electrify", 129, Rarity.COMMON, mage.cards.e.Electrify.class));
+ cards.add(new SetCardInfo("Embalmer's Tools", 227, Rarity.UNCOMMON, mage.cards.e.EmbalmersTools.class));
+ cards.add(new SetCardInfo("Emberhorn Minotaur", 130, Rarity.COMMON, mage.cards.e.EmberhornMinotaur.class));
+ cards.add(new SetCardInfo("Enigma Drake", 198, Rarity.UNCOMMON, mage.cards.e.EnigmaDrake.class));
+ cards.add(new SetCardInfo("Essence Scatter", 52, Rarity.COMMON, mage.cards.e.EssenceScatter.class));
+ cards.add(new SetCardInfo("Evolving Wilds", 242, Rarity.COMMON, mage.cards.e.EvolvingWilds.class));
+ cards.add(new SetCardInfo("Exemplar of Strength", 165, Rarity.UNCOMMON, mage.cards.e.ExemplarOfStrength.class));
+ cards.add(new SetCardInfo("Failure // Comply", 221, Rarity.RARE, mage.cards.f.FailureComply.class));
+ cards.add(new SetCardInfo("Faith of the Devoted", 90, Rarity.UNCOMMON, mage.cards.f.FaithOfTheDevoted.class));
+ cards.add(new SetCardInfo("Fan Bearer", 12, Rarity.COMMON, mage.cards.f.FanBearer.class));
+ cards.add(new SetCardInfo("Festering Mummy", 91, Rarity.COMMON, mage.cards.f.FesteringMummy.class));
+ cards.add(new SetCardInfo("Fetid Pools", 243, Rarity.RARE, mage.cards.f.FetidPools.class));
+ cards.add(new SetCardInfo("Final Reward", 92, Rarity.COMMON, mage.cards.f.FinalReward.class));
+ cards.add(new SetCardInfo("Flameblade Adept", 131, Rarity.UNCOMMON, mage.cards.f.FlamebladeAdept.class));
+ cards.add(new SetCardInfo("Fling", 132, Rarity.COMMON, mage.cards.f.Fling.class));
+ cards.add(new SetCardInfo("Floodwaters", 53, Rarity.COMMON, mage.cards.f.Floodwaters.class));
+ cards.add(new SetCardInfo("Forest", 254, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(null, true)));
+ cards.add(new SetCardInfo("Forest", 267, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(null, true)));
+ cards.add(new SetCardInfo("Forest", 268, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(null, true)));
+ cards.add(new SetCardInfo("Forest", 269, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(null, true)));
+ cards.add(new SetCardInfo("Forsake the Worldly", 13, Rarity.COMMON, mage.cards.f.ForsakeTheWorldly.class));
+ cards.add(new SetCardInfo("Foul Orchard", 279, Rarity.COMMON, mage.cards.f.FoulOrchard.class));
+ cards.add(new SetCardInfo("Galestrike", 54, Rarity.UNCOMMON, mage.cards.g.Galestrike.class));
+ cards.add(new SetCardInfo("Gate to the Afterlife", 228, Rarity.UNCOMMON, mage.cards.g.GateToTheAfterlife.class));
+ cards.add(new SetCardInfo("Giant Spider", 166, Rarity.COMMON, mage.cards.g.GiantSpider.class));
+ cards.add(new SetCardInfo("Gideon of the Trials", 14, Rarity.MYTHIC, mage.cards.g.GideonOfTheTrials.class));
+ cards.add(new SetCardInfo("Gideon's Intervention", 15, Rarity.RARE, mage.cards.g.GideonsIntervention.class));
+ cards.add(new SetCardInfo("Gideon's Resolve", 272, Rarity.RARE, mage.cards.g.GideonsResolve.class));
+ cards.add(new SetCardInfo("Gideon, Martial Paragon", 270, Rarity.MYTHIC, mage.cards.g.GideonMartialParagon.class));
+ cards.add(new SetCardInfo("Gift of Paradise", 167, Rarity.COMMON, mage.cards.g.GiftOfParadise.class));
+ cards.add(new SetCardInfo("Glorious End", 133, Rarity.MYTHIC, mage.cards.g.GloriousEnd.class));
+ cards.add(new SetCardInfo("Glory-Bound Initiate", 16, Rarity.RARE, mage.cards.g.GloryBoundInitiate.class));
+ cards.add(new SetCardInfo("Glorybringer", 134, Rarity.RARE, mage.cards.g.Glorybringer.class));
+ cards.add(new SetCardInfo("Glyph Keeper", 55, Rarity.RARE, mage.cards.g.GlyphKeeper.class));
+ cards.add(new SetCardInfo("Graceful Cat", 273, Rarity.COMMON, mage.cards.g.GracefulCat.class));
+ cards.add(new SetCardInfo("Grasping Dunes", 244, Rarity.UNCOMMON, mage.cards.g.GraspingDunes.class));
+ cards.add(new SetCardInfo("Gravedigger", 93, Rarity.UNCOMMON, mage.cards.g.Gravedigger.class));
+ cards.add(new SetCardInfo("Greater Sandwurm", 168, Rarity.COMMON, mage.cards.g.GreaterSandwurm.class));
+ cards.add(new SetCardInfo("Grim Strider", 94, Rarity.UNCOMMON, mage.cards.g.GrimStrider.class));
+ cards.add(new SetCardInfo("Gust Walker", 17, Rarity.COMMON, mage.cards.g.GustWalker.class));
+ cards.add(new SetCardInfo("Hapatra's Mark", 169, Rarity.UNCOMMON, mage.cards.h.HapatrasMark.class));
+ cards.add(new SetCardInfo("Hapatra, Vizier of Poisons", 199, Rarity.RARE, mage.cards.h.HapatraVizierOfPoisons.class));
+ cards.add(new SetCardInfo("Harsh Mentor", 135, Rarity.RARE, mage.cards.h.HarshMentor.class));
+ cards.add(new SetCardInfo("Harvest Season", 170, Rarity.RARE, mage.cards.h.HarvestSeason.class));
+ cards.add(new SetCardInfo("Haze of Pollen", 171, Rarity.COMMON, mage.cards.h.HazeOfPollen.class));
+ cards.add(new SetCardInfo("Hazoret the Fervent", 136, Rarity.MYTHIC, mage.cards.h.HazoretTheFervent.class));
+ cards.add(new SetCardInfo("Hazoret's Favor", 137, Rarity.RARE, mage.cards.h.HazoretsFavor.class));
+ cards.add(new SetCardInfo("Hazoret's Monument", 229, Rarity.UNCOMMON, mage.cards.h.HazoretsMonument.class));
+ cards.add(new SetCardInfo("Heart-Piercer Manticore", 138, Rarity.RARE, mage.cards.h.HeartPiercerManticore.class));
+ cards.add(new SetCardInfo("Heaven // Earth", 224, Rarity.RARE, mage.cards.h.HeavenEarth.class));
+ cards.add(new SetCardInfo("Hekma Sentinels", 56, Rarity.COMMON, mage.cards.h.HekmaSentinels.class));
+ cards.add(new SetCardInfo("Hieroglyphic Illumination", 57, Rarity.COMMON, mage.cards.h.HieroglyphicIllumination.class));
+ cards.add(new SetCardInfo("Honed Khopesh", 230, Rarity.COMMON, mage.cards.h.HonedKhopesh.class));
+ cards.add(new SetCardInfo("Honored Crop-Captain", 200, Rarity.UNCOMMON, mage.cards.h.HonoredCropCaptain.class));
+ cards.add(new SetCardInfo("Honored Hydra", 172, Rarity.RARE, mage.cards.h.HonoredHydra.class));
+ cards.add(new SetCardInfo("Hooded Brawler", 173, Rarity.COMMON, mage.cards.h.HoodedBrawler.class));
+ cards.add(new SetCardInfo("Horror of the Broken Lands", 95, Rarity.COMMON, mage.cards.h.HorrorOfTheBrokenLands.class));
+ cards.add(new SetCardInfo("Hyena Pack", 139, Rarity.COMMON, mage.cards.h.HyenaPack.class));
+ cards.add(new SetCardInfo("Illusory Wrappings", 58, Rarity.COMMON, mage.cards.i.IllusoryWrappings.class));
+ cards.add(new SetCardInfo("Impeccable Timing", 18, Rarity.COMMON, mage.cards.i.ImpeccableTiming.class));
+ cards.add(new SetCardInfo("In Oketra's Name", 19, Rarity.COMMON, mage.cards.i.InOketrasName.class));
+ cards.add(new SetCardInfo("Initiate's Companion", 174, Rarity.COMMON, mage.cards.i.InitiatesCompanion.class));
+ cards.add(new SetCardInfo("Insult // Injury", 213, Rarity.RARE, mage.cards.i.InsultInjury.class));
+ cards.add(new SetCardInfo("Irrigated Farmland", 245, Rarity.RARE, mage.cards.i.IrrigatedFarmland.class));
+ cards.add(new SetCardInfo("Island", 251, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(null, true)));
+ cards.add(new SetCardInfo("Island", 258, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(null, true)));
+ cards.add(new SetCardInfo("Island", 259, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(null, true)));
+ cards.add(new SetCardInfo("Island", 260, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(null, true)));
+ cards.add(new SetCardInfo("Kefnet the Mindful", 59, Rarity.MYTHIC, mage.cards.k.KefnetTheMindful.class));
+ cards.add(new SetCardInfo("Kefnet's Monument", 231, Rarity.UNCOMMON, mage.cards.k.KefnetsMonument.class));
+ cards.add(new SetCardInfo("Khenra Charioteer", 201, Rarity.UNCOMMON, mage.cards.k.KhenraCharioteer.class));
+ cards.add(new SetCardInfo("Labyrinth Guardian", 60, Rarity.UNCOMMON, mage.cards.l.LabyrinthGuardian.class));
+ cards.add(new SetCardInfo("Lay Bare the Heart", 96, Rarity.UNCOMMON, mage.cards.l.LayBareTheHeart.class));
+ cards.add(new SetCardInfo("Lay Claim", 61, Rarity.UNCOMMON, mage.cards.l.LayClaim.class));
+ cards.add(new SetCardInfo("Liliana's Influence", 277, Rarity.RARE, mage.cards.l.LilianasInfluence.class));
+ cards.add(new SetCardInfo("Liliana's Mastery", 98, Rarity.RARE, mage.cards.l.LilianasMastery.class));
+ cards.add(new SetCardInfo("Liliana, Death Wielder", 275, Rarity.MYTHIC, mage.cards.l.LilianaDeathWielder.class));
+ cards.add(new SetCardInfo("Liliana, Death's Majesty", 97, Rarity.MYTHIC, mage.cards.l.LilianaDeathsMajesty.class));
+ cards.add(new SetCardInfo("Limits of Solidarity", 140, Rarity.UNCOMMON, mage.cards.l.LimitsOfSolidarity.class));
+ cards.add(new SetCardInfo("Lord of the Accursed", 99, Rarity.UNCOMMON, mage.cards.l.LordOfTheAccursed.class));
+ cards.add(new SetCardInfo("Luxa River Shrine", 232, Rarity.COMMON, mage.cards.l.LuxaRiverShrine.class));
+ cards.add(new SetCardInfo("Magma Spray", 141, Rarity.COMMON, mage.cards.m.MagmaSpray.class));
+ cards.add(new SetCardInfo("Manglehorn", 175, Rarity.UNCOMMON, mage.cards.m.Manglehorn.class));
+ cards.add(new SetCardInfo("Manticore of the Gauntlet", 142, Rarity.COMMON, mage.cards.m.ManticoreOfTheGauntlet.class));
+ cards.add(new SetCardInfo("Merciless Javelineer", 202, Rarity.UNCOMMON, mage.cards.m.MercilessJavelineer.class));
+ cards.add(new SetCardInfo("Miasmic Mummy", 100, Rarity.COMMON, mage.cards.m.MiasmicMummy.class));
+ cards.add(new SetCardInfo("Mighty Leap", 20, Rarity.COMMON, mage.cards.m.MightyLeap.class));
+ cards.add(new SetCardInfo("Minotaur Sureshot", 143, Rarity.COMMON, mage.cards.m.MinotaurSureshot.class));
+ cards.add(new SetCardInfo("Mountain", 253, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(null, true)));
+ cards.add(new SetCardInfo("Mountain", 264, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(null, true)));
+ cards.add(new SetCardInfo("Mountain", 265, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(null, true)));
+ cards.add(new SetCardInfo("Mountain", 266, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(null, true)));
+ cards.add(new SetCardInfo("Mouth // Feed", 214, Rarity.RARE, mage.cards.m.MouthFeed.class));
+ cards.add(new SetCardInfo("Naga Oracle", 62, Rarity.COMMON, mage.cards.n.NagaOracle.class));
+ cards.add(new SetCardInfo("Naga Vitalist", 176, Rarity.COMMON, mage.cards.n.NagaVitalist.class));
+ cards.add(new SetCardInfo("Nef-Crop Entangler", 144, Rarity.COMMON, mage.cards.n.NefCropEntangler.class));
+ cards.add(new SetCardInfo("Neheb, the Worthy", 203, Rarity.RARE, mage.cards.n.NehebTheWorthy.class));
+ cards.add(new SetCardInfo("Nest of Scarabs", 101, Rarity.UNCOMMON, mage.cards.n.NestOfScarabs.class));
+ cards.add(new SetCardInfo("Never // Return", 212, Rarity.RARE, mage.cards.n.NeverReturn.class));
+ cards.add(new SetCardInfo("New Perspectives", 63, Rarity.RARE, mage.cards.n.NewPerspectives.class));
+ cards.add(new SetCardInfo("Nimble-Blade Khenra", 145, Rarity.COMMON, mage.cards.n.NimbleBladeKhenra.class));
+ cards.add(new SetCardInfo("Nissa, Steward of Elements", 204, Rarity.MYTHIC, mage.cards.n.NissaStewardOfElements.class));
+ cards.add(new SetCardInfo("Oashra Cultivator", 177, Rarity.COMMON, mage.cards.o.OashraCultivator.class));
+ cards.add(new SetCardInfo("Oketra the True", 21, Rarity.MYTHIC, mage.cards.o.OketraTheTrue.class));
+ cards.add(new SetCardInfo("Oketra's Attendant", 22, Rarity.UNCOMMON, mage.cards.o.OketrasAttendant.class));
+ cards.add(new SetCardInfo("Oketra's Monument", 233, Rarity.UNCOMMON, mage.cards.o.OketrasMonument.class));
+ cards.add(new SetCardInfo("Onward // Victory", 218, Rarity.UNCOMMON, mage.cards.o.OnwardVictory.class));
+ cards.add(new SetCardInfo("Open into Wonder", 64, Rarity.UNCOMMON, mage.cards.o.OpenIntoWonder.class));
+ cards.add(new SetCardInfo("Oracle's Vault", 234, Rarity.RARE, mage.cards.o.OraclesVault.class));
+ cards.add(new SetCardInfo("Ornery Kudu", 178, Rarity.COMMON, mage.cards.o.OrneryKudu.class));
+ cards.add(new SetCardInfo("Painful Lesson", 102, Rarity.COMMON, mage.cards.p.PainfulLesson.class));
+ cards.add(new SetCardInfo("Painted Bluffs", 246, Rarity.COMMON, mage.cards.p.PaintedBluffs.class));
+ cards.add(new SetCardInfo("Pathmaker Initiate", 146, Rarity.COMMON, mage.cards.p.PathmakerInitiate.class));
+ cards.add(new SetCardInfo("Pitiless Vizier", 103, Rarity.COMMON, mage.cards.p.PitilessVizier.class));
+ cards.add(new SetCardInfo("Plague Belcher", 104, Rarity.RARE, mage.cards.p.PlagueBelcher.class));
+ cards.add(new SetCardInfo("Pyramid of the Pantheon", 235, Rarity.RARE, mage.cards.p.PyramidOfThePantheon.class));
+ cards.add(new SetCardInfo("Plains", 250, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true)));
+ cards.add(new SetCardInfo("Plains", 255, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true)));
+ cards.add(new SetCardInfo("Plains", 256, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true)));
+ cards.add(new SetCardInfo("Plains", 257, Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(null, true)));
+ cards.add(new SetCardInfo("Pouncing Cheetah", 179, Rarity.COMMON, mage.cards.p.PouncingCheetah.class));
+ cards.add(new SetCardInfo("Prepare // Fight", 220, Rarity.RARE, mage.cards.p.PrepareFight.class));
+ cards.add(new SetCardInfo("Protection of the Hekma", 23, Rarity.UNCOMMON, mage.cards.p.ProtectionOfTheHekma.class));
+ cards.add(new SetCardInfo("Prowling Serpopard", 180, Rarity.RARE, mage.cards.p.ProwlingSerpopard.class));
+ cards.add(new SetCardInfo("Pull from Tomorrow", 65, Rarity.RARE, mage.cards.p.PullFromTomorrow.class));
+ cards.add(new SetCardInfo("Pursue Glory", 147, Rarity.COMMON, mage.cards.p.PursueGlory.class));
+ cards.add(new SetCardInfo("Quarry Hauler", 181, Rarity.COMMON, mage.cards.q.QuarryHauler.class));
+ cards.add(new SetCardInfo("Rags // Riches", 222, Rarity.RARE, mage.cards.r.RagsRiches.class));
+ cards.add(new SetCardInfo("Reduce // Rubble", 216, Rarity.UNCOMMON, mage.cards.r.ReduceRubble.class));
+ cards.add(new SetCardInfo("Regal Caracal", 24, Rarity.RARE, mage.cards.r.RegalCaracal.class));
+ cards.add(new SetCardInfo("Renewed Faith", 25, Rarity.UNCOMMON, mage.cards.r.RenewedFaith.class));
+ cards.add(new SetCardInfo("Rhet-Crop Spearmaster", 26, Rarity.COMMON, mage.cards.r.RhetCropSpearmaster.class));
+ cards.add(new SetCardInfo("Rhonas's Monument", 236, Rarity.UNCOMMON, mage.cards.r.RhonassMonument.class));
+ cards.add(new SetCardInfo("Rhonas, the Indomitable", 182, Rarity.MYTHIC, mage.cards.r.RhonasTheIndomitable.class));
+ cards.add(new SetCardInfo("River Serpent", 66, Rarity.COMMON, mage.cards.r.RiverSerpent.class));
+ cards.add(new SetCardInfo("Ruthless Sniper", 105, Rarity.UNCOMMON, mage.cards.r.RuthlessSniper.class));
+ cards.add(new SetCardInfo("Sacred Cat", 27, Rarity.COMMON, mage.cards.s.SacredCat.class));
+ cards.add(new SetCardInfo("Sacred Excavation", 67, Rarity.UNCOMMON, mage.cards.s.SacredExcavation.class));
+ cards.add(new SetCardInfo("Samut, Voice of Dissent", 205, Rarity.MYTHIC, mage.cards.s.SamutVoiceOfDissent.class));
+ cards.add(new SetCardInfo("Sandwurm Convergence", 183, Rarity.RARE, mage.cards.s.SandwurmConvergence.class));
+ cards.add(new SetCardInfo("Scaled Behemoth", 184, Rarity.UNCOMMON, mage.cards.s.ScaledBehemoth.class));
+ cards.add(new SetCardInfo("Scarab Feast", 106, Rarity.COMMON, mage.cards.s.ScarabFeast.class));
+ cards.add(new SetCardInfo("Scattered Groves", 247, Rarity.RARE, mage.cards.s.ScatteredGroves.class));
+ cards.add(new SetCardInfo("Scribe of the Mindful", 68, Rarity.COMMON, mage.cards.s.ScribeOfTheMindful.class));
+ cards.add(new SetCardInfo("Seeker of Insight", 69, Rarity.COMMON, mage.cards.s.SeekerOfInsight.class));
+ cards.add(new SetCardInfo("Seraph of the Suns", 28, Rarity.UNCOMMON, mage.cards.s.SeraphOfTheSuns.class));
+ cards.add(new SetCardInfo("Shadow of the Grave", 107, Rarity.RARE, mage.cards.s.ShadowOfTheGrave.class));
+ cards.add(new SetCardInfo("Shadowstorm Vizier", 206, Rarity.UNCOMMON, mage.cards.s.ShadowstormVizier.class));
+ cards.add(new SetCardInfo("Shed Weakness", 185, Rarity.COMMON, mage.cards.s.ShedWeakness.class));
+ cards.add(new SetCardInfo("Shefet Monitor", 186, Rarity.UNCOMMON, mage.cards.s.ShefetMonitor.class));
+ cards.add(new SetCardInfo("Sheltered Thicket", 248, Rarity.RARE, mage.cards.s.ShelteredThicket.class));
+ cards.add(new SetCardInfo("Shimmerscale Drake", 70, Rarity.COMMON, mage.cards.s.ShimmerscaleDrake.class));
+ cards.add(new SetCardInfo("Sixth Sense", 187, Rarity.UNCOMMON, mage.cards.s.SixthSense.class));
+ cards.add(new SetCardInfo("Slither Blade", 71, Rarity.COMMON, mage.cards.s.SlitherBlade.class));
+ cards.add(new SetCardInfo("Soul-Scar Mage", 148, Rarity.RARE, mage.cards.s.SoulScarMage.class));
+ cards.add(new SetCardInfo("Soulstinger", 108, Rarity.COMMON, mage.cards.s.Soulstinger.class));
+ cards.add(new SetCardInfo("Sparring Mummy", 29, Rarity.COMMON, mage.cards.s.SparringMummy.class));
+ cards.add(new SetCardInfo("Spidery Grasp", 188, Rarity.COMMON, mage.cards.s.SpideryGrasp.class));
+ cards.add(new SetCardInfo("Splendid Agony", 109, Rarity.COMMON, mage.cards.s.SplendidAgony.class));
+ cards.add(new SetCardInfo("Spring // Mind", 219, Rarity.UNCOMMON, mage.cards.s.SpringMind.class));
+ cards.add(new SetCardInfo("Start // Finish", 215, Rarity.UNCOMMON, mage.cards.s.StartFinish.class));
+ cards.add(new SetCardInfo("Stinging Shot", 189, Rarity.COMMON, mage.cards.s.StingingShot.class));
+ cards.add(new SetCardInfo("Stir the Sands", 110, Rarity.UNCOMMON, mage.cards.s.StirTheSands.class));
+ cards.add(new SetCardInfo("Stone Quarry", 274, Rarity.COMMON, mage.cards.s.StoneQuarry.class));
+ cards.add(new SetCardInfo("Sunscorched Desert", 249, Rarity.COMMON, mage.cards.s.SunscorchedDesert.class));
+ cards.add(new SetCardInfo("Supernatural Stamina", 111, Rarity.COMMON, mage.cards.s.SupernaturalStamina.class));
+ cards.add(new SetCardInfo("Supply Caravan", 30, Rarity.COMMON, mage.cards.s.SupplyCaravan.class));
+ cards.add(new SetCardInfo("Swamp", 252, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(null, true)));
+ cards.add(new SetCardInfo("Swamp", 261, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(null, true)));
+ cards.add(new SetCardInfo("Swamp", 262, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(null, true)));
+ cards.add(new SetCardInfo("Swamp", 263, Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(null, true)));
+ cards.add(new SetCardInfo("Sweltering Suns", 149, Rarity.RARE, mage.cards.s.SwelteringSuns.class));
+ cards.add(new SetCardInfo("Synchronized Strike", 190, Rarity.UNCOMMON, mage.cards.s.SynchronizedStrike.class));
+ cards.add(new SetCardInfo("Tah-Crop Elite", 31, Rarity.COMMON, mage.cards.t.TahCropElite.class));
+ cards.add(new SetCardInfo("Tah-Crop Skirmisher", 72, Rarity.COMMON, mage.cards.t.TahCropSkirmisher.class));
+ cards.add(new SetCardInfo("Tattered Mummy", 278, Rarity.COMMON, mage.cards.t.TatteredMummy.class));
+ cards.add(new SetCardInfo("Temmet, Vizier of Naktamun", 207, Rarity.RARE, mage.cards.t.TemmetVizierOfNaktamun.class));
+ cards.add(new SetCardInfo("Those Who Serve", 32, Rarity.COMMON, mage.cards.t.ThoseWhoServe.class));
+ cards.add(new SetCardInfo("Thresher Lizard", 150, Rarity.COMMON, mage.cards.t.ThresherLizard.class));
+ cards.add(new SetCardInfo("Throne of the God-Pharaoh", 237, Rarity.RARE, mage.cards.t.ThroneOfTheGodPharaoh.class));
+ cards.add(new SetCardInfo("Time to Reflect", 33, Rarity.UNCOMMON, mage.cards.t.TimeToReflect.class));
+ cards.add(new SetCardInfo("Tormenting Voice", 151, Rarity.COMMON, mage.cards.t.TormentingVoice.class));
+ cards.add(new SetCardInfo("Trespasser's Curse", 112, Rarity.COMMON, mage.cards.t.TrespassersCurse.class));
+ cards.add(new SetCardInfo("Trial of Ambition", 113, Rarity.UNCOMMON, mage.cards.t.TrialOfAmbition.class));
+ cards.add(new SetCardInfo("Trial of Knowledge", 73, Rarity.UNCOMMON, mage.cards.t.TrialOfKnowledge.class));
+ cards.add(new SetCardInfo("Trial of Solidarity", 34, Rarity.UNCOMMON, mage.cards.t.TrialOfSolidarity.class));
+ cards.add(new SetCardInfo("Trial of Strength", 191, Rarity.UNCOMMON, mage.cards.t.TrialOfStrength.class));
+ cards.add(new SetCardInfo("Trial of Zeal", 152, Rarity.UNCOMMON, mage.cards.t.TrialOfZeal.class));
+ cards.add(new SetCardInfo("Trueheart Duelist", 35, Rarity.UNCOMMON, mage.cards.t.TrueheartDuelist.class));
+ cards.add(new SetCardInfo("Trueheart Twins", 153, Rarity.UNCOMMON, mage.cards.t.TrueheartTwins.class));
+ cards.add(new SetCardInfo("Unburden", 114, Rarity.COMMON, mage.cards.u.Unburden.class));
+ cards.add(new SetCardInfo("Unwavering Initiate", 36, Rarity.COMMON, mage.cards.u.UnwaveringInitiate.class));
+ cards.add(new SetCardInfo("Violent Impact", 154, Rarity.COMMON, mage.cards.v.ViolentImpact.class));
+ cards.add(new SetCardInfo("Vizier of Deferment", 37, Rarity.UNCOMMON, mage.cards.v.VizierOfDeferment.class));
+ cards.add(new SetCardInfo("Vizier of Many Faces", 74, Rarity.RARE, mage.cards.v.VizierOfManyFaces.class));
+ cards.add(new SetCardInfo("Vizier of Remedies", 38, Rarity.UNCOMMON, mage.cards.v.VizierOfRemedies.class));
+ cards.add(new SetCardInfo("Vizier of Tumbling Sands", 75, Rarity.UNCOMMON, mage.cards.v.VizierOfTumblingSands.class));
+ cards.add(new SetCardInfo("Vizier of the Menagerie", 192, Rarity.MYTHIC, mage.cards.v.VizierOfTheMenagerie.class));
+ cards.add(new SetCardInfo("Wander in Death", 115, Rarity.COMMON, mage.cards.w.WanderInDeath.class));
+ cards.add(new SetCardInfo("Warfire Javelineer", 155, Rarity.UNCOMMON, mage.cards.w.WarfireJavelineer.class));
+ cards.add(new SetCardInfo("Wasteland Scorpion", 116, Rarity.COMMON, mage.cards.w.WastelandScorpion.class));
+ cards.add(new SetCardInfo("Watchers of the Dead", 238, Rarity.UNCOMMON, mage.cards.w.WatchersOfTheDead.class));
+ cards.add(new SetCardInfo("Watchful Naga", 193, Rarity.UNCOMMON, mage.cards.w.WatchfulNaga.class));
+ cards.add(new SetCardInfo("Wayward Servant", 208, Rarity.UNCOMMON, mage.cards.w.WaywardServant.class));
+ cards.add(new SetCardInfo("Weaver of Currents", 209, Rarity.UNCOMMON, mage.cards.w.WeaverOfCurrents.class));
+ cards.add(new SetCardInfo("Winds of Rebuke", 76, Rarity.COMMON, mage.cards.w.WindsOfRebuke.class));
+ cards.add(new SetCardInfo("Winged Shepherd", 39, Rarity.COMMON, mage.cards.w.WingedShepherd.class));
+ cards.add(new SetCardInfo("Zenith Seeker", 77, Rarity.UNCOMMON, mage.cards.z.ZenithSeeker.class));
+ }
+
+ @Override
+ public List getSpecialLand() {
+ if (savedSpecialLand.isEmpty()) {
+ CardCriteria criteria = new CardCriteria();
+ criteria.setCodes("MPS-AKH");
+ criteria.minCardNumber(1);
+ criteria.maxCardNumber(30);
+ savedSpecialLand.addAll(CardRepository.instance.findCards(criteria));
+ }
+
+ return new ArrayList<>(savedSpecialLand);
+ }
+}
diff --git a/Mage.Sets/src/mage/sets/OathOfTheGatewatch.java b/Mage.Sets/src/mage/sets/OathOfTheGatewatch.java
index e6563d19ad6..cc2ac67d31b 100644
--- a/Mage.Sets/src/mage/sets/OathOfTheGatewatch.java
+++ b/Mage.Sets/src/mage/sets/OathOfTheGatewatch.java
@@ -220,8 +220,10 @@ public class OathOfTheGatewatch extends ExpansionSet {
cards.add(new SetCardInfo("Wandering Fumarole", 182, Rarity.RARE, mage.cards.w.WanderingFumarole.class));
cards.add(new SetCardInfo("Warden of Geometries", 11, Rarity.COMMON, mage.cards.w.WardenOfGeometries.class));
cards.add(new SetCardInfo("Warping Wail", 12, Rarity.UNCOMMON, mage.cards.w.WarpingWail.class));
- cards.add(new SetCardInfo("Wastes", 183, Rarity.COMMON, Wastes.class, new CardGraphicInfo(FrameStyle.BFZ_FULL_ART_BASIC, true)));
- cards.add(new SetCardInfo("Wastes", 184, Rarity.COMMON, Wastes.class, new CardGraphicInfo(FrameStyle.BFZ_FULL_ART_BASIC, true)));
+ cards.add(new SetCardInfo("Wastes", "183a", Rarity.COMMON, Wastes.class, new CardGraphicInfo(null, true)));
+ cards.add(new SetCardInfo("Wastes", "183b", Rarity.COMMON, Wastes.class, new CardGraphicInfo(FrameStyle.BFZ_FULL_ART_BASIC, true)));
+ cards.add(new SetCardInfo("Wastes", "184a", Rarity.COMMON, Wastes.class, new CardGraphicInfo(null, true)));
+ cards.add(new SetCardInfo("Wastes", "184b", Rarity.COMMON, Wastes.class, new CardGraphicInfo(FrameStyle.BFZ_FULL_ART_BASIC, true)));
cards.add(new SetCardInfo("Weapons Trainer", 160, Rarity.UNCOMMON, mage.cards.w.WeaponsTrainer.class));
cards.add(new SetCardInfo("Witness the End", 82, Rarity.COMMON, mage.cards.w.WitnessTheEnd.class));
cards.add(new SetCardInfo("World Breaker", 126, Rarity.MYTHIC, mage.cards.w.WorldBreaker.class));
diff --git a/Mage.Stats/pom.xml b/Mage.Stats/pom.xml
index ae2e1c11ad7..51041d30dcb 100644
--- a/Mage.Stats/pom.xml
+++ b/Mage.Stats/pom.xml
@@ -6,7 +6,7 @@
org.mage
mage-root
- 1.4.22
+ 1.4.23
org.mage
diff --git a/Mage.Tests/pom.xml b/Mage.Tests/pom.xml
index b91c7845170..464c5a93467 100644
--- a/Mage.Tests/pom.xml
+++ b/Mage.Tests/pom.xml
@@ -6,7 +6,7 @@
org.mage
mage-root
- 1.4.22
+ 1.4.23
mage-tests
diff --git a/Mage.Updater/pom.xml b/Mage.Updater/pom.xml
index 114859e3354..affe1bfddf1 100644
--- a/Mage.Updater/pom.xml
+++ b/Mage.Updater/pom.xml
@@ -5,7 +5,7 @@
mage-root
org.mage
- 1.4.22
+ 1.4.23
4.0.0
diff --git a/Mage.Verify/pom.xml b/Mage.Verify/pom.xml
index 7a54786c77b..278e9f64845 100644
--- a/Mage.Verify/pom.xml
+++ b/Mage.Verify/pom.xml
@@ -6,7 +6,7 @@
org.mage
mage-root
- 1.4.22
+ 1.4.23
mage-verify
diff --git a/Mage/pom.xml b/Mage/pom.xml
index 165ac377337..b9cd161d86f 100644
--- a/Mage/pom.xml
+++ b/Mage/pom.xml
@@ -6,7 +6,7 @@
org.mage
mage-root
- 1.4.22
+ 1.4.23
mage
diff --git a/Mage/src/main/java/mage/abilities/SpellAbility.java b/Mage/src/main/java/mage/abilities/SpellAbility.java
index 8cdac0c8fb4..37bc8917a5e 100644
--- a/Mage/src/main/java/mage/abilities/SpellAbility.java
+++ b/Mage/src/main/java/mage/abilities/SpellAbility.java
@@ -27,6 +27,7 @@
*/
package mage.abilities;
+import java.util.UUID;
import mage.MageObject;
import mage.abilities.costs.Cost;
import mage.abilities.costs.VariableCost;
@@ -44,8 +45,6 @@ import mage.game.Game;
import mage.game.events.GameEvent;
import mage.players.Player;
-import java.util.UUID;
-
/**
* @author BetaSteward_at_googlemail.com
*/
@@ -94,7 +93,7 @@ public class SpellAbility extends ActivatedAbilityImpl {
public boolean canActivate(UUID playerId, Game game) {
if (game.getContinuousEffects().asThough(sourceId, AsThoughEffectType.CAST_AS_INSTANT, this, playerId, game) // check this first to allow Offering in main phase
|| this.spellCanBeActivatedRegularlyNow(playerId, game)) {
- if (spellAbilityType == SpellAbilityType.SPLIT) {
+ if (spellAbilityType == SpellAbilityType.SPLIT || spellAbilityType == SpellAbilityType.SPLIT_AFTERMATH) {
return false;
}
// fix for Gitaxian Probe and casting opponent's spells
@@ -110,7 +109,7 @@ public class SpellAbility extends ActivatedAbilityImpl {
}
}
// Alternate spell abilities (Flashback, Overload) can't be cast with no mana to pay option
- if (getSpellAbilityType()== SpellAbilityType.BASE_ALTERNATE) {
+ if (getSpellAbilityType() == SpellAbilityType.BASE_ALTERNATE) {
Player player = game.getPlayer(playerId);
if (player != null && getSourceId().equals(player.getCastSourceIdWithAlternateMana())) {
return false;
@@ -183,27 +182,27 @@ public class SpellAbility extends ActivatedAbilityImpl {
public int getConvertedXManaCost(Card card) {
int xMultiplier = 0;
int amount = 0;
- if(card == null) {
+ if (card == null) {
return 0;
}
- for(ManaCost manaCost : card.getManaCost()) {
- if(manaCost instanceof VariableManaCost) {
- xMultiplier = ((VariableManaCost)manaCost).getMultiplier();
+ for (ManaCost manaCost : card.getManaCost()) {
+ if (manaCost instanceof VariableManaCost) {
+ xMultiplier = ((VariableManaCost) manaCost).getMultiplier();
break;
}
}
boolean hasNonManaXCost = false;
- for(Cost cost : getCosts()) {
- if(cost instanceof VariableCost) {
+ for (Cost cost : getCosts()) {
+ if (cost instanceof VariableCost) {
hasNonManaXCost = true;
amount = ((VariableCost) cost).getAmount();
break;
}
}
- if(!hasNonManaXCost) {
+ if (!hasNonManaXCost) {
amount = getManaCostsToPay().getX();
}
return amount * xMultiplier;
diff --git a/Mage/src/main/java/mage/abilities/common/ActivateIfConditionActivatedAbility.java b/Mage/src/main/java/mage/abilities/common/ActivateIfConditionActivatedAbility.java
index 430d82f3e8c..1e0753ce927 100644
--- a/Mage/src/main/java/mage/abilities/common/ActivateIfConditionActivatedAbility.java
+++ b/Mage/src/main/java/mage/abilities/common/ActivateIfConditionActivatedAbility.java
@@ -94,7 +94,7 @@ public class ActivateIfConditionActivatedAbility extends ActivatedAbilityImpl {
}
sb.append(condition.toString()).append('.');
} else {
- sb.append(" [Condition toSting() == null] ");
+ sb.append(" [Condition toString() == null] ");
}
return sb.toString() ;
}
diff --git a/Mage/src/main/java/mage/abilities/condition/common/SourceHasCounterCondition.java b/Mage/src/main/java/mage/abilities/condition/common/SourceHasCounterCondition.java
index 96434483e0f..b252edbd181 100644
--- a/Mage/src/main/java/mage/abilities/condition/common/SourceHasCounterCondition.java
+++ b/Mage/src/main/java/mage/abilities/condition/common/SourceHasCounterCondition.java
@@ -35,7 +35,7 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
/**
- *
+ *
* @author nantuko
*/
public class SourceHasCounterCondition implements Condition {
@@ -82,12 +82,26 @@ public class SourceHasCounterCondition implements Condition {
return count >= from;
}
return count >= from && count <= to;
- } else { // single compare (lte)
+ } else // single compare (lte)
+ {
if (card != null) {
return card.getCounters(game).getCount(counterType) >= amount;
- } else {
+ } else {
return permanent.getCounters(game).getCount(counterType) >= amount;
}
}
}
+
+ @Override
+ public String toString() {
+ if (from != -1) { //range compare
+ if (to == Integer.MAX_VALUE) {
+ return "{this} has equal to or more than " + from + " " + this.counterType.toString() + " counters";
+ }
+ return "{this} has between " + from + " and " + to + " " + this.counterType.toString() + " counters";
+ } else // single compare (lte)
+ {
+ return "{this} has equal or more than " + amount + " " + this.counterType.toString() + " counters";
+ }
+ }
}
diff --git a/Mage/src/main/java/mage/abilities/effects/Effect.java b/Mage/src/main/java/mage/abilities/effects/Effect.java
index e4fe554493a..17234c7f9dc 100644
--- a/Mage/src/main/java/mage/abilities/effects/Effect.java
+++ b/Mage/src/main/java/mage/abilities/effects/Effect.java
@@ -46,7 +46,7 @@ public interface Effect extends Serializable {
UUID getId();
void newId();
String getText(Mode mode);
- void setText(String staticText);
+ Effect setText(String staticText);
boolean apply(Game game, Ability source);
Outcome getOutcome();
void setOutcome(Outcome outcome);
diff --git a/Mage/src/main/java/mage/abilities/effects/EffectImpl.java b/Mage/src/main/java/mage/abilities/effects/EffectImpl.java
index c0117cff6b4..91f82ddaa98 100644
--- a/Mage/src/main/java/mage/abilities/effects/EffectImpl.java
+++ b/Mage/src/main/java/mage/abilities/effects/EffectImpl.java
@@ -85,8 +85,9 @@ public abstract class EffectImpl implements Effect {
}
@Override
- public void setText(String staticText) {
+ public Effect setText(String staticText) {
this.staticText = staticText;
+ return this;
}
@Override
diff --git a/Mage/src/main/java/mage/abilities/effects/common/ExileTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileTargetEffect.java
index 88b3307d25c..669b5724512 100644
--- a/Mage/src/main/java/mage/abilities/effects/common/ExileTargetEffect.java
+++ b/Mage/src/main/java/mage/abilities/effects/common/ExileTargetEffect.java
@@ -172,6 +172,8 @@ public class ExileTargetEffect extends OneShotEffect {
sb.append("target ");
}
sb.append(targetName);
+ } else if (target.getNumberOfTargets() == 0 && target.getMaxNumberOfTargets() > 0) {
+ sb.append("exile up to ").append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(" target ").append(target.getTargetName());
} else {
sb.append("exile ").append(CardUtil.numberToText(target.getNumberOfTargets())).append(" target ").append(target.getTargetName());
}
diff --git a/Mage/src/main/java/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java
index 9db4c7574ba..55c1abcb2b9 100644
--- a/Mage/src/main/java/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java
+++ b/Mage/src/main/java/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java
@@ -188,7 +188,7 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect {
EmptyToken token = new EmptyToken();
CardUtil.copyTo(token).from(copyFrom); // needed so that entersBattlefied triggered abilities see the attributes (e.g. Master Biomancer)
- applier.apply(game, token);
+ applier.apply(game, token, source, targetId);
if (becomesArtifact) {
token.addCardType(CardType.ARTIFACT);
}
diff --git a/Mage/src/main/java/mage/abilities/effects/common/SendOptionUsedEventEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SendOptionUsedEventEffect.java
new file mode 100644
index 00000000000..3f0be2eddce
--- /dev/null
+++ b/Mage/src/main/java/mage/abilities/effects/common/SendOptionUsedEventEffect.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.abilities.effects.common;
+
+import mage.abilities.Ability;
+import mage.abilities.effects.OneShotEffect;
+import mage.constants.Outcome;
+import mage.game.Game;
+import mage.game.events.GameEvent;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class SendOptionUsedEventEffect extends OneShotEffect {
+
+ private final int value;
+
+ public SendOptionUsedEventEffect() {
+ this(0);
+ }
+
+ public SendOptionUsedEventEffect(int value) {
+ super(Outcome.Detriment);
+ this.value = value;
+ }
+
+ public SendOptionUsedEventEffect(final SendOptionUsedEventEffect effect) {
+ super(effect);
+ this.value = effect.value;
+ }
+
+ @Override
+ public SendOptionUsedEventEffect copy() {
+ return new SendOptionUsedEventEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ game.fireEvent(GameEvent.getEvent(GameEvent.EventType.OPTION_USED, source.getOriginalId(), source.getSourceId(), source.getControllerId(), value));
+ return true;
+ }
+}
diff --git a/Mage/src/main/java/mage/abilities/effects/common/UntapAllControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/UntapAllControllerEffect.java
index 252686bb70c..8d482d347ef 100644
--- a/Mage/src/main/java/mage/abilities/effects/common/UntapAllControllerEffect.java
+++ b/Mage/src/main/java/mage/abilities/effects/common/UntapAllControllerEffect.java
@@ -44,32 +44,42 @@ import mage.players.Player;
public class UntapAllControllerEffect extends OneShotEffect {
private final FilterPermanent filter;
+ private final boolean includeSource;
public UntapAllControllerEffect(FilterPermanent filter) {
this(filter, null);
}
public UntapAllControllerEffect(FilterPermanent filter, String rule) {
+ this(filter, rule, true);
+ }
+
+ public UntapAllControllerEffect(FilterPermanent filter, String rule, boolean includeSource) {
super(Outcome.Untap);
if (rule == null || rule.isEmpty()) {
- staticText = "untap all " + filter.getMessage() + " you control";
+ staticText = "untap all " + (includeSource ? "" : "other ") + filter.getMessage() + " you control";
} else {
staticText = rule;
}
this.filter = filter;
+ this.includeSource = includeSource;
}
public UntapAllControllerEffect(final UntapAllControllerEffect effect) {
super(effect);
this.filter = effect.filter;
+ this.includeSource = effect.includeSource;
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
+ Permanent sourcePermanent = game.getPermanent(source.getSourceId());
if (player != null) {
for (Permanent permanent: game.getBattlefield().getAllActivePermanents(filter, player.getId(), game)) {
- permanent.untap(game);
+ if (includeSource || sourcePermanent == null || !sourcePermanent.getId().equals(permanent.getId())) {
+ permanent.untap(game);
+ }
}
return true;
}
diff --git a/Mage/src/main/java/mage/abilities/effects/common/UntapTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/UntapTargetEffect.java
index 57d5a9bbc04..068c8fdf495 100644
--- a/Mage/src/main/java/mage/abilities/effects/common/UntapTargetEffect.java
+++ b/Mage/src/main/java/mage/abilities/effects/common/UntapTargetEffect.java
@@ -75,7 +75,7 @@ public class UntapTargetEffect extends OneShotEffect {
Target target = mode.getTargets().get(0);
StringBuilder sb = new StringBuilder();
- sb.append("Untap ");
+ sb.append("untap ");
if (target.getNumberOfTargets() == 0) {
sb.append("up to ");
}
diff --git a/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryGraveyardPutInHandEffect.java b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryGraveyardPutInHandEffect.java
index 2d5d1769de1..cba730ab17b 100644
--- a/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryGraveyardPutInHandEffect.java
+++ b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryGraveyardPutInHandEffect.java
@@ -1,113 +1,114 @@
-/*
- * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * The views and conclusions contained in the software and documentation are those of the
- * authors and should not be interpreted as representing official policies, either expressed
- * or implied, of BetaSteward_at_googlemail.com.
- */
-package mage.abilities.effects.common.search;
-
-import mage.MageObject;
-import mage.abilities.Ability;
-import mage.abilities.effects.OneShotEffect;
-import mage.cards.Card;
-import mage.cards.CardsImpl;
-import mage.constants.Outcome;
-import mage.constants.Zone;
-import mage.filter.FilterCard;
-import mage.game.Game;
-import mage.players.Player;
-import mage.target.TargetCard;
-import mage.target.common.TargetCardInLibrary;
-
-/**
- *
- * @author Styxo
- */
-public class SearchLibraryGraveyardPutInHandEffect extends OneShotEffect {
-
- private FilterCard filter;
- private boolean forceToSearchBoth;
-
- public SearchLibraryGraveyardPutInHandEffect(FilterCard filter) {
- this(filter, false);
- }
-
- public SearchLibraryGraveyardPutInHandEffect(FilterCard filter, boolean forceToSearchBoth) {
- super(Outcome.Benefit);
- this.filter = filter;
- this.forceToSearchBoth = forceToSearchBoth;
- staticText = "Search your library and" + (forceToSearchBoth ? "" : "/or ") + " graveyard for a card named " + filter.getMessage() + ", reveal it, and put it into your hand. Then shuffle your library";
- }
-
- public SearchLibraryGraveyardPutInHandEffect(final SearchLibraryGraveyardPutInHandEffect effect) {
- super(effect);
- this.filter = effect.filter;
- this.forceToSearchBoth = effect.forceToSearchBoth;
-
- }
-
- @Override
- public SearchLibraryGraveyardPutInHandEffect copy() {
- return new SearchLibraryGraveyardPutInHandEffect(this);
- }
-
- @Override
- public boolean apply(Game game, Ability source) {
- Player controller = game.getPlayer(source.getControllerId());
- MageObject sourceObject = source.getSourceObject(game);
- Card cardFound = null;
- if (controller != null && sourceObject != null) {
- if (forceToSearchBoth || controller.chooseUse(outcome, "Search your library for a card named " + filter.getMessage() + '?', source, game)) {
- TargetCardInLibrary target = new TargetCardInLibrary(0, 1, filter);
- target.clearChosen();
- if (controller.searchLibrary(target, game)) {
- if (!target.getTargets().isEmpty()) {
- cardFound = game.getCard(target.getFirstTarget());
- }
- }
- controller.shuffleLibrary(source, game);
- }
-
- if (cardFound == null && controller.chooseUse(outcome, "Search your graveyard for a card named " + filter.getMessage() + '?', source, game)) {
- TargetCard target = new TargetCard(0, 1, Zone.GRAVEYARD, filter);
- target.clearChosen();
- if (controller.choose(outcome, controller.getGraveyard(), target, game)) {
- if (!target.getTargets().isEmpty()) {
- cardFound = game.getCard(target.getFirstTarget());
- }
- }
- }
-
- if (cardFound != null) {
- controller.revealCards(sourceObject.getIdName(), new CardsImpl(cardFound), game);
- controller.moveCards(cardFound, Zone.HAND, source, game);
- }
-
- 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.abilities.effects.common.search;
+
+import mage.MageObject;
+import mage.abilities.Ability;
+import mage.abilities.effects.OneShotEffect;
+import mage.cards.Card;
+import mage.cards.CardsImpl;
+import mage.constants.Outcome;
+import mage.constants.Zone;
+import mage.filter.FilterCard;
+import mage.game.Game;
+import mage.players.Player;
+import mage.target.TargetCard;
+import mage.target.common.TargetCardInLibrary;
+
+/**
+ *
+ * @author Styxo
+ */
+public class SearchLibraryGraveyardPutInHandEffect extends OneShotEffect {
+
+ private FilterCard filter;
+ private boolean forceToSearchBoth;
+
+ public SearchLibraryGraveyardPutInHandEffect(FilterCard filter) {
+ this(filter, false);
+ }
+
+ public SearchLibraryGraveyardPutInHandEffect(FilterCard filter, boolean forceToSearchBoth) {
+ super(Outcome.Benefit);
+ this.filter = filter;
+ this.forceToSearchBoth = forceToSearchBoth;
+ staticText = "Search your library and" + (forceToSearchBoth ? "" : "/or ") + " graveyard for a card named " + filter.getMessage() +
+ ", reveal it, and put it into your hand. " + (forceToSearchBoth ? "Then shuffle your library" : "If you search your library this way, shuffle it");
+ }
+
+ public SearchLibraryGraveyardPutInHandEffect(final SearchLibraryGraveyardPutInHandEffect effect) {
+ super(effect);
+ this.filter = effect.filter;
+ this.forceToSearchBoth = effect.forceToSearchBoth;
+
+ }
+
+ @Override
+ public SearchLibraryGraveyardPutInHandEffect copy() {
+ return new SearchLibraryGraveyardPutInHandEffect(this);
+ }
+
+ @Override
+ public boolean apply(Game game, Ability source) {
+ Player controller = game.getPlayer(source.getControllerId());
+ MageObject sourceObject = source.getSourceObject(game);
+ Card cardFound = null;
+ if (controller != null && sourceObject != null) {
+ if (forceToSearchBoth || controller.chooseUse(outcome, "Search your library for a card named " + filter.getMessage() + '?', source, game)) {
+ TargetCardInLibrary target = new TargetCardInLibrary(0, 1, filter);
+ target.clearChosen();
+ if (controller.searchLibrary(target, game)) {
+ if (!target.getTargets().isEmpty()) {
+ cardFound = game.getCard(target.getFirstTarget());
+ }
+ }
+ controller.shuffleLibrary(source, game);
+ }
+
+ if (cardFound == null && controller.chooseUse(outcome, "Search your graveyard for a card named " + filter.getMessage() + '?', source, game)) {
+ TargetCard target = new TargetCard(0, 1, Zone.GRAVEYARD, filter);
+ target.clearChosen();
+ if (controller.choose(outcome, controller.getGraveyard(), target, game)) {
+ if (!target.getTargets().isEmpty()) {
+ cardFound = game.getCard(target.getFirstTarget());
+ }
+ }
+ }
+
+ if (cardFound != null) {
+ controller.revealCards(sourceObject.getIdName(), new CardsImpl(cardFound), game);
+ controller.moveCards(cardFound, Zone.HAND, source, game);
+ }
+
+ return true;
+ }
+
+ return false;
+ }
+
+}
diff --git a/Mage/src/main/java/mage/abilities/keyword/AftermathAbility.java b/Mage/src/main/java/mage/abilities/keyword/AftermathAbility.java
index c704939285a..e0517a0e0d2 100644
--- a/Mage/src/main/java/mage/abilities/keyword/AftermathAbility.java
+++ b/Mage/src/main/java/mage/abilities/keyword/AftermathAbility.java
@@ -27,31 +27,31 @@
*/
package mage.abilities.keyword;
-import mage.MageObject;
+import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.*;
import mage.cards.Card;
import mage.cards.SplitCardHalf;
-import mage.cards.SplitCardHalfImpl;
import mage.constants.*;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent;
import mage.game.stack.Spell;
import mage.players.Player;
-import java.util.UUID;
/**
* Aftermath
*
- * TODO: Implement once we get details on the comprehensive rules meaning of the ability
+ * TODO: Implement once we get details on the comprehensive rules meaning of the
+ * ability
*
* Current text is a shell copied from Flashback
*
* @author stravant
*/
public class AftermathAbility extends SimpleStaticAbility {
+
public AftermathAbility() {
super(Zone.ALL, new AftermathCastFromGraveyard());
addEffect(new AftermathCantCastFromHand());
@@ -99,13 +99,13 @@ class AftermathCastFromGraveyard extends AsThoughEffectImpl {
}
private static String msb(UUID id) {
- return Integer.toUnsignedString((int)id.getMostSignificantBits(), 16);
+ return Integer.toUnsignedString((int) id.getMostSignificantBits(), 16);
}
@Override
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
- if (objectId.equals(source.getSourceId()) &
- affectedControllerId.equals(source.getControllerId())) {
+ if (objectId.equals(source.getSourceId())
+ & affectedControllerId.equals(source.getControllerId())) {
Card card = game.getCard(source.getSourceId());
if (card != null && game.getState().getZone(source.getSourceId()) == Zone.GRAVEYARD) {
return true;
@@ -122,7 +122,7 @@ class AftermathCantCastFromHand extends ContinuousRuleModifyingEffectImpl {
staticText = ", but not from anywhere else";
}
- public AftermathCantCastFromHand (final AftermathCantCastFromHand effect) {
+ public AftermathCantCastFromHand(final AftermathCantCastFromHand effect) {
super(effect);
}
@@ -213,7 +213,7 @@ class AftermathExileAsResolvesFromGraveyard extends ReplacementEffectImpl {
if (sourceCard != null) {
Player player = game.getPlayer(sourceCard.getOwnerId());
if (player != null) {
- return player.moveCardToExileWithInfo(sourceCard, null, "", sourceId, game, ((ZoneChangeEvent)event).getFromZone(), true);
+ return player.moveCardToExileWithInfo(sourceCard, null, "", sourceId, game, ((ZoneChangeEvent) event).getFromZone(), true);
}
}
return false;
@@ -224,4 +224,4 @@ class AftermathExileAsResolvesFromGraveyard extends ReplacementEffectImpl {
return new AftermathExileAsResolvesFromGraveyard(this);
}
-}
\ No newline at end of file
+}
diff --git a/Mage/src/main/java/mage/abilities/keyword/CyclingAbility.java b/Mage/src/main/java/mage/abilities/keyword/CyclingAbility.java
index 3f9cc3700e9..09f1c72d451 100644
--- a/Mage/src/main/java/mage/abilities/keyword/CyclingAbility.java
+++ b/Mage/src/main/java/mage/abilities/keyword/CyclingAbility.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,29 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
-
package mage.abilities.keyword;
-import mage.constants.Zone;
+import java.util.UUID;
+import mage.abilities.Ability;
import mage.abilities.ActivatedAbilityImpl;
import mage.abilities.costs.Cost;
import mage.abilities.costs.common.DiscardSourceCost;
import mage.abilities.costs.mana.ManaCost;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
+import mage.constants.Zone;
import mage.filter.FilterCard;
+import mage.game.Game;
+import mage.game.events.CostEvent;
+import mage.game.events.GameEvent;
+import mage.target.Targets;
import mage.target.common.TargetCardInLibrary;
-
/**
*
* @author BetaSteward_at_googlemail.com
@@ -47,16 +51,16 @@ public class CyclingAbility extends ActivatedAbilityImpl {
private final Cost cost;
private final String text;
-
+
public CyclingAbility(Cost cost) {
- super(Zone.HAND, new DrawCardSourceControllerEffect(1), cost);
+ super(Zone.HAND, new DrawCardSourceControllerEffect(1), new CyclingCost(cost));
this.addCost(new DiscardSourceCost());
this.cost = cost;
this.text = "Cycling";
}
-
- public CyclingAbility(Cost cost, FilterCard filter, String text){
- super(Zone.HAND, new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true, true), cost);
+
+ public CyclingAbility(Cost cost, FilterCard filter, String text) {
+ super(Zone.HAND, new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true, true), new CyclingCost(cost));
this.addCost(new DiscardSourceCost());
this.cost = cost;
this.text = text;
@@ -76,14 +80,87 @@ public class CyclingAbility extends ActivatedAbilityImpl {
@Override
public String getRule() {
StringBuilder rule = new StringBuilder(this.text);
- if(cost instanceof ManaCost){
+ if (cost instanceof ManaCost) {
rule.append(' ');
- }
- else{
- rule.append("—");
+ } else {
+ rule.append("—");
}
rule.append(cost.getText()).append(" (").append(super.getRule(true)).append(")");
return rule.toString();
}
}
+
+class CyclingCost implements Cost {
+
+ protected Cost cost;
+
+ public CyclingCost(Cost cost) {
+ this.cost = cost;
+ }
+
+ public CyclingCost(final CyclingCost cost) {
+ this.cost = cost.cost.copy();
+ }
+
+ @Override
+ public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) {
+ return pay(ability, game, sourceId, controllerId, noMana, cost);
+ }
+
+ @Override
+ public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) {
+ CostEvent costEvent = new CostEvent(GameEvent.EventType.CAN_PAY_CYCLE_COST, sourceId, sourceId, controllerId, cost);
+ game.replaceEvent(costEvent);
+ return cost.canPay(ability, sourceId, controllerId, game) || costEvent.getCost().canPay(ability, sourceId, controllerId, game);
+ }
+
+ @Override
+ public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) {
+ CostEvent costEvent = new CostEvent(GameEvent.EventType.PAY_CYCLE_COST, sourceId, sourceId, controllerId, cost);
+ game.replaceEvent(costEvent);
+ cost = costEvent.getCost();
+ return cost.pay(ability, game, sourceId, controllerId, noMana, cost);
+ }
+
+ @Override
+ public String getText() {
+ return cost.getText();
+ }
+
+ @Override
+ public void setText(String text) {
+ cost.setText(text);
+ }
+
+ @Override
+ public Targets getTargets() {
+ return cost.getTargets();
+ }
+
+ @Override
+ public boolean isPaid() {
+ return cost.isPaid();
+ }
+
+ @Override
+ public void clearPaid() {
+ cost.clearPaid();
+ }
+
+ @Override
+ public void setPaid() {
+ cost.setPaid();
+ }
+
+ @Override
+ public UUID getId() {
+ return cost.getId();
+ }
+
+ @Override
+ public Cost copy() {
+ return new CyclingCost(this);
+ }
+
+}
diff --git a/Mage/src/main/java/mage/abilities/keyword/EmbalmAbility.java b/Mage/src/main/java/mage/abilities/keyword/EmbalmAbility.java
index ed87289b545..db40c8646f5 100644
--- a/Mage/src/main/java/mage/abilities/keyword/EmbalmAbility.java
+++ b/Mage/src/main/java/mage/abilities/keyword/EmbalmAbility.java
@@ -38,6 +38,7 @@ import mage.constants.Outcome;
import mage.constants.TimingRule;
import mage.constants.Zone;
import mage.game.Game;
+import mage.game.events.GameEvent;
import mage.game.permanent.token.EmptyToken;
import mage.players.Player;
import mage.util.CardUtil;
@@ -111,7 +112,11 @@ class EmbalmEffect extends OneShotEffect {
if (!token.getSubtype(game).contains("Zombie")) {
token.getSubtype(game).add(0, "Zombie");
}
+ token.getManaCost().clear();
+ game.fireEvent(GameEvent.getEvent(GameEvent.EventType.EMBALMED_CREATURE, token.getId(), source.getSourceId(), controller.getId()));
token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId(), false, false, null);
+ // Probably it makes sense to remove also the Embalm ability (it's not shown on the token cards).
+ // Also it can never get active or? But it's not mentioned in the reminder text.
return true;
}
diff --git a/Mage/src/main/java/mage/cards/SplitCard.java b/Mage/src/main/java/mage/cards/SplitCard.java
index e3e005275a7..d608390039d 100644
--- a/Mage/src/main/java/mage/cards/SplitCard.java
+++ b/Mage/src/main/java/mage/cards/SplitCard.java
@@ -30,7 +30,6 @@ package mage.cards;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
-
import mage.abilities.Abilities;
import mage.abilities.AbilitiesImpl;
import mage.abilities.Ability;
@@ -49,12 +48,12 @@ public abstract class SplitCard extends CardImpl {
protected Card leftHalfCard;
protected Card rightHalfCard;
- public SplitCard(UUID ownerId, CardSetInfo setInfo, CardType[] cardTypes, String costsLeft, String costsRight, boolean fused) {
- this(ownerId, setInfo, cardTypes, cardTypes, costsLeft, costsRight, fused);
+ public SplitCard(UUID ownerId, CardSetInfo setInfo, CardType[] cardTypes, String costsLeft, String costsRight, SpellAbilityType spellAbilityType) {
+ this(ownerId, setInfo, cardTypes, cardTypes, costsLeft, costsRight, spellAbilityType);
}
- public SplitCard(UUID ownerId, CardSetInfo setInfo, CardType[] typesLeft, CardType[] typesRight, String costsLeft, String costsRight, boolean fused) {
- super(ownerId, setInfo, CardType.mergeTypes(typesLeft, typesRight), costsLeft + costsRight, (fused ? SpellAbilityType.SPLIT_FUSED : SpellAbilityType.SPLIT));
+ public SplitCard(UUID ownerId, CardSetInfo setInfo, CardType[] typesLeft, CardType[] typesRight, String costsLeft, String costsRight, SpellAbilityType spellAbilityType) {
+ super(ownerId, setInfo, CardType.mergeTypes(typesLeft, typesRight), costsLeft + costsRight, spellAbilityType);
String[] names = setInfo.getName().split(" // ");
leftHalfCard = new SplitCardHalfImpl(this.getOwnerId(), new CardSetInfo(names[0], setInfo.getExpansionSetCode(), setInfo.getCardNumber(), setInfo.getRarity(), setInfo.getGraphicInfo()), typesLeft, costsLeft, this, SpellAbilityType.SPLIT_LEFT);
rightHalfCard = new SplitCardHalfImpl(this.getOwnerId(), new CardSetInfo(names[1], setInfo.getExpansionSetCode(), setInfo.getCardNumber(), setInfo.getRarity(), setInfo.getGraphicInfo()), typesRight, costsRight, this, SpellAbilityType.SPLIT_RIGHT);
@@ -135,7 +134,9 @@ public abstract class SplitCard extends CardImpl {
public Abilities getAbilities() {
Abilities allAbilites = new AbilitiesImpl<>();
for (Ability ability : super.getAbilities()) {
- if (ability instanceof SpellAbility && ((SpellAbility) ability).getSpellAbilityType() != SpellAbilityType.SPLIT) {
+ if (ability instanceof SpellAbility
+ && ((SpellAbility) ability).getSpellAbilityType() != SpellAbilityType.SPLIT
+ && ((SpellAbility) ability).getSpellAbilityType() != SpellAbilityType.SPLIT_AFTERMATH) {
allAbilites.add(ability);
}
}
@@ -149,6 +150,7 @@ public abstract class SplitCard extends CardImpl {
* gets any abilities on a split card as a whole, and not on either half
* individually.
*
+ * @return
*/
public Abilities getSharedAbilities() {
return super.getAbilities();
@@ -158,7 +160,9 @@ public abstract class SplitCard extends CardImpl {
public Abilities getAbilities(Game game) {
Abilities allAbilites = new AbilitiesImpl<>();
for (Ability ability : super.getAbilities(game)) {
- if (ability instanceof SpellAbility && ((SpellAbility) ability).getSpellAbilityType() != SpellAbilityType.SPLIT) {
+ if (ability instanceof SpellAbility
+ && ((SpellAbility) ability).getSpellAbilityType() != SpellAbilityType.SPLIT
+ && ((SpellAbility) ability).getSpellAbilityType() != SpellAbilityType.SPLIT_AFTERMATH) {
allAbilites.add(ability);
}
}
diff --git a/Mage/src/main/java/mage/cards/mock/MockSplitCard.java b/Mage/src/main/java/mage/cards/mock/MockSplitCard.java
index 97fc4eb52af..73a4e895535 100644
--- a/Mage/src/main/java/mage/cards/mock/MockSplitCard.java
+++ b/Mage/src/main/java/mage/cards/mock/MockSplitCard.java
@@ -8,6 +8,7 @@ import mage.cards.SplitCard;
import mage.cards.repository.CardInfo;
import mage.cards.repository.CardRepository;
import mage.constants.CardType;
+import mage.constants.SpellAbilityType;
/**
*
@@ -20,7 +21,7 @@ public class MockSplitCard extends SplitCard {
card.getTypes().toArray(new CardType[0]),
join(card.getManaCosts()),
"",
- join(card.getRules()).contains("Fuse"));
+ getSpellAbilityType(card));
this.expansionSetCode = card.getSetCode();
this.power = mageIntFromString(card.getPower());
this.toughness = mageIntFromString(card.getToughness());
@@ -77,6 +78,16 @@ public class MockSplitCard extends SplitCard {
}
}
+ private static SpellAbilityType getSpellAbilityType(CardInfo cardInfo) {
+ if (cardInfo.isSplitFuseCard()) {
+ return SpellAbilityType.SPLIT_FUSED;
+ }
+ if (cardInfo.isSplitAftermathCard()) {
+ return SpellAbilityType.SPLIT_AFTERMATH;
+ }
+ return SpellAbilityType.SPLIT;
+ }
+
private static String join(List strings) {
StringBuilder sb = new StringBuilder();
for (String string : strings) {
diff --git a/Mage/src/main/java/mage/cards/repository/CardInfo.java b/Mage/src/main/java/mage/cards/repository/CardInfo.java
index e63c7d5b1b4..9e685324c20 100644
--- a/Mage/src/main/java/mage/cards/repository/CardInfo.java
+++ b/Mage/src/main/java/mage/cards/repository/CardInfo.java
@@ -30,9 +30,7 @@ package mage.cards.repository;
import com.j256.ormlite.field.DataType;
import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;
-
import java.util.*;
-
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.SpellAbility;
@@ -106,6 +104,10 @@ public class CardInfo {
@DatabaseField
protected boolean splitCard;
@DatabaseField
+ protected boolean splitCardFuse;
+ @DatabaseField
+ protected boolean splitCardAftermath;
+ @DatabaseField
protected boolean splitCardHalf;
@DatabaseField
protected boolean flipCard;
@@ -131,6 +133,8 @@ public class CardInfo {
this.convertedManaCost = card.getConvertedManaCost();
this.rarity = card.getRarity();
this.splitCard = card.isSplitCard();
+ this.splitCardFuse = card.getSpellAbility() != null && card.getSpellAbility().getSpellAbilityType() == SpellAbilityType.SPLIT_FUSED;
+ this.splitCardAftermath = card.getSpellAbility() != null && card.getSpellAbility().getSpellAbilityType() == SpellAbilityType.SPLIT_AFTERMATH;
this.flipCard = card.isFlipCard();
this.flipCardName = card.getFlipCardName();
@@ -355,6 +359,14 @@ public class CardInfo {
return splitCard;
}
+ public boolean isSplitFuseCard() {
+ return splitCardFuse;
+ }
+
+ public boolean isSplitAftermathCard() {
+ return splitCardAftermath;
+ }
+
public boolean isSplitCardHalf() {
return splitCardHalf;
}
diff --git a/Mage/src/main/java/mage/cards/repository/CardRepository.java b/Mage/src/main/java/mage/cards/repository/CardRepository.java
index 6269341446d..2d0a285198d 100644
--- a/Mage/src/main/java/mage/cards/repository/CardRepository.java
+++ b/Mage/src/main/java/mage/cards/repository/CardRepository.java
@@ -37,11 +37,9 @@ 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.*;
-
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SetType;
@@ -58,9 +56,9 @@ public enum CardRepository {
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 = 50;
+ private static final long CARD_DB_VERSION = 51;
// raise this if new cards were added to the server
- private static final long CARD_CONTENT_VERSION = 74;
+ private static final long CARD_CONTENT_VERSION = 75;
private final TreeSet landTypes = new TreeSet<>();
private Dao cardDao;
private Set classNames;
diff --git a/Mage/src/main/java/mage/constants/SpellAbilityType.java b/Mage/src/main/java/mage/constants/SpellAbilityType.java
index 9f535b4e448..448b3c95c04 100644
--- a/Mage/src/main/java/mage/constants/SpellAbilityType.java
+++ b/Mage/src/main/java/mage/constants/SpellAbilityType.java
@@ -9,6 +9,7 @@ public enum SpellAbilityType {
BASE_ALTERNATE("Basic SpellAbility Alternate"), // used for Overload, Flashback to know they must be handled as Alternate casting costs
FACE_DOWN_CREATURE("Face down creature"), // used for Lands with Morph to cast as Face Down creature
SPLIT("Split SpellAbility"),
+ SPLIT_AFTERMATH("AftermathSplit SpellAbility"),
SPLIT_FUSED("Split SpellAbility"),
SPLIT_LEFT("LeftSplit SpellAbility"),
SPLIT_RIGHT("RightSplit SpellAbility"),
diff --git a/Mage/src/main/java/mage/game/GameImpl.java b/Mage/src/main/java/mage/game/GameImpl.java
index 0fd3405f605..94e933ea9cc 100644
--- a/Mage/src/main/java/mage/game/GameImpl.java
+++ b/Mage/src/main/java/mage/game/GameImpl.java
@@ -1454,7 +1454,7 @@ public abstract class GameImpl implements Game, Serializable {
}
}
if (applier != null) {
- applier.apply(this, newBluePrint);
+ applier.apply(this, newBluePrint, source, copyToPermanentId);
}
CopyEffect newEffect = new CopyEffect(duration, newBluePrint, copyToPermanentId);
diff --git a/Mage/src/main/java/mage/game/events/CostEvent.java b/Mage/src/main/java/mage/game/events/CostEvent.java
new file mode 100644
index 00000000000..21e65fa5926
--- /dev/null
+++ b/Mage/src/main/java/mage/game/events/CostEvent.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.game.events;
+
+import java.util.UUID;
+import mage.abilities.costs.Cost;
+
+/**
+ *
+ * @author LevelX2
+ */
+public class CostEvent extends GameEvent {
+
+ protected Cost cost;
+
+ public CostEvent(EventType type, UUID targetId, UUID sourceId, UUID playerId, Cost cost) {
+ super(type, targetId, sourceId, playerId);
+ this.cost = cost;
+ }
+
+ public Cost getCost() {
+ return cost;
+ }
+
+ public void setCost(Cost cost) {
+ this.cost = cost;
+ }
+
+}
diff --git a/Mage/src/main/java/mage/game/events/GameEvent.java b/Mage/src/main/java/mage/game/events/GameEvent.java
index b6c8871fd3c..e1cfe5dc0fe 100644
--- a/Mage/src/main/java/mage/game/events/GameEvent.java
+++ b/Mage/src/main/java/mage/game/events/GameEvent.java
@@ -95,6 +95,7 @@ public class GameEvent implements Serializable {
DISCARD_CARD,
DISCARDED_CARD,
CYCLE_CARD, CYCLED_CARD,
+ PAY_CYCLE_COST, CAN_PAY_CYCLE_COST,
CLASH, CLASHED,
DAMAGE_PLAYER,
/* DAMAGED_PLAYER
@@ -261,6 +262,14 @@ public class GameEvent implements Serializable {
PHASE_IN, PHASED_IN,
TURNFACEUP, TURNEDFACEUP,
TURNFACEDOWN, TURNEDFACEDOWN,
+ /* OPTION_USED
+ targetId originalId of the ability that triggered the event
+ sourceId sourceId of the ability that triggered the event
+ playerId controller of the ability
+ amount not used for this event
+ flag not used for this event
+ */
+ OPTION_USED,
DAMAGE_CREATURE, DAMAGED_CREATURE,
DAMAGE_PLANESWALKER, DAMAGED_PLANESWALKER,
DESTROY_PERMANENT,
@@ -281,6 +290,7 @@ public class GameEvent implements Serializable {
FIGHTED_PERMANENT,
EXPLOITED_CREATURE,
EVOLVED_CREATURE,
+ EMBALMED_CREATURE,
ATTACH, ATTACHED,
STAY_ATTACHED,
UNATTACH, UNATTACHED,
diff --git a/Mage/src/main/java/mage/players/PlayerImpl.java b/Mage/src/main/java/mage/players/PlayerImpl.java
index a346270c3a4..305b71e170e 100644
--- a/Mage/src/main/java/mage/players/PlayerImpl.java
+++ b/Mage/src/main/java/mage/players/PlayerImpl.java
@@ -1237,7 +1237,8 @@ public abstract class PlayerImpl implements Player, Serializable {
continue;
}
}
- if (((SpellAbility) ability).getSpellAbilityType() == SpellAbilityType.SPLIT) {
+ if (((SpellAbility) ability).getSpellAbilityType() == SpellAbilityType.SPLIT
+ || ((SpellAbility) ability).getSpellAbilityType() == SpellAbilityType.SPLIT_AFTERMATH) {
continue;
}
useable.put(ability.getId(), (SpellAbility) ability);
@@ -2447,7 +2448,7 @@ public abstract class PlayerImpl implements Player, Serializable {
if (!copy.canActivate(playerId, game)) {
return false;
}
- if(available != null) {
+ if (available != null) {
game.getContinuousEffects().costModification(copy, game);
}
diff --git a/Mage/src/main/java/mage/util/functions/AbilityApplier.java b/Mage/src/main/java/mage/util/functions/AbilityApplier.java
index 16d36d0d29b..b5e30816b68 100644
--- a/Mage/src/main/java/mage/util/functions/AbilityApplier.java
+++ b/Mage/src/main/java/mage/util/functions/AbilityApplier.java
@@ -27,6 +27,7 @@
*/
package mage.util.functions;
+import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.game.Game;
@@ -45,13 +46,13 @@ public class AbilityApplier extends ApplyToPermanent {
}
@Override
- public boolean apply(Game game, Permanent permanent) {
+ public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
permanent.addAbility(ability, game);
return true;
}
@Override
- public boolean apply(Game game, MageObject mageObject) {
+ public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
mageObject.getAbilities().add(ability);
return true;
}
diff --git a/Mage/src/main/java/mage/util/functions/AddSubtypeApplier.java b/Mage/src/main/java/mage/util/functions/AddSubtypeApplier.java
index 95bc8eb39f8..d97b47f2e43 100644
--- a/Mage/src/main/java/mage/util/functions/AddSubtypeApplier.java
+++ b/Mage/src/main/java/mage/util/functions/AddSubtypeApplier.java
@@ -5,7 +5,9 @@
*/
package mage.util.functions;
+import java.util.UUID;
import mage.MageObject;
+import mage.abilities.Ability;
import mage.game.Game;
import mage.game.permanent.Permanent;
@@ -22,7 +24,7 @@ public class AddSubtypeApplier extends ApplyToPermanent {
}
@Override
- public boolean apply(Game game, Permanent permanent) {
+ public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
if (!permanent.getSubtype(game).contains(subtype)) {
permanent.getSubtype(game).add(subtype);
}
@@ -30,7 +32,7 @@ public class AddSubtypeApplier extends ApplyToPermanent {
}
@Override
- public boolean apply(Game game, MageObject mageObject) {
+ public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
if (!mageObject.getSubtype(game).contains(subtype)) {
mageObject.getSubtype(game).add(subtype);
}
diff --git a/Mage/src/main/java/mage/util/functions/ApplyToMageObject.java b/Mage/src/main/java/mage/util/functions/ApplyToMageObject.java
index 0de92b351c2..13feb98d67a 100644
--- a/Mage/src/main/java/mage/util/functions/ApplyToMageObject.java
+++ b/Mage/src/main/java/mage/util/functions/ApplyToMageObject.java
@@ -27,7 +27,9 @@
*/
package mage.util.functions;
+import java.util.UUID;
import mage.MageObject;
+import mage.abilities.Ability;
import mage.game.Game;
/**
@@ -36,5 +38,5 @@ import mage.game.Game;
*/
public abstract class ApplyToMageObject {
- public abstract boolean apply(Game game, MageObject mageObject);
+ public abstract boolean apply(Game game, MageObject mageObject, Ability source, UUID targetObjectId);
}
diff --git a/Mage/src/main/java/mage/util/functions/ApplyToPermanent.java b/Mage/src/main/java/mage/util/functions/ApplyToPermanent.java
index 22d25bb949b..fa6947ee24e 100644
--- a/Mage/src/main/java/mage/util/functions/ApplyToPermanent.java
+++ b/Mage/src/main/java/mage/util/functions/ApplyToPermanent.java
@@ -1,6 +1,8 @@
package mage.util.functions;
import java.io.Serializable;
+import java.util.UUID;
+import mage.abilities.Ability;
import mage.game.Game;
import mage.game.permanent.Permanent;
@@ -9,5 +11,5 @@ import mage.game.permanent.Permanent;
*/
public abstract class ApplyToPermanent extends ApplyToMageObject implements Serializable {
- public abstract boolean apply(Game game, Permanent permanent);
+ public abstract boolean apply(Game game, Permanent permanent, Ability source, UUID targetObjectId);
}
diff --git a/Mage/src/main/java/mage/util/functions/CardTypeApplier.java b/Mage/src/main/java/mage/util/functions/CardTypeApplier.java
index a1fa21435a0..73be752dd67 100644
--- a/Mage/src/main/java/mage/util/functions/CardTypeApplier.java
+++ b/Mage/src/main/java/mage/util/functions/CardTypeApplier.java
@@ -27,7 +27,9 @@
*/
package mage.util.functions;
+import java.util.UUID;
import mage.MageObject;
+import mage.abilities.Ability;
import mage.constants.CardType;
import mage.game.Game;
import mage.game.permanent.Permanent;
@@ -45,14 +47,14 @@ public class CardTypeApplier extends ApplyToPermanent {
}
@Override
- public boolean apply(Game game, Permanent permanent) {
- permanent.addCardType(cardType);
+ public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
+ permanent.addCardType(cardType);
return true;
}
@Override
- public boolean apply(Game game, MageObject mageObject) {
- mageObject.addCardType(cardType);
+ public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
+ mageObject.addCardType(cardType);
return true;
}
}
diff --git a/Mage/src/main/java/mage/util/functions/EmptyApplyToPermanent.java b/Mage/src/main/java/mage/util/functions/EmptyApplyToPermanent.java
index f41263fc8c7..c838a8f7566 100644
--- a/Mage/src/main/java/mage/util/functions/EmptyApplyToPermanent.java
+++ b/Mage/src/main/java/mage/util/functions/EmptyApplyToPermanent.java
@@ -1,6 +1,8 @@
package mage.util.functions;
+import java.util.UUID;
import mage.MageObject;
+import mage.abilities.Ability;
import mage.game.Game;
import mage.game.permanent.Permanent;
@@ -10,13 +12,13 @@ import mage.game.permanent.Permanent;
public class EmptyApplyToPermanent extends ApplyToPermanent {
@Override
- public boolean apply(Game game, Permanent permanent) {
+ public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
// do nothing
return true;
}
@Override
- public boolean apply(Game game, MageObject mageObject) {
+ public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
return true;
}
diff --git a/Mage/src/main/java/mage/watchers/common/CardsCycledOrDiscardedThisTurnWatcher.java b/Mage/src/main/java/mage/watchers/common/CardsCycledOrDiscardedThisTurnWatcher.java
index b54118f03d2..51be291cf6f 100644
--- a/Mage/src/main/java/mage/watchers/common/CardsCycledOrDiscardedThisTurnWatcher.java
+++ b/Mage/src/main/java/mage/watchers/common/CardsCycledOrDiscardedThisTurnWatcher.java
@@ -64,8 +64,7 @@ public class CardsCycledOrDiscardedThisTurnWatcher extends Watcher {
if (event.getType() == GameEvent.EventType.UNTAP_STEP_PRE) {
reset();
}
- if (event.getType() == GameEvent.EventType.CYCLED_CARD
- || event.getType() == GameEvent.EventType.DISCARDED_CARD) {
+ if (event.getType() == GameEvent.EventType.DISCARDED_CARD) {
UUID playerId = event.getPlayerId();
if (playerId != null
&& game.getCard(event.getTargetId()) != null) {
diff --git a/Mage/src/main/java/mage/watchers/common/CreaturesDiedWatcher.java b/Mage/src/main/java/mage/watchers/common/CreaturesDiedWatcher.java
index caf6a155aba..5905a625dd4 100644
--- a/Mage/src/main/java/mage/watchers/common/CreaturesDiedWatcher.java
+++ b/Mage/src/main/java/mage/watchers/common/CreaturesDiedWatcher.java
@@ -29,7 +29,6 @@ package mage.watchers.common;
import java.util.HashMap;
import java.util.UUID;
-import mage.constants.CardType;
import mage.constants.WatcherScope;
import mage.game.Game;
import mage.game.events.GameEvent;
diff --git a/Mage/src/main/java/mage/watchers/common/PermanentsEnteredBattlefieldWatcher.java b/Mage/src/main/java/mage/watchers/common/PermanentsEnteredBattlefieldWatcher.java
index 9965028257e..f73cd794713 100644
--- a/Mage/src/main/java/mage/watchers/common/PermanentsEnteredBattlefieldWatcher.java
+++ b/Mage/src/main/java/mage/watchers/common/PermanentsEnteredBattlefieldWatcher.java
@@ -9,7 +9,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.UUID;
-import mage.constants.CardType;
import mage.constants.WatcherScope;
import mage.game.Game;
import mage.game.events.GameEvent;
diff --git a/Utils/find_new_cards.pl b/Utils/find_new_cards.pl
index 544344c7135..f5fce14fc05 100644
--- a/Utils/find_new_cards.pl
+++ b/Utils/find_new_cards.pl
@@ -48,7 +48,6 @@ chomp $cmd;
my %cn_classes;
sub read_all_card_names
{
- print ("find \"cards.add\" ../Mage.Sets/src/mage/sets/*.java\n");
print ("find \"add\" ..\\Mage.Sets\\src\\mage\\sets\\*.java\n");
my $all_cards = `find \"add\" ..\\Mage.Sets\\src\\mage\\sets\\*.java`;
my @cards = split /\n/, $all_cards;
@@ -122,12 +121,23 @@ if (exists ($new_order{$cmd}))
$past_line = $line;
}
+ open MTG_CARDS_DATA, "mtg-cards-data.txt";
+ my %all_cards;
+ while ()
+ {
+ my $val = $_;
+ $val =~ s/\|/xxxx/;
+ $val =~ s/\|.*//;
+ $val =~ m/^(.*)xxxx(.*)/;
+ $all_cards {$1} = $2;
+ }
+
print ("Found these new card names!\n");
foreach $line (sort keys (%new_cards))
{
if ($new_cards {$line} > 0)
{
- print ($line, "\n");
+ print ($line, " in ", $all_cards {$line}, "\n");
}
}
}
diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt
index b340977e4f7..a81880571de 100644
--- a/Utils/mtg-cards-data.txt
+++ b/Utils/mtg-cards-data.txt
@@ -30832,7 +30832,7 @@ Verdant Catacombs|Modern Masters 2017|249|R||Land|||{T}, Pay 1 life, Sacrifice V
Angel of Sanctions|Amonkhet|1|M|{3}{W}{W}|Creature - Angel|3|4|Flying$When Angel of Sanctions enters the battlefield, you may exile target nonland permanent an opponent controls until Angel of Sanctions leaves the battlefield.$Embalm {5}{W}|
Anointed Procession|Amonkhet|2|R|{3}{W}|Enchantment|||If an effect would create one or more tokens under your control, it creates twice that many of those tokens instead.|
Anointer Priest|Amonkhet|3|C|{1}{W}|Creature - Human Cleric|1|3|Whenever a creature token enters the battlefield under your control, you gain 1 life.$Embalm {3}{W}|
-Approach of the Second Sun|Amonkhet|4|R|{6}{W}|Sorcery|||If Approach of the Second Sun was cast from your hand and you cast another spell named Approach of the Second Sun this game, you win the game. If not, you gain 7 life and put Approach of the Second Sun back into your library as the 7th card from the top.|
+Approach of the Second Sun|Amonkhet|4|R|{6}{W}|Sorcery|||If Approach of the Second Sun was cast from your hand and you've cast another spell named Approach of the Second Sun this game, you win the game. Otherwise, put Approach of the Second Sun into its owner's library seventh from the top and you gain 7 life.|
Aven Mindcensor|Amonkhet|5|R|{2}{W}|Creature - Bird Wizard|2|1|Flash$Flying$If an opponent would search a library, that player searches the top four cards of that library instead.|
Binding Mummy|Amonkhet|6|C|{1}{W}|Creature - Zombie|2|2|Whenever another Zombie enters the battlefield under your control, you may tap target artifact or creature.|
Cartouche of Solidarity|Amonkhet|7|C|{W}|Enchantment - Aura Cartouche|||Enchant creature you control$When Cartouche of Solidarity enters the battlefield, create a 1/1 white Warrior creature token with vigilance.$Enchanted creature gets +1/+1 and has first strike.|
@@ -30928,7 +30928,7 @@ Lay Bare the Heart|Amonkhet|96|U|{1}{B}|Sorcery|||Target opponent reveals his or
Liliana, Death's Majesty|Amonkhet|97|M|{3}{B}{B}|Planeswalker - Liliana|||+1: Create a 2/2 black Zombie creature token. Put the top two cards of your library into your graveyard.$-3: Return target creature card from your graveyard to the battlefield. That creature is a black Zombie in addition to its other colors and types.$-7: Destroy all non-Zombie creatures.|
Liliana's Mastery|Amonkhet|98|R|{3}{B}{B}|Enchantment|||Zombies you control get +1/+1.When Liliana's Mastery enters the battlefield, create two 2/2 black Zombie creature tokens.|
Lord of the Accursed|Amonkhet|99|U|{2}{B}|Creature - Zombie|2|3|Other Zombies you control get +1/+1.${1}{B}, {T}: All Zombies gain menace until end of turn.|
-Miasma Mummy|Amonkhet|100|C|{1}{B}|Creature - Zombie Jackal|2|2|When Miasma Mummy enters the battlefield, each player discards a card.|
+Miasmic Mummy|Amonkhet|100|C|{1}{B}|Creature - Zombie Jackal|2|2|When Miasmic Mummy enters the battlefield, each player discards a card.|
Nest of Scarabs|Amonkhet|101|U|{2}{B}|Enchantment|||Whenever you put one or more -1/-1 counters on a creature, create that many 1/1 black Insect tokens.|
Painful Lesson|Amonkhet|102|C|{2}{B}|Sorcery|||Target player draws two cards and loses 2 life.|
Pitiless Vizier|Amonkhet|103|C|{3}{B}|Creature - Minotaur Cleric|4|2|Whenever you cycle or discard a card, Pitiless Vizier gains indestructible until end of turn.|
@@ -31078,7 +31078,7 @@ Kefnet's Monument|Amonkhet|231|U|{3}|Legendary Artifact|||Blue creature spells y
Luxa River Shrine|Amonkhet|232|C|{3}|Artifact|||{1}, {T}: You gain 1 life. Put a brick counter on Luxa River Shrine.${T}: You gain 2 life. Activate this ability only if there are three or more brick counters on Luxa River Shrine.|
Oketra's Monument|Amonkhet|233|U|{3}|Legendary Artifact|||White creature spells you cast cost {1} less to cast.$Whenever you cast a creature spell, create 1/1 a white Warrior creature token with vigilance.|
Oracle's Vault|Amonkhet|234|R|{4}|Artifact|||{2}, {T}: Exile the top card of your library. Until end of turn, you may play that card. Put a brick counter on Oracle's Vault.${T}: Exile the top card of your library. Until end of turn, you may play that card without paying its mana cost. Activate this ability only if there are three or more brick counters on Oracle's Vault.|
-Pyramid of the Pantheon|235|R|{1}|Artifact|||{2}, {T}: Add one mana of any color to your mana pool. Put a brick counter on Pyramid of the Pantheon.${T}: Add three mana of any one color to your mana pool. Activate this ability only of there are three or more brick counters on Pyramid of the Pantheon.|
+Pyramid of the Pantheon|Amonkhet|235|R|{1}|Artifact|||{2}, {T}: Add one mana of any color to your mana pool. Put a brick counter on Pyramid of the Pantheon.$ {T}: Add three mana of any one color to your mana pool. Activate this ability only of there are three or more brick counters on Pyramid of the Pantheon.|
Rhonas's Monument|Amonkhet|236|U|{3}|Legendary Artifact|||Green creature spells you cast cost {1} less to cast.$Whenever you cast a creature spell, target creature you control gets +2/+2 and gains trample until end of turn.|
Throne of the God-Pharaoh|Amonkhet|237|R|{2}|Legendary Artifact|||At the beginning of your end step, each opponent loses life equal to the number of tapped creatures you control.|
Watchers of the Dead|Amonkhet|238|U|{2}|Artifact Creature - Cat|2|2|Exile Watchers of the Dead: Each opponent chooses two cards in his or her graveyard and exiles the rest.|
diff --git a/pom.xml b/pom.xml
index 0f9189810a0..f181416215d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
org.mage
mage-root
- 1.4.22
+ 1.4.23
pom
Mage Root
Mage Root POM
@@ -84,7 +84,7 @@
- 1.4.22
+ 1.4.23
UTF-8