diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a6ea3b59..0a3e6a070 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,37 @@ # Changelog ## [latest-master] (https://github.com/WagicProject/wagic/tree/latest-master) +#### 8/3/16 +- *Merged pull-request:* andAbility on ATokenCreator, Extend AAFlip [#\824] (https://github.com/WagicProject/wagic/pull/824) ([kevlahnota](https://github.com/kevlahnota)) + +#### 7/31/16 +- *Merged pull-request:* Fix Chandra, Flamecaller & Cryptolith Rite [#\818] (https://github.com/WagicProject/wagic/pull/818) ([kevlahnota](https://github.com/kevlahnota)) + +#### 7/28/16 +- *Merged pull-request:* changing some of the logic to the previous fixes, we want to avoid using code that looks for specific card names. [#\800] (https://github.com/WagicProject/wagic/pull/800) ([zethfoxster](https://github.com/zethfoxster)) + +#### 7/26/16 +- *Merged pull-request:* granted flashback [#\791] (https://github.com/WagicProject/wagic/pull/791) ([kevlahnota](https://github.com/kevlahnota)) + +#### 7/23/16 +- *Merged pull-request:* Fix Flying vs Moat (multiples of them). Fixes issue #526 [#\783] (https://github.com/WagicProject/wagic/pull/783) ([kevlahnota](https://github.com/kevlahnota)) + +#### 7/19/16 +- *Merged pull-request:* pushing to master [#\770] (https://github.com/WagicProject/wagic/pull/770) ([zethfoxster](https://github.com/zethfoxster)) + +#### 7/18/16 +- *Merged pull-request:* Fix Deck Menu layer, Change Main Menu Layout, Fix Crash cdaactive on tokens [#\765] (https://github.com/WagicProject/wagic/pull/765) ([kevlahnota](https://github.com/kevlahnota)) + +#### 7/12/16 +- *Merged pull-request:* Pushing fixes [#\750] (https://github.com/WagicProject/wagic/pull/750) ([zethfoxster](https://github.com/zethfoxster)) + +- *Merged pull-request:* try to fix failed logic here [#\747] (https://github.com/WagicProject/wagic/pull/747) ([kevlahnota](https://github.com/kevlahnota)) + +#### 7/9/16 +- *Merged pull-request:* pushing to master [#\738] (https://github.com/WagicProject/wagic/pull/738) ([zethfoxster](https://github.com/zethfoxster)) + +- *Merged pull-request:* Sorted Primitives and Cleanup Tabs [#\736] (https://github.com/WagicProject/wagic/pull/736) ([kevlahnota](https://github.com/kevlahnota)) + #### 7/7/16 - *Merged pull-request:* Sorted Primitives and Cleanup Tabs [#\727] (https://github.com/WagicProject/wagic/pull/719) ([kevlahnota](https://github.com/kevlahnota)) diff --git a/JGE/Dependencies/SDL/src/atomic/SDL_spinlock.c b/JGE/Dependencies/SDL/src/atomic/SDL_spinlock.c index f74de81c7..07c26308a 100644 --- a/JGE/Dependencies/SDL/src/atomic/SDL_spinlock.c +++ b/JGE/Dependencies/SDL/src/atomic/SDL_spinlock.c @@ -77,6 +77,13 @@ SDL_AtomicTryLock(SDL_SpinLock *lock) : "=&r" (result) : "r" (1), "r" (lock) : "cc", "memory"); return (result == 0); +#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) + int result; + __asm__ __volatile__( + "lock ; xchgl %0, (%1)\n" + : "=r" (result) : "r" (lock), "0" (1) : "cc", "memory"); + return (result == 0); + #else /* Need CPU instructions for spinlock here! */ __need_spinlock_implementation__ diff --git a/README.md b/README.md index 83459c59f..d1d346d32 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ It is highly customizable and allows the player to tweak the rules / create thei Info, downloads, discussions and more at http://wololo.net/forum/index.php --![alt text](http://wololo.net/wagic/wp-content/uploads/2009/10/shop.jpg "Screenshot") +![alt text](http://wololo.net/wagic/wp-content/uploads/2009/10/shop.jpg "Screenshot") diff --git a/projects/mtg/Android/.gitignore b/projects/mtg/Android/.gitignore index 5a9b113aa..fb2d02061 100644 --- a/projects/mtg/Android/.gitignore +++ b/projects/mtg/Android/.gitignore @@ -1,3 +1,4 @@ /gen /bin +/libs diff --git a/projects/mtg/Android/AndroidManifest.xml b/projects/mtg/Android/AndroidManifest.xml index 3a4255c1c..543d9f775 100644 --- a/projects/mtg/Android/AndroidManifest.xml +++ b/projects/mtg/Android/AndroidManifest.xml @@ -4,15 +4,13 @@ - - + + - - diff --git a/projects/mtg/Android/jni/Application.mk b/projects/mtg/Android/jni/Application.mk index 01804bb30..53a2e0f9d 100644 --- a/projects/mtg/Android/jni/Application.mk +++ b/projects/mtg/Android/jni/Application.mk @@ -1,6 +1,7 @@ APP_PROJECT_PATH := $(call my-dir)/.. APP_CPPFLAGS += -frtti -fexceptions APP_ABI := armeabi armeabi-v7a +#APP_ABI := x86 # mainly for emulators APP_STL := gnustl_static APP_MODULES := libpng libjpeg main SDL diff --git a/projects/mtg/Android/res/drawable-hdpi/icon.png b/projects/mtg/Android/res/drawable-hdpi/icon.png index 5332e9cf4..f38502e79 100644 Binary files a/projects/mtg/Android/res/drawable-hdpi/icon.png and b/projects/mtg/Android/res/drawable-hdpi/icon.png differ diff --git a/projects/mtg/Android/res/drawable-ldpi/icon.png b/projects/mtg/Android/res/drawable-ldpi/icon.png index 16ebfc68e..0d8fd16ac 100644 Binary files a/projects/mtg/Android/res/drawable-ldpi/icon.png and b/projects/mtg/Android/res/drawable-ldpi/icon.png differ diff --git a/projects/mtg/Android/res/drawable-mdpi/icon.png b/projects/mtg/Android/res/drawable-mdpi/icon.png index a45d22ba5..62b802c6f 100644 Binary files a/projects/mtg/Android/res/drawable-mdpi/icon.png and b/projects/mtg/Android/res/drawable-mdpi/icon.png differ diff --git a/projects/mtg/Android/src/net/wagic/utils/DeckImporter.java b/projects/mtg/Android/src/net/wagic/utils/DeckImporter.java index 55bfe3dd6..74aeaafe0 100644 --- a/projects/mtg/Android/src/net/wagic/utils/DeckImporter.java +++ b/projects/mtg/Android/src/net/wagic/utils/DeckImporter.java @@ -11,14 +11,13 @@ import android.util.Log; public class DeckImporter { - public static String importDeck( File f, String mypath, String activePath ) { String message = ""; String deck = ""; String deckname = ""; - String prefix = "#SB:"; - int cardcount = 0; + String prefix = "#SB:"; + int cardcount = 0; if(f.exists() && !f.isDirectory()) { deckname = f.getName(); @@ -36,91 +35,86 @@ public class DeckImporter while (scanner.hasNext()) { String line = scanner.nextLine(); - line = line.trim(); - if (!line.equals("") && cardcount < 61) // don't write out blank lines - { - String[] slines = line.split("\\s+"); - String arranged = ""; - for(int idx = 1; idx < slines.length; idx++) - { - arranged += slines[idx] + " "; - } - if ((isNumeric(slines[0])) && arranged != null) - { - if (slines[1] != null && slines[1].startsWith("[")) - { - arranged = arranged.substring(5); - slines[1] = slines[1].replaceAll("\\[", "").replaceAll("\\]",""); - deck += arranged + " (" + renameSet(slines[1]) + ") * " + slines[0] + "\n"; - } - else - { - deck += arranged + "(*) * " + slines[0] + "\n"; - } - cardcount += Integer.parseInt(slines[0]); - } - } - } - File profile = new File(activePath+"/Res/settings/options.txt"); - if(profile.exists() && !profile.isDirectory()) - { - String profileName = getActiveProfile(profile); - if(profileName != "Missing!") - { - File rootProfiles = new File(activePath+"/Res/profiles/"+profileName); - if(rootProfiles.exists() && rootProfiles.isDirectory()) - { - //save deck - int countdeck = 1; - File[] files = rootProfiles.listFiles(); - for (int i = 0; i < files.length; i++) - {//check if there is available deck... - if(files[i].getName().startsWith("deck")) - countdeck++; - } - File toSave = new File(rootProfiles+"/deck"+countdeck+".txt"); - try - { - FileOutputStream fop = new FileOutputStream(toSave); - - // if file doesn't exists, then create it - if (!toSave.exists()) { - toSave.createNewFile(); - } - // get the content in bytes - byte[] contentInBytes = deck.getBytes(); - fop.write(contentInBytes); - fop.flush(); - fop.close(); - message = "Import Deck Success!\n"+cardcount+" total cards in this deck\n\n"+deck; - } - catch (IOException e) - { - message = e.getMessage(); - } - } - else - { - message = "Missing Folder!"; - } - } - } - else - { - message = "Invalid Profile!"; - } - } - else - { - message = "No errors, and file EMPTY"; - } - } - catch(IOException e) - { - message = e.getMessage(); - } - } - return message; + line = line.trim(); + if (!line.equals("") && cardcount < 61) // don't write out blank lines + { + String[] slines = line.split("\\s+"); + String arranged = ""; + for (int idx = 1; idx < slines.length; idx++) + { + arranged += slines[idx] + " "; + } + if ((isNumeric(slines[0])) && arranged != null) + { + if (slines[1] != null && slines[1].startsWith("[")) + { + arranged = arranged.substring(5); + slines[1] = slines[1].replaceAll("\\[", "").replaceAll("\\]", ""); + deck += arranged + " (" + renameSet(slines[1]) + ") * " + slines[0] + "\n"; + } else + { + deck += arranged + "(*) * " + slines[0] + "\n"; + } + cardcount += Integer.parseInt(slines[0]); + } + } + } + File profile = new File(activePath + "/Res/settings/options.txt"); + if (profile.exists() && !profile.isDirectory()) + { + String profileName = getActiveProfile(profile); + if (profileName != "Missing!") + { + File rootProfiles = new File(activePath + "/Res/profiles/" + profileName); + if (rootProfiles.exists() && rootProfiles.isDirectory()) + { + //save deck + int countdeck = 1; + File[] files = rootProfiles.listFiles(); + for (int i = 0; i < files.length; i++) + {//check if there is available deck... + if (files[i].getName().startsWith("deck")) + countdeck++; + } + File toSave = new File(rootProfiles + "/deck" + countdeck + ".txt"); + try + { + FileOutputStream fop = new FileOutputStream(toSave); + + // if file doesn't exists, then create it + if (!toSave.exists()) + { + toSave.createNewFile(); + } + // get the content in bytes + byte[] contentInBytes = deck.getBytes(); + fop.write(contentInBytes); + fop.flush(); + fop.close(); + message = "Import Deck Success!\n" + cardcount + " total cards in this deck\n\n" + deck; + } catch (IOException e) + { + message = e.getMessage(); + } + } else + { + message = "Missing Folder!"; + } + } + } else + { + message = "Invalid Profile!"; + } + } else + { + message = "No errors, and file EMPTY"; + } + } catch (IOException e) + { + message = e.getMessage(); + } + } + return message; } private static boolean isNumeric(String input) @@ -135,7 +129,7 @@ public class DeckImporter } return true; } - + private static String getActiveProfile(File mypath) { String name = ""; @@ -158,7 +152,7 @@ public class DeckImporter } return name; } - + private static String renameSet(String set) { if (set == "") @@ -278,5 +272,4 @@ public class DeckImporter else return set; } - } diff --git a/projects/mtg/Android/src/net/wagic/utils/StorageOptions.java b/projects/mtg/Android/src/net/wagic/utils/StorageOptions.java index 622e89bad..8ab6d2090 100644 --- a/projects/mtg/Android/src/net/wagic/utils/StorageOptions.java +++ b/projects/mtg/Android/src/net/wagic/utils/StorageOptions.java @@ -14,6 +14,7 @@ import android.util.Log; public class StorageOptions { + private static final String TAG = StorageOptions.class.getCanonicalName(); private static ArrayList mMounts = new ArrayList(); private static ArrayList mVold = new ArrayList(); @@ -77,11 +78,11 @@ public class StorageOptions } catch (FileNotFoundException fnfex) { // if proc/mount doesn't exist we just use - Log.i(StorageOptions.class.getCanonicalName(), fnfex.getMessage() + ": assuming " + defaultMountPoint + " is the only mount point"); + Log.i(TAG, fnfex.getMessage() + ": assuming " + defaultMountPoint + " is the only mount point"); mMounts.add(defaultMountPoint); } catch (Exception e) { - Log.e(StorageOptions.class.getCanonicalName(), e.getMessage() + ": unknown exception while reading mounts file"); + Log.e(TAG, e.getMessage() + ": unknown exception while reading mounts file"); mMounts.add(defaultMountPoint); } } @@ -111,11 +112,11 @@ public class StorageOptions } catch (FileNotFoundException fnfex) { // if proc/mount doesn't exist we just use - Log.i(StorageOptions.class.getCanonicalName(), fnfex.getMessage() + ": assuming " + defaultMountPoint + " is the only mount point"); + Log.i(TAG, fnfex.getMessage() + ": assuming " + defaultMountPoint + " is the only mount point"); mMounts.add(defaultMountPoint); } catch (Exception e) { - Log.e(StorageOptions.class.getCanonicalName(), e.getMessage() + ": unknown exception while reading mounts file"); + Log.e(TAG, e.getMessage() + ": unknown exception while reading mounts file"); mMounts.add(defaultMountPoint); } } @@ -144,11 +145,11 @@ public class StorageOptions } catch (FileNotFoundException fnfex) { // if vold.fstab doesn't exist we use the value gathered from the Environment - Log.i(StorageOptions.class.getCanonicalName(), fnfex.getMessage() + ": assuming " + defaultMountPoint + " is the only mount point"); + Log.i(TAG, fnfex.getMessage() + ": assuming " + defaultMountPoint + " is the only mount point"); mMounts.add(defaultMountPoint); } catch (Exception e) { - Log.e(StorageOptions.class.getCanonicalName(), e.getMessage() + ": unknown exception while reading mounts file"); + Log.e(TAG, e.getMessage() + ": unknown exception while reading vold.fstab file"); mMounts.add(defaultMountPoint); } } @@ -174,15 +175,18 @@ public class StorageOptions { /* * Sometimes the two lists of mount points will be different. We only want those mount points that are in both list. - * + * * Compare the two lists together and remove items that are not in both lists. */ - for (int i = 0; i < mMounts.size(); i++) + if (mVold.size() > 0) { - String mount = mMounts.get(i); - if (!mVold.contains(mount)) - mMounts.remove(i--); + for (int i = 0; i < mMounts.size(); i++) + { + String mount = mMounts.get(i); + if (!mVold.contains(mount)) + mMounts.remove(i--); + } } // don't need this anymore, clear the vold list to reduce memory @@ -204,9 +208,10 @@ public class StorageOptions if (!root.exists() || !root.isDirectory() || !root.canWrite()) mMounts.remove(i--); } - + if (t == 0 && Build.VERSION.SDK_INT >= 16 && findForcemount()) - {//if none is found lets force it for Jellybean and above... + { + //if none is found lets force it for Jellybean and above... if (System.getenv("EXTERNAL_STORAGE") != null) { File root = new File(System.getenv("EXTERNAL_STORAGE")); @@ -224,7 +229,7 @@ public class StorageOptions } } } - + if (System.getenv("SECONDARY_STORAGE") != null) { File root = new File(System.getenv("SECONDARY_STORAGE")); @@ -247,6 +252,7 @@ public class StorageOptions private static void setProperties() { + Log.d(TAG, "setProperties()"); /* * At this point all the paths in the list should be valid. Build the public properties. */ @@ -268,7 +274,8 @@ public class StorageOptions else { for (String path : mMounts) - { // TODO: /mnt/sdcard is assumed to always mean internal storage. Use this comparison until there is a better way to do this + { + // TODO: /mnt/sdcard is assumed to always mean internal storage. Use this comparison until there is a better way to do this if ("/mnt/sdcard".equalsIgnoreCase(path)) mLabels.add("Built-in Storage"); else @@ -310,84 +317,97 @@ public class StorageOptions * * @return true if the device is rooted, false otherwise. */ - public static boolean isRooted() { - - // get from build info - String buildTags = android.os.Build.TAGS; - if (buildTags != null && buildTags.contains("test-keys")) { - return true; - } - - // check if /system/app/Superuser.apk is present - try { - File file = new File("/system/app/Superuser.apk"); - if (file.exists()) { - return true; - } - } - catch (Exception e1) { - // ignore - } - try { - File file = new File("/system/app/Superuser/Superuser.apk"); - if (file.exists()) { - return true; - } - } - catch (Exception e1) { - // ignore - } - //SuperSU - try { - File file = new File("/system/app/SuperSU.apk"); - if (file.exists()) { - return true; - } - } - catch (Exception e1) { - // ignore - } - try { - File file = new File("/system/app/SuperSU/SuperSU.apk"); - if (file.exists()) { - return true; - } - } - catch (Exception e1) { - // ignore - } - // try executing commands - return canExecuteCommand("/system/xbin/which su") - || canExecuteCommand("/system/bin/which su") || canExecuteCommand("which su"); - } - - // executes a command on the system - private static boolean canExecuteCommand(String command) { - boolean executedSuccesfully; - try { - Runtime.getRuntime().exec(command); - executedSuccesfully = true; - } - catch (Exception e) { - executedSuccesfully = false; - } - - return executedSuccesfully; - } - - private static boolean findForcemount(){ - try + public static boolean isRooted() { - File file = new File(System.getenv("EXTERNAL_STORAGE")+"/forcemount"); - if (file.exists()) + // get from build info + String buildTags = android.os.Build.TAGS; + if (buildTags != null && buildTags.contains("test-keys")) { return true; } - } - catch (Exception e1) + + // check if /system/app/Superuser.apk is present + try + { + File file = new File("/system/app/Superuser.apk"); + if (file.exists()) + { + return true; + } + } catch (Exception e1) + { + // ignore + } + try + { + File file = new File("/system/app/Superuser/Superuser.apk"); + if (file.exists()) + { + return true; + } + } catch (Exception e1) + { + // ignore + } + //SuperSU + try + { + File file = new File("/system/app/SuperSU.apk"); + if (file.exists()) + { + return true; + } + } catch (Exception e1) + { + // ignore + } + try + { + File file = new File("/system/app/SuperSU/SuperSU.apk"); + if (file.exists()) + { + return true; + } + } catch (Exception e1) + { + // ignore + } + // try executing commands + return canExecuteCommand("/system/xbin/which su") + || canExecuteCommand("/system/bin/which su") || canExecuteCommand("which su"); + } + + // executes a command on the system + private static boolean canExecuteCommand(String command) { + boolean executedSuccesfully; + try + { + Runtime.getRuntime().exec(command); + executedSuccesfully = true; + } catch (Exception e) + { + executedSuccesfully = false; + } + + return executedSuccesfully; + } + + private static boolean findForcemount() + { + Log.d(TAG, "findForcemount()"); + try + { + File file = new File(System.getenv("EXTERNAL_STORAGE") + "/forcemount"); + if (file.exists()) + { + return true; + } + } catch (Exception e) + { + Log.w(TAG, e.getMessage()); + return false; + } return false; } - return false; - } } diff --git a/projects/mtg/Android/src/org/libsdl/app/SDLActivity.java b/projects/mtg/Android/src/org/libsdl/app/SDLActivity.java index 4c4d166ba..56b644caa 100644 --- a/projects/mtg/Android/src/org/libsdl/app/SDLActivity.java +++ b/projects/mtg/Android/src/org/libsdl/app/SDLActivity.java @@ -14,8 +14,6 @@ import java.net.URLConnection; import java.util.ArrayList; import java.util.Scanner; - - import javax.microedition.khronos.egl.EGL10; import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.egl.EGLContext; @@ -68,12 +66,11 @@ import android.widget.FrameLayout.LayoutParams; */ public class SDLActivity extends Activity implements OnKeyListener { + private static final String TAG = SDLActivity.class.getCanonicalName(); + //import deck globals - public ArrayList myresult = new ArrayList(); - public String myclickedItem = ""; - - // TAG used for debugging in DDMS - public static String TAG = Activity.class.getCanonicalName(); + public ArrayList myresult = new ArrayList(); + public String myclickedItem = ""; // Main components private static SDLActivity mSingleton; @@ -352,7 +349,7 @@ public class SDLActivity extends Activity implements OnKeyListener updateStorageLocations(); } catch (Exception ioex) { - Log.e("SDL", "An error occurred in setting up the storage locations."); + Log.e(TAG, "An error occurred in setting up the storage locations."); } } @@ -497,14 +494,12 @@ public class SDLActivity extends Activity implements OnKeyListener @Override protected void onCreate(Bundle savedInstanceState) { - // Log.v("SDL", "onCreate()"); + //Log.d(TAG, "onCreate()"); super.onCreate(savedInstanceState); // So we can call stuff from static callbacks mSingleton = this; mContext = this.getApplicationContext(); - // get the current version of the app to set the core filename - String versionCodeString = getApplicationCode(); RES_FILENAME = getResourceName(); StorageOptions.determineStorageOptions(); @@ -532,7 +527,7 @@ public class SDLActivity extends Activity implements OnKeyListener @Override protected void onPause() { - // Log.v("SDL", "onPause()"); + // Log.d(TAG, "onPause()"); super.onPause(); SDLActivity.nativePause(); } @@ -540,7 +535,7 @@ public class SDLActivity extends Activity implements OnKeyListener @Override protected void onResume() { - // Log.v("SDL", "onResume()"); + // Log.d(TAG, "onResume()"); super.onResume(); SDLActivity.nativeResume(); } @@ -548,8 +543,7 @@ public class SDLActivity extends Activity implements OnKeyListener @Override public void onDestroy() { - // Log.v("SDL", "onDestroy()"); - + // Log.d(TAG, "onDestroy()"); super.onDestroy(); mSurface.onDestroy(); } @@ -660,7 +654,7 @@ public class SDLActivity extends Activity implements OnKeyListener int audioFormat = is16Bit ? AudioFormat.ENCODING_PCM_16BIT : AudioFormat.ENCODING_PCM_8BIT; int frameSize = (isStereo ? 2 : 1) * (is16Bit ? 2 : 1); - // Log.v("SDL", "SDL audio: wanted " + (isStereo ? "stereo" : "mono") + " " + (is16Bit ? "16-bit" : "8-bit") + " " + ((float)sampleRate / 1000f) + "kHz, " + desiredFrames + " frames buffer"); + // Log.d(TAG, "SDL audio: wanted " + (isStereo ? "stereo" : "mono") + " " + (is16Bit ? "16-bit" : "8-bit") + " " + ((float)sampleRate / 1000f) + "kHz, " + desiredFrames + " frames buffer"); // Let the user pick a larger buffer if they really want -- but ye // gods they probably shouldn't, the minimums are horrifyingly high @@ -671,7 +665,7 @@ public class SDLActivity extends Activity implements OnKeyListener audioStartThread(); - // Log.v("SDL", "SDL audio: got " + ((mAudioTrack.getChannelCount() >= 2) ? "stereo" : "mono") + " " + ((mAudioTrack.getAudioFormat() == AudioFormat.ENCODING_PCM_16BIT) ? "16-bit" : "8-bit") + " " + ((float)mAudioTrack.getSampleRate() / 1000f) + + // Log.d(TAG, "SDL audio: got " + ((mAudioTrack.getChannelCount() >= 2) ? "stereo" : "mono") + " " + ((mAudioTrack.getAudioFormat() == AudioFormat.ENCODING_PCM_16BIT) ? "16-bit" : "8-bit") + " " + ((float)mAudioTrack.getSampleRate() / 1000f) + // "kHz, " + desiredFrames + " frames buffer"); if (is16Bit) @@ -719,7 +713,7 @@ public class SDLActivity extends Activity implements OnKeyListener } } else { - Log.w("SDL", "SDL audio: error return from write(short)"); + Log.w(TAG, "SDL audio: error return from write(short)"); return; } } @@ -744,7 +738,7 @@ public class SDLActivity extends Activity implements OnKeyListener } } else { - Log.w("SDL", "SDL audio: error return from write(short)"); + Log.w(TAG, "SDL audio: error return from write(short)"); return; } } @@ -759,11 +753,11 @@ public class SDLActivity extends Activity implements OnKeyListener mAudioThread.join(); } catch (Exception e) { - Log.v("SDL", "Problem stopping audio thread: " + e); + Log.e(TAG, "Problem stopping audio thread: " + e); } mAudioThread = null; - // Log.v("SDL", "Finished waiting for audio thread"); + // Log.d(TAG, "Finished waiting for audio thread"); } if (mAudioTrack != null) @@ -775,7 +769,7 @@ public class SDLActivity extends Activity implements OnKeyListener class DownloadFileAsync extends AsyncTask { - final String TAG1 = DownloadFileAsync.class.getCanonicalName(); + private final String TAG = DownloadFileAsync.class.getCanonicalName(); @Override protected void onPreExecute() @@ -794,7 +788,6 @@ public class SDLActivity extends Activity implements OnKeyListener try { - // // Prepare the sdcard folders in order to download the resource file // @@ -815,7 +808,7 @@ public class SDLActivity extends Activity implements OnKeyListener conexion.connect(); int lengthOfFile = conexion.getContentLength(); - // Log.d("Wagic - " + TAG1, " Length of file: " + lengthOfFile); + // Log.d(TAG, " Length of file: " + lengthOfFile); input = new BufferedInputStream(url.openStream()); // create a File object for the output file @@ -838,8 +831,8 @@ public class SDLActivity extends Activity implements OnKeyListener { String errorMessage = "An error happened while downloading the resources. It could be that our server is temporarily down, that your device is not connected to a network, or that we cannot write to " + mSingleton.getSystemStorageLocation() + ". Please check your phone settings and try again. For more help please go to http://wagic.net"; mSingleton.downloadError(errorMessage); - Log.e(TAG1, errorMessage); - Log.e(TAG1, e.getMessage()); + Log.e(TAG, errorMessage); + Log.e(TAG, e.getMessage()); } return Long.valueOf(totalBytes); @@ -849,7 +842,7 @@ public class SDLActivity extends Activity implements OnKeyListener { if (progress[0] != mProgressDialog.getProgress()) { - // Log.d("Wagic - " + TAG1, "current progress : " + progress[0]); + // Log.d(TAG, "current progress : " + progress[0]); mProgressDialog.setProgress(progress[0]); } } @@ -922,6 +915,7 @@ public class SDLActivity extends Activity implements OnKeyListener */ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnKeyListener, View.OnTouchListener, SensorEventListener { + private static final String TAG = SDLSurface.class.getCanonicalName(); // This is what SDL runs in. It invokes SDL_main(), eventually private Thread mSDLThread; @@ -961,7 +955,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK SDLActivity.nativeQuit(); - Log.v("SDL", "SDL thread terminated"); + Log.d(TAG, "SDL thread terminated"); // On exit, tear everything down for a fresh restart next time. System.exit(0); @@ -988,7 +982,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK // Called when we have a valid drawing surface public void surfaceCreated(SurfaceHolder holder) { - Log.v("SDL", "surfaceCreated()"); + //Log.d(TAG, "surfaceCreated()"); enableSensor(Sensor.TYPE_ACCELEROMETER, true); } @@ -1008,18 +1002,18 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK mSDLThread.join(); } catch (Exception e) { - Log.v("SDL", "Problem stopping thread: " + e); + Log.e(TAG, "Problem stopping thread: " + e); } mSDLThread = null; - // Log.v("SDL", "Finished waiting for SDL thread"); + // Log.d(TAG, "Finished waiting for SDL thread"); } } // Called when we lose the surface public void surfaceDestroyed(SurfaceHolder holder) { - Log.v("SDL", "surfaceDestroyed()"); + Log.d(TAG, "surfaceDestroyed()"); synchronized (mSemSurface) { mSurfaceValid = false; @@ -1031,51 +1025,51 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK // Called when the surface is resized public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { - Log.d("SDL", "surfaceChanged()"); + Log.d(TAG, "surfaceChanged()"); int sdlFormat = 0x85151002; // SDL_PIXELFORMAT_RGB565 by default switch (format) { case PixelFormat.A_8: - Log.d("SDL", "pixel format A_8"); + Log.d("TAG", "pixel format A_8"); break; case PixelFormat.LA_88: - Log.d("SDL", "pixel format LA_88"); + Log.d("TAG", "pixel format LA_88"); break; case PixelFormat.L_8: - Log.d("SDL", "pixel format L_8"); + Log.d("TAG", "pixel format L_8"); break; case PixelFormat.RGBA_4444: - Log.d("SDL", "pixel format RGBA_4444"); + Log.d("TAG", "pixel format RGBA_4444"); sdlFormat = 0x85421002; // SDL_PIXELFORMAT_RGBA4444 break; case PixelFormat.RGBA_5551: - Log.d("SDL", "pixel format RGBA_5551"); + Log.d(TAG, "pixel format RGBA_5551"); sdlFormat = 0x85441002; // SDL_PIXELFORMAT_RGBA5551 break; case PixelFormat.RGBA_8888: - Log.d("SDL", "pixel format RGBA_8888"); + Log.d(TAG, "pixel format RGBA_8888"); sdlFormat = 0x86462004; // SDL_PIXELFORMAT_RGBA8888 break; case PixelFormat.RGBX_8888: - Log.d("SDL", "pixel format RGBX_8888"); + Log.d(TAG, "pixel format RGBX_8888"); sdlFormat = 0x86262004; // SDL_PIXELFORMAT_RGBX8888 break; case PixelFormat.RGB_332: - Log.d("SDL", "pixel format RGB_332"); + Log.d(TAG, "pixel format RGB_332"); sdlFormat = 0x84110801; // SDL_PIXELFORMAT_RGB332 break; case PixelFormat.RGB_565: - Log.d("SDL", "pixel format RGB_565"); + Log.d(TAG, "pixel format RGB_565"); sdlFormat = 0x85151002; // SDL_PIXELFORMAT_RGB565 break; case PixelFormat.RGB_888: - Log.d("SDL", "pixel format RGB_888"); + Log.d(TAG, "pixel format RGB_888"); // Not sure this is right, maybe SDL_PIXELFORMAT_RGB24 instead? sdlFormat = 0x86161804; // SDL_PIXELFORMAT_RGB888 break; default: - Log.d("SDL", "pixel format unknown " + format); + Log.d(TAG, "pixel format unknown " + format); break; } SDLActivity.onNativeResize(width, height, sdlFormat); @@ -1092,11 +1086,10 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK // EGL functions public boolean initEGL(int majorVersion, int minorVersion) { - Log.d("SDL", "Starting up OpenGL ES " + majorVersion + "." + minorVersion); + Log.d(TAG, "Starting up OpenGL ES " + majorVersion + "." + minorVersion); try { - EGL10 egl = (EGL10) EGLContext.getEGL(); EGLDisplay dpy = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY); @@ -1122,7 +1115,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK int[] num_config = new int[1]; if (!egl.eglChooseConfig(dpy, configSpec, configs, 1, num_config) || num_config[0] == 0) { - Log.e("SDL", "No EGL config available"); + Log.e(TAG, "No EGL config available"); return false; } mEGLConfig = configs[0]; @@ -1130,7 +1123,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK EGLContext ctx = egl.eglCreateContext(dpy, mEGLConfig, EGL10.EGL_NO_CONTEXT, null); if (ctx == EGL10.EGL_NO_CONTEXT) { - Log.e("SDL", "Couldn't create context"); + Log.e(TAG, "Couldn't create context"); return false; } @@ -1144,10 +1137,10 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK } catch (Exception e) { - Log.e("SDL", e + ""); + Log.e(TAG, e + ""); for (StackTraceElement s : e.getStackTrace()) { - Log.e("SDL", s.toString()); + Log.e(TAG, s.toString()); } } @@ -1162,7 +1155,6 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK EGL10 egl = (EGL10) EGLContext.getEGL(); if (mEGLSurface != null) { - /* * Unbind and destroy the old EGL surface, if there is one. */ @@ -1176,7 +1168,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK mEGLSurface = egl.eglCreateWindowSurface(mEGLDisplay, mEGLConfig, holder, null); if (mEGLSurface == EGL10.EGL_NO_SURFACE) { - Log.e("SDL", "Couldn't create surface"); + Log.e(TAG, "Couldn't create surface"); return false; } @@ -1185,7 +1177,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK */ if (!egl.eglMakeCurrent(mEGLDisplay, mEGLSurface, mEGLSurface, mEGLContext)) { - Log.e("SDL", "Couldn't make context current"); + Log.e(TAG, "Couldn't make context current"); return false; } @@ -1197,7 +1189,6 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK // EGL buffer flip public void flipEGL() { - if (!mSurfaceValid) { createSurface(this.getHolder()); @@ -1207,7 +1198,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK { EGL10 egl = (EGL10) EGLContext.getEGL(); - egl.eglWaitNative(EGL10.EGL_NATIVE_RENDERABLE, null); + egl.eglWaitNative(EGL10.EGL_CORE_NATIVE_ENGINE, null); // drawing here @@ -1217,13 +1208,12 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK } catch (Exception e) { - Log.e("SDL", "flipEGL(): " + e); + Log.e(TAG, "flipEGL(): " + e); for (StackTraceElement s : e.getStackTrace()) { - Log.e("SDL", s.toString()); + Log.e(TAG, s.toString()); } } - } // Key events @@ -1234,14 +1224,15 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK if (keyCode == KeyEvent.KEYCODE_VOLUME_UP || keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) return false; + if (event.getAction() == KeyEvent.ACTION_DOWN) { - // Log.d("SDL", "key down: " + keyCode); + // Log.d(TAG, "key down: " + keyCode); SDLActivity.onNativeKeyDown(keyCode); return true; } else if (event.getAction() == KeyEvent.ACTION_UP) { - // Log.d("SDL", "key up: " + keyCode); + // Log.d(TAG, "key up: " + keyCode); SDLActivity.onNativeKeyUp(keyCode); return true; } @@ -1252,7 +1243,6 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK // Touch events public boolean onTouch(View v, MotionEvent event) { - for (int index = 0; index < event.getPointerCount(); ++index) { int action = event.getActionMasked(); diff --git a/projects/mtg/bin/Res/ai/baka/deck110.txt b/projects/mtg/bin/Res/ai/baka/deck110.txt index 2d36404dd..fee23320a 100644 --- a/projects/mtg/bin/Res/ai/baka/deck110.txt +++ b/projects/mtg/bin/Res/ai/baka/deck110.txt @@ -1,7 +1,7 @@ #NAME:Etched Affinity #DESC:Modern URB Aggro #HINT:dontattackwith(creature[power<=0]) -#HINT:combo hold(Glimmervoid|myhand)^until(artifact|mybattlefield)^cast(Glimmervoid|myhand)^totalmananeeded({0}) +#HINT:combo hold(Glimmervoid|myhand)^cast(Glimmervoid|myhand)^restriction{type(land[fresh]|mybattlefield)~lessthan~1,type(artifact|mybattlefield)~morethan~0}^totalmananeeded({0}) #HINT:combo hold(Galvanic Blast|myhand)^cast(Galvanic Blast|myhand)^restriction{type(artifact|mybattlefield)~morethan~2,turn:3}^totalmananeeded({R}) #25 creatures diff --git a/projects/mtg/bin/Res/sets/ALL/_cards.dat b/projects/mtg/bin/Res/sets/ALL/_cards.dat index 249099b70..b887edcbc 100644 --- a/projects/mtg/bin/Res/sets/ALL/_cards.dat +++ b/projects/mtg/bin/Res/sets/ALL/_cards.dat @@ -786,11 +786,6 @@ id=3118 rarity=U [/card] [card] -primitive=Splinter Token -id=-3148 -rarity=T -[/card] -[card] primitive=Splintering Wind id=3148 rarity=R diff --git a/projects/mtg/bin/Res/sets/BFZ/_cards.dat b/projects/mtg/bin/Res/sets/BFZ/_cards.dat index 4dca3bfb5..625afae02 100644 --- a/projects/mtg/bin/Res/sets/BFZ/_cards.dat +++ b/projects/mtg/bin/Res/sets/BFZ/_cards.dat @@ -291,11 +291,6 @@ id=401859 rarity=C [/card] [card] -primitive=Dragon -id=-401860 -rarity=T -[/card] -[card] primitive=Dragonmaster Outcast id=401860 rarity=M @@ -331,106 +326,11 @@ id=401866 rarity=C [/card] [card] -primitive=Elemental -rarity=T -id=-401806 -[/card] -[card] -primitive=Elemental -rarity=T -id=-401973 -[/card] -[card] -primitive=Eldrazi -rarity=T -id=-401857 -[/card] -[card] primitive=Eldrazi Devastator id=401867 rarity=C [/card] [card] -primitive=Eldrazi Scion -rarity=T -id=-401803 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401819 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401825 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401832 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401833 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401836 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401838 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401839 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401893 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-402092 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401900 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401863 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401868 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401875 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401915 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-402046 -[/card] -[card] primitive=Eldrazi Skyspawner id=401868 rarity=C @@ -756,21 +656,11 @@ id=401932 rarity=C [/card] [card] -primitive=Knight Ally -rarity=T -id=-401897 -[/card] -[card] primitive=Kor Ally rarity=T id=-402007 [/card] [card] -primitive=Kor Ally -rarity=T -id=-402084 -[/card] -[card] primitive=Kor Bladewhirl id=401933 rarity=U @@ -971,11 +861,6 @@ id=401972 rarity=M [/card] [card] -primitive=Octopus -rarity=T -id=-401931 -[/card] -[card] primitive=Omnath, Locus of Rage id=401973 rarity=M @@ -1091,11 +976,6 @@ id=401995 rarity=R [/card] [card] -primitive=Plant -rarity=T -id=-401904 -[/card] -[card] primitive=Plated Crusher id=401996 rarity=U diff --git a/projects/mtg/bin/Res/sets/EMN/_cards.dat b/projects/mtg/bin/Res/sets/EMN/_cards.dat index c6efbb6c5..4f5fcee85 100644 --- a/projects/mtg/bin/Res/sets/EMN/_cards.dat +++ b/projects/mtg/bin/Res/sets/EMN/_cards.dat @@ -1120,52 +1120,7 @@ id=414301 rarity=C [/card] [card] -primitive=Zombie -id=414513 -rarity=T -[/card] -[card] primitive=Eldrazi Horror id=414514 rarity=T [/card] -[card] -primitive=Human -id=414515 -rarity=T -[/card] -[card] -primitive=Human -id=414516 -rarity=T -[/card] -[card] -primitive=Spirit -id=414517 -rarity=T -[/card] -[card] -primitive=Spider -id=414518 -rarity=T -[/card] -[card] -primitive=Insect -id=414519 -rarity=T -[/card] -[card] -primitive=Devil -id=414520 -rarity=T -[/card] -[card] -primitive=Human Soldier -id=414521 -rarity=T -[/card] -[card] -primitive=Wolf -id=414522 -rarity=T -[/card] diff --git a/projects/mtg/bin/Res/sets/FRF/_cards.dat b/projects/mtg/bin/Res/sets/FRF/_cards.dat index bd46c03d1..c1fbe503e 100644 --- a/projects/mtg/bin/Res/sets/FRF/_cards.dat +++ b/projects/mtg/bin/Res/sets/FRF/_cards.dat @@ -521,11 +521,6 @@ id=391883 rarity=M [/card] [card] -primitive=Monk Token -id=-391883 -rarity=T -[/card] -[card] primitive=Monastery Siege id=391884 rarity=R diff --git a/projects/mtg/bin/Res/sets/ISD/_cards.dat b/projects/mtg/bin/Res/sets/ISD/_cards.dat index 202981d90..71eddf33d 100644 --- a/projects/mtg/bin/Res/sets/ISD/_cards.dat +++ b/projects/mtg/bin/Res/sets/ISD/_cards.dat @@ -1425,8 +1425,3 @@ primitive=Wreath of Geists id=237017 rarity=U [/card] -[card] -primitive=Zombie Token -id=-229968 -rarity=T -[/card] diff --git a/projects/mtg/bin/Res/sets/M14/_cards.dat b/projects/mtg/bin/Res/sets/M14/_cards.dat index ee9dcd082..fdd245029 100644 --- a/projects/mtg/bin/Res/sets/M14/_cards.dat +++ b/projects/mtg/bin/Res/sets/M14/_cards.dat @@ -625,11 +625,6 @@ id=370740 rarity=R [/card] [card] -primitive=Liliana's Reaver Zombie -id=-370740 -rarity=T -[/card] -[card] primitive=Liturgy of Blood id=370652 rarity=C @@ -1250,11 +1245,6 @@ id=370619 rarity=R [/card] [card] -primitive=Xathrid Necromancer Zombie -id=-370619 -rarity=T -[/card] -[card] primitive=Young Pyromancer id=370600 rarity=U diff --git a/projects/mtg/bin/Res/sets/M15/_cards.dat b/projects/mtg/bin/Res/sets/M15/_cards.dat index 36e2f0008..7b9294382 100644 --- a/projects/mtg/bin/Res/sets/M15/_cards.dat +++ b/projects/mtg/bin/Res/sets/M15/_cards.dat @@ -805,11 +805,6 @@ id=383323 rarity=R [/card] [card] -primitive=Zombie Token -id=-383323 -rarity=T -[/card] -[card] primitive=Negate id=383324 rarity=C diff --git a/projects/mtg/bin/Res/sets/OGW/_cards.dat b/projects/mtg/bin/Res/sets/OGW/_cards.dat index aa6c94fe7..3290965bf 100644 --- a/projects/mtg/bin/Res/sets/OGW/_cards.dat +++ b/projects/mtg/bin/Res/sets/OGW/_cards.dat @@ -31,11 +31,6 @@ id=407560 rarity=C [/card] [card] -primitive=Angel -id=-407535 -rarity=T -[/card] -[card] primitive=Ayli, Eternal Pilgrim id=407661 rarity=R @@ -226,46 +221,6 @@ id=407606 rarity=R [/card] [card] -primitive=Eldrazi Scion -id=-407522 -rarity=T -[/card] -[card] -primitive=Eldrazi Scion -id=-407587 -rarity=T -[/card] -[card] -primitive=Eldrazi Scion -id=-407635 -rarity=T -[/card] -[card] -primitive=Eldrazi Scion -id=-407550 -rarity=T -[/card] -[card] -primitive=Eldrazi Scion -id=-407633 -rarity=T -[/card] -[card] -primitive=Eldrazi Scion -id=-407631 -rarity=T -[/card] -[card] -primitive=Elemental -id=-407614 -rarity=T -[/card] -[card] -primitive=Elemental -id=-407653 -rarity=T -[/card] -[card] primitive=Elemental Uprising id=407640 rarity=C @@ -436,21 +391,6 @@ id=407622 rarity=U [/card] [card] -primitive=Knight Ally -id=-407525 -rarity=T -[/card] -[card] -primitive=Kor Ally -id=-407540 -rarity=T -[/card] -[card] -primitive=Kor Ally -id=-407672 -rarity=T -[/card] -[card] primitive=Kor Scythemaster id=407533 rarity=C @@ -616,11 +556,6 @@ id=407585 rarity=C [/card] [card] -primitive=Octopus -id=-407563 -rarity=T -[/card] -[card] primitive=Ondu War Cleric id=407541 rarity=C @@ -631,11 +566,6 @@ id=407571 rarity=R [/card] [card] -primitive=Plant -id=-407648 -rarity=T -[/card] -[card] primitive=Press into Service id=407624 rarity=U @@ -1001,21 +931,6 @@ id=407657 rarity=R [/card] [card] -primitive=Zombie -id=-407594 -rarity=T -[/card] -[card] -primitive=Zombie -id=-407596 -rarity=T -[/card] -[card] -primitive=Zombie -id=-407598 -rarity=T -[/card] -[card] primitive=Zulaport Chainmage id=407603 rarity=C diff --git a/projects/mtg/bin/Res/sets/ROE/_cards.dat b/projects/mtg/bin/Res/sets/ROE/_cards.dat index 5d5438e0d..8d3b1d096 100644 --- a/projects/mtg/bin/Res/sets/ROE/_cards.dat +++ b/projects/mtg/bin/Res/sets/ROE/_cards.dat @@ -56,11 +56,6 @@ id=193507 rarity=R [/card] [card] -primitive=Eldrazi Spawn -rarity=T -id=-193507 -[/card] -[card] primitive=Bala Ged Scorpion id=194944 rarity=C diff --git a/projects/mtg/bin/Res/sets/SOI/_cards.dat b/projects/mtg/bin/Res/sets/SOI/_cards.dat index ccbca8b56..0a12fa8f1 100644 --- a/projects/mtg/bin/Res/sets/SOI/_cards.dat +++ b/projects/mtg/bin/Res/sets/SOI/_cards.dat @@ -41,16 +41,6 @@ id=409952 rarity=T [/card] [card] -primitive=Angel -id=-409751 -rarity=T -[/card] -[card] -primitive=Angel -id=-410011 -rarity=T -[/card] -[card] primitive=Angel of Deliverance id=409738 rarity=R @@ -221,131 +211,6 @@ id=409955 rarity=C [/card] [card] -primitive=Clue -rarity=T -id=-409746 -[/card] -[card] -primitive=Clue -rarity=T -id=-409750 -[/card] -[card] -primitive=Clue -rarity=T -id=-409757 -[/card] -[card] -primitive=Clue -rarity=T -id=-409762 -[/card] -[card] -primitive=Clue -rarity=T -id=-409781 -[/card] -[card] -primitive=Clue -rarity=T -id=-409784 -[/card] -[card] -primitive=Clue -rarity=T -id=-409795 -[/card] -[card] -primitive=Clue -rarity=T -id=-409797 -[/card] -[card] -primitive=Clue -rarity=T -id=-409799 -[/card] -[card] -primitive=Clue -rarity=T -id=-409805 -[/card] -[card] -primitive=Clue -rarity=T -id=-409810 -[/card] -[card] -primitive=Clue -rarity=T -id=-409813 -[/card] -[card] -primitive=Clue -rarity=T -id=-409820 -[/card] -[card] -primitive=Clue -rarity=T -id=-409823 -[/card] -[card] -primitive=Clue -rarity=T -id=-409838 -[/card] -[card] -primitive=Clue -rarity=T -id=-409953 -[/card] -[card] -primitive=Clue -rarity=T -id=-409954 -[/card] -[card] -primitive=Clue -rarity=T -id=-409956 -[/card] -[card] -primitive=Clue -rarity=T -id=-409986 -[/card] -[card] -primitive=Clue -rarity=T -id=-409997 -[/card] -[card] -primitive=Clue -rarity=T -id=-410000 -[/card] -[card] -primitive=Clue -rarity=T -id=-410004 -[/card] -[card] -primitive=Clue -rarity=T -id=-410007 -[/card] -[card] -primitive=Clue -rarity=T -id=-410024 -[/card] -[card] -primitive=Clue -rarity=T -id=-410032 -[/card] -[card] primitive=Compelling Deterrence id=409794 rarity=U @@ -441,21 +306,6 @@ id=409751 rarity=M [/card] [card] -primitive=Devil -rarity=T -id=-410068 -[/card] -[card] -primitive=Devil -rarity=T -id=-409902 -[/card] -[card] -primitive=Devil -rarity=T -id=-409903 -[/card] -[card] primitive=Devils' Playground id=409903 rarity=R @@ -826,26 +676,6 @@ id=409919 rarity=C [/card] [card] -primitive=Human Cleric -id=-409760 -rarity=T -[/card] -[card] -primitive=Human Cleric -id=-410049 -rarity=T -[/card] -[card] -primitive=Human Soldier -id=-409780 -rarity=T -[/card] -[card] -primitive=Human Soldier -id=-410015 -rarity=T -[/card] -[card] primitive=Humble the Brute id=409762 rarity=U @@ -886,11 +716,6 @@ id=409763 rarity=C [/card] [card] -primitive=Insect -id=-409957 -rarity=T -[/card] -[card] primitive=Insidious Mist id=409856 rarity=T @@ -1191,11 +1016,6 @@ id=409820 rarity=U [/card] [card] -primitive=Ooze -id=-409973 -rarity=T -[/card] -[card] primitive=Open the Armory id=409771 rarity=U @@ -1496,41 +1316,6 @@ id=409778 rarity=U [/card] [card] -primitive=Spirit -id=-409749 -rarity=T -[/card] -[card] -primitive=Spirit -id=-410031 -rarity=T -[/card] -[card] -primitive=Spirit -rarity=T -id=-409753 -[/card] -[card] -primitive=Spirit -rarity=T -id=-409768 -[/card] -[card] -primitive=Spirit -rarity=T -id=-409769 -[/card] -[card] -primitive=Spirit -rarity=T -id=-409789 -[/card] -[card] -primitive=Spirit -rarity=T -id=-409755 -[/card] -[card] primitive=Spiteful Motives id=409939 rarity=U @@ -1761,16 +1546,6 @@ id=409788 rarity=C [/card] [card] -primitive=Vampire Knight -id=-409850 -rarity=T -[/card] -[card] -primitive=Vampire Knight -id=-410016 -rarity=T -[/card] -[card] primitive=Vampire Noble id=409893 rarity=C @@ -1871,21 +1646,6 @@ id=410037 rarity=U [/card] [card] -primitive=Wolf -id=-409959 -rarity=T -[/card] -[card] -primitive=Wolf -id=-409983 -rarity=T -[/card] -[card] -primitive=Wolf -id=-409991 -rarity=T -[/card] -[card] primitive=Wolf of Devil's Breach id=409949 rarity=M @@ -1895,38 +1655,3 @@ primitive=Woodland Stream id=410051 rarity=U [/card] -[card] -primitive=Zombie -id=-409800 -rarity=T -[/card] -[card] -primitive=Zombie -id=-409826 -rarity=T -[/card] -[card] -primitive=Zombie -id=-409854 -rarity=T -[/card] -[card] -primitive=Zombie -id=-409859 -rarity=T -[/card] -[card] -primitive=Zombie -id=-409860 -rarity=T -[/card] -[card] -primitive=Zombie -id=-409862 -rarity=T -[/card] -[card] -primitive=Zombie -id=-409884 -rarity=T -[/card] diff --git a/projects/mtg/bin/Res/sets/ZVE/_cards.dat b/projects/mtg/bin/Res/sets/ZVE/_cards.dat index d3b802a93..fd7e9f8d4 100644 --- a/projects/mtg/bin/Res/sets/ZVE/_cards.dat +++ b/projects/mtg/bin/Res/sets/ZVE/_cards.dat @@ -76,21 +76,6 @@ id=401693 rarity=C [/card] [card] -primitive=Eldrazi Spawn -id=401718 -rarity=C -[/card] -[card] -primitive=Eldrazi Spawn -id=401719 -rarity=C -[/card] -[card] -primitive=Eldrazi Spawn -id=401720 -rarity=C -[/card] -[card] primitive=Eldrazi Temple id=401710 rarity=U diff --git a/projects/mtg/bin/Res/sets/primitives/borderline.txt b/projects/mtg/bin/Res/sets/primitives/borderline.txt index ca0beaf07..a6adce1f8 100644 --- a/projects/mtg/bin/Res/sets/primitives/borderline.txt +++ b/projects/mtg/bin/Res/sets/primitives/borderline.txt @@ -96,6 +96,19 @@ auto=counter(1/1,X) auto={3}:counter(1/1) #Not all player can use ability [/card] +#need doubler damage ability... +[card] +name=Goldnight Castigator +abilities=flying,haste +auto=@damaged(controller):damage:thatmuch controller +auto=@damaged(this):damage:thatmuch all(this) +text=Flying, haste -- If a source would deal damage to you, it deals double that damage to you instead. -- If a source would deal damage to Goldnight Castigator, it deals double that damage to Goldnight Castigator instead. +mana={2}{R}{R} +type=Creature +subtype=Angel +power=4 +toughness=9 +[/card] [card] name=Govern the Guildless target=creature[-multicolor] @@ -235,6 +248,18 @@ type=Sorcery text=Draw cards equal to the number of cards in target opponent's hand. Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) [/card] [card] +name=Relentless Dead +auto=@movedTo(this|graveyard) from(battlefield):transforms((,newability[{B}:moveto(myhand)])) ueot +auto=@movedTo(this|graveyard) from(battlefield):transforms((,newability[{X}:moveto(myhand) target(zombie[manacost=X]|mygraveyard)])) ueot +text=Menace (This creature can't be blocked except by two or more creatures.) -- When Relentless Dead dies, you may pay {B}. If you do, return it to its owner's hand. -- When Relentless Dead dies, you may pay {X}. If you do, return another target Zombie creature card with converted mana cost X from your graveyard to the battlefield. +mana={B}{B} +abilities=menace +type=Creature +subtype=Zombie +power=2 +toughness=2 +[/card] +[card] name=Sacellum Godspeaker auto={T}:foreach(creaure[power>4]|myhand) add{G} text={T}: Reveal any number of creature cards with power 5 or greater from your hand. Add {G} to your mana pool for each card revealed this way. diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 20114f48e..d874aff17 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -234,7 +234,7 @@ name=Abstruse Interference abilities=devoid target=*|stack auto=transforms((,newability[pay[[{1}]] name(pay 1 mana) donothing?fizzle])) forever -auto=token(Eldrazi Scion) controller +auto=token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! controller text=Devoid (This card has no color.) -- Counter target spell unless its controller pays {1}. You put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {C} to your mana pool." ({C} represents colorless mana.) mana={2}{U} type=Instant @@ -566,17 +566,6 @@ power=3 toughness=2 [/card] [card] -name=Accursed Witch -auto=@targeted(this) from(opponentstack):add{1} opponent -auto=@movedTo(this|graveyard) from(battlefield):flip(Infectious Curse) && moveto(mybattlefield) -text=Spells your opponents cast that target Accursed Witch cost {1} less to cast. -- When Accursed Witch dies, return it to the battlefield transformed under your control attached to target opponent. -mana={3}{B} -type=Creature -subtype=Human Shaman -power=4 -toughness=2 -[/card] -[card] name=Acid Rain auto=destroy all(forest) text=Destroy all Forests. @@ -866,7 +855,7 @@ name=Adverse Conditions target=creature|battlefield auto=tap auto=frozen -auto=token(Eldrazi Scion) controller +auto=token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! controller text=Devoid (This card has no color.) -- Tap up to two target creatures. Those creatures don't untap during their controller's next untap step. Put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." mana={3}{U} abilities=devoid @@ -1325,7 +1314,7 @@ toughness=4 name=Agent of Erebos auto=choice target(player) moveTo(exile) all(*|targetedpersonsgraveyard) auto=@movedto(enchantment|mybattlefield):choice target(player) moveTo(exile) all(*|targetedpersonsgraveyard) -text=Constellation ? Whenever Agent of Erebos or another enchantment enters the battlefield under your control, exile all cards from target player's graveyard. +text=Constellation — Whenever Agent of Erebos or another enchantment enters the battlefield under your control, exile all cards from target player's graveyard. mana={3}{B} type=Enchantment Creature subtype=Zombie @@ -1784,7 +1773,7 @@ toughness=5 [card] name=Akoum Firebird abilities=flying,haste,mustattack -text=Flying, haste -- Akoum Firebird attacks each turn if able. -- Landfall ? Whenever a land enters the battlefield under your control, you may pay {4}{R}{R}. If you do, return Akoum Firebird from your graveyard to the battlefield. +text=Flying, haste -- Akoum Firebird attacks each turn if able. -- Landfall — Whenever a land enters the battlefield under your control, you may pay {4}{R}{R}. If you do, return Akoum Firebird from your graveyard to the battlefield. autograveyard=@movedto(land|mybattlefield):Pay({4}{R}{R}) name(recover Firebird) moveto(mybattlefield) mana={2}{R}{R} type=Creature @@ -1795,7 +1784,7 @@ toughness=3 [card] name=Akoum Flameseeker auto={T(ally|myBattlefield)}{t}:may name(discard and draw) reject notatarget(*|myhand) && transforms((,newability[draw:1 controller])) forever -text=Cohort ? {T}, Tap an untapped Ally you control: Discard a card. If you do, draw a card. +text=Cohort — {T}, Tap an untapped Ally you control: Discard a card. If you do, draw a card. mana={2}{R} type=Creature subtype=Human Shaman Ally @@ -1807,7 +1796,7 @@ name=Akoum Hellkite abilities=flying auto=@movedTo(land[-mountain]|myBattlefield):damage:1 target(creature,player) auto=@movedTo(land[mountain]|myBattlefield):damage:2 target(creature,player) -text=Flying -- Landfall ? Whenever a land enters the battlefield under your control, Akoum Hellkite deals 1 damage to target creature or player. If that land is a Mountain, Akoum Hellkite deals 2 damage to that creature or player instead. +text=Flying -- Landfall — Whenever a land enters the battlefield under your control, Akoum Hellkite deals 1 damage to target creature or player. If that land is a Mountain, Akoum Hellkite deals 2 damage to that creature or player instead. mana={4}{R}{R} type=Creature subtype=Dragon @@ -1826,7 +1815,7 @@ type=Land [card] name=Akoum Stonewaker auto=@movedTo(land|myBattlefield):pay({2}{R}) token(Elemental,Creature Elemental,3/1,trample,haste,unearth,red) controller -text=Landfall ? Whenever a land enters the battlefield under your control, you may pay {2}{R}. If you do, put a 3/1 red Elemental creature token with trample and haste onto the battlefield. Exile that token at the beginning of the next end step. +text=Landfall — Whenever a land enters the battlefield under your control, you may pay {2}{R}. If you do, put a 3/1 red Elemental creature token with trample and haste onto the battlefield. Exile that token at the beginning of the next end step. mana={1}{R} type=Creature subtype=Human Shaman @@ -1846,7 +1835,7 @@ toughness=1 [card] name=Akroan Conscriptor auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):name(gain control of target creature until end of turn) target(other creature|battlefield) moveTo(mybattlefield) and!( transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot )! -text=Heroic ? Whenever you cast a spell that targets Akroan Conscriptor, gain control of another target creature until end of turn. Untap that creature. It gains haste until end of turn. +text=Heroic — Whenever you cast a spell that targets Akroan Conscriptor, gain control of another target creature until end of turn. Untap that creature. It gains haste until end of turn. mana={4}{R} type=Creature subtype=Human Shaman @@ -1856,7 +1845,7 @@ toughness=2 [card] name=Akroan Crusader auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):token(Soldier,Creature Soldier,1/1,red,haste) controller -text=Heroic ? Whenever you cast a spell that targets Akroan Crusader, put a 1/1 red Soldier creature token with haste onto the battlefield. +text=Heroic — Whenever you cast a spell that targets Akroan Crusader, put a 1/1 red Soldier creature token with haste onto the battlefield. mana={R} type=Creature subtype=Human Soldier @@ -1899,7 +1888,7 @@ toughness=1 name=Akroan Line Breaker auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):2/0 ueot auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):intimidate ueot -text=Heroic ? Whenever you cast a spell that targets Akroan Line Breaker, Akroan Line Breaker gets +2/+0 and gains intimidate until end of turn. +text=Heroic — Whenever you cast a spell that targets Akroan Line Breaker, Akroan Line Breaker gets +2/+0 and gains intimidate until end of turn. mana={2}{R} type=Creature subtype=Human Warrior @@ -2523,7 +2512,6 @@ toughness=5 [/card] [card] name=Alpine Grizzly -text= mana={2}{G} type=Creature subtype=Bear @@ -2601,8 +2589,7 @@ type=Instant [card] name=Altered Ego abilities=nofizzle -auto=copy target(creature) -auto=counter(1/1,X) +auto=may copy target(creature) and!( counter(1/1,X) )! text=Altered Ego can't be countered. -- You may have Altered Ego enter the battlefield as a copy of any creature on the battlefield, except it enters with X additional +1/+1 counters on it. mana={X}{2}{G}{U} type=Creature @@ -2613,7 +2600,7 @@ toughness=0 [card] name=Aluren auto=lord(creature[manacost<=3]|hand,exile,graveyard) zerocast -auto=lord(creature[manacost<=3]|hand,exile,graveyard) spellmastery +auto=lord(creature[manacost<=3]|hand,exile,graveyard) asflash text=Any player may play creature cards with converted mana cost 3 or less without paying their mana cost and as though they had flash. mana={2}{G}{G} type=Enchantment @@ -3395,7 +3382,7 @@ type=Artifact [card] name=Angelic Arbiter abilities=flying -auto=@movedTo(*|opponentstack):all(creature|opponentBattlefield) cantattack +auto=@movedTo(*|opponentstack):lord(creature|opponentBattlefield) cantattack auto=@combat(attacking) source(creature|opponentBattlefield):maxCast(*)0 opponent ueot text=Flying -- Each opponent who cast a spell this turn can't attack with creatures. -- Each opponent who attacked with creatures this turn can't cast spells. mana={5}{W}{W} @@ -5165,19 +5152,20 @@ type=Artifact [card] name=Arlinn Kord auto=counter(0/0,3,loyalty) -auto={C(0/0,1,Loyalty)}:target(creature) 2/2 ueot -auto={C(0/0,0,Loyalty)}:token(Wolf,creature Wolf,2/2,green) && flip(Arlinn, Embraced by the Moon) -text=+1: target creature gets +2/+2 vigilance and haste until end of turn -- 0: put a 2/2 green wolf token onto the battlefield, transform Arlinn Kord +auto={C(0/0,1,Loyalty)}:name(+1: add 1 loyalty) donothing restriction{compare(cantargetcre)~lessthan~1} +auto={C(0/0,1,Loyalty)}:name(+1: 2/2 creature) target(creature) 2/2 ueot +auto={C(0/0,0,Loyalty)}:name(0: wolf token) token(Wolf,creature Wolf,2/2,green) && flip(Arlinn, Embraced by the Moon) +text=+1: Until end of turn, up to one target creature gets +2/+2 and gains vigilance and haste. -- 0: Put a 2/2 green Wolf creature token onto the battlefield. Transform Arlinn Kord. mana={2}{R}{G} type=Planeswalker subtype=Arlinn [/card] [card] name=Arlinn, Embraced by the Moon -auto={C(0/0,1,Loyalty)}:all(creature|mybattlefield) 1/1 ueot && all(creature|mybattlefield) trample ueot -auto={C(0/0,-1,Loyalty)}:damage:3 target(creature,player) && all(this) flip(Arlinn, Embraced by the Moon) -auto={C(0/0,-6,Loyalty)}:name(emblem) emblem transforms((,newability[lord(creature|mybattlefield) {T}:target(creature,player) dynamicability],newability[lord(creature|mybattlefield) haste])) forever dontremove -text=+1: creatures you control get +1/+1 and trample until end of turn -- -1: Arlinn, Embraced by the Moon deals 3 damage to target creature or player, flip -- -6: you get an emblem with 'creatures you control have haste and '{T}: this creature deals damage equal to its power to target creature or player' +auto={C(0/0,1,Loyalty)}:name(+1: 1/1 & trample) all(creature|mybattlefield) 1/1 ueot && all(creature|mybattlefield) trample ueot +auto={C(0/0,-1,Loyalty)}:name(-1: damage & transform) damage:3 target(creature,player) && all(this) flip(Arlinn Kord) +auto={C(0/0,-6,Loyalty)}:name(-6: emblem) emblem transforms((,newability[lord(creature|mybattlefield) {T}:target(creature,player) dynamicability],newability[lord(creature|mybattlefield) haste])) forever dontremove +text=+1: Creatures you control get +1/+1 and gain trample until end of turn. -- -1: Arlinn, Embraced by the Moon deals 3 damage to target creature or player. Transform Arlinn, Embraced by the Moon. -- -6: You get an emblem with "Creatures you control have haste and ‘{T}: This creature deals damage equal to its power to target creature or player.'" type=Planeswalker subtype=Arlinn color=red,green @@ -5337,8 +5325,7 @@ toughness=5 [/card] [card] name=Armored Galleon -abilities=cantattack -auto=aslongas(island|opponentBattlefield) -cantattack +auto=aslongas(island|opponentBattlefield) cantattack <1 text=Armored Galleon can't attack unless defending player controls an Island. mana={4}{U} type=Creature @@ -5411,7 +5398,6 @@ toughness=3 [/card] [card] name=Armored Wolf-Rider -text= mana={3}{G}{W} type=Creature subtype=Elf Knight @@ -5477,7 +5463,7 @@ type=Instant [/card] [card] name=Army of the Damned -auto=token(-229968)*13 +auto=token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )!*13 flashback={7}{B}{B}{B} text=Put thirteen 2/2 black Zombie creature tokens onto the battlefield tapped. -- Flashback {7}{B}{B}{B} mana={5}{B}{B}{B} @@ -5644,7 +5630,6 @@ toughness=3 [card] name=Ascended Lawmage abilities=flying,opponentshroud -text= mana={2}{W}{U} type=Creature subtype=Vedalkan Wizard @@ -5835,6 +5820,15 @@ power=4 toughness=4 [/card] [card] +name=Ashmouth Blade +auto={3}:equip +auto=teach(creature) 3/3 +auto=teach(creature) first strike +text=Equipped creature gets +3/+3 and has first strike. -- Equip {3} +type=Artifact +subtype=Equipment +[/card] +[card] name=Ashmouth Hound auto=@combat(blocking,blocked) source(this) from(creature):all(trigger[from]) damage:1 text=Whenever Ashmouth Hound blocks or becomes blocked by a creature, Ashmouth Hound deals 1 damage to that creature. @@ -6134,7 +6128,7 @@ type=Artifact [card] name=Atarka Pummeler auto={3}{r}{r}:all(creature|mybattlefield) menace usot restriction{compare(powertotalinplay)~morethan~7} -text=Formidable ? {3}{R}{R}: Creatures you control gain menace until end of turn. Activate this ability only if creatures you control have total power 8 or greater. (They can't be blocked except by two or more creatures.) +text=Formidable — {3}{R}{R}: Creatures you control gain menace until end of turn. Activate this ability only if creatures you control have total power 8 or greater. (They can't be blocked except by two or more creatures.) mana={4}{R} type=Creature subtype=Ogre Warrior @@ -6146,7 +6140,7 @@ name=Atarka, World Render abilities=flying,trample auto=lord(dragon|mybattlefield) transforms((,newability[@combat(attacking) source(this):double strike ueot])) text=Flying,trample. -- Whenever a Dragon you control attacks, it gains double strike until end of turn. -mana={5}{R}}{G} +mana={5}{R}{G} type=Legendary Creature subtype=Dragon power=6 @@ -7219,7 +7213,7 @@ toughness=1 [/card] [card] name=Awakening Zone -auto=@each my upkeep:Token(-193507) +auto=@each my upkeep:token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )! text=At the beginning of your upkeep, put a 0/1 colorless Eldrazi Spawn creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." mana={2}{G} type=Enchantment @@ -7975,7 +7969,6 @@ type=Instant [/card] [card] name=Bane Alley Blackguard -text= mana={1}{B} type=Creature subtype=Human Rogue @@ -9145,7 +9138,7 @@ toughness=2 [card] name=Bearer of Overwhelming Truths auto=@movedto(*[-creature|mystack):1/1 ueot -auto=@combatdamaged(player) from(this):token(Clue) controller +auto=@combatdamaged(player) from(this):token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) -- Whenever Bearer of Overwhelming Truths deals combat damage to a player, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") type=Creature subtype=Human Wizard @@ -9378,7 +9371,7 @@ type=Enchantment [card] name=Behold the Beyond auto=reject all(*|myhand) -auto=moveto(myhand) target(*|mylibrary) +auto=moveto(myhand) target(<3>*|mylibrary) text=Discard your hand. Search your library for three cards and put those cards into your hand. Then shuffle your library. mana={5}{B}{B} type=Sorcery @@ -9433,7 +9426,7 @@ toughness=2 [card] name=Belligerent Whiptail auto=@movedTo(land|myBattlefield):first strike ueot -text=Landfall ? Whenever a land enters the battlefield under your control, Belligerent Whiptail gains first strike until end of turn. +text=Landfall — Whenever a land enters the battlefield under your control, Belligerent Whiptail gains first strike until end of turn. mana={3}{R} type=Creature subtype=Wurm @@ -9455,7 +9448,7 @@ toughness=3 [card] name=Bellowing Saddlebrute auto=ifnot raid then life:-4 controller -text=Raid ? When Bellowing Saddlebrute enters the battlefield, you lose 4 life unless you attacked with a creature this turn. +text=Raid — When Bellowing Saddlebrute enters the battlefield, you lose 4 life unless you attacked with a creature this turn. mana={3}{B} type=Creature subtype=Orc Warrior @@ -9957,7 +9950,7 @@ toughness=1 [card] name=Birthing Hulk auto={1}{C}:regenerate -auto=token(Eldrazi scion)*2 +auto=token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )!*2 text=Devoid (This card has no color.) -- When Birthing Hulk enters the battlefield, put two 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {C} to your mana pool." ({C} represents colorless mana.) -- {1}{C}: Regenerate Birthing Hulk. mana={6}{G} abilities=devoid @@ -10584,7 +10577,7 @@ type=Sorcery [card] name=Blight Herder kicker={discard(*|opponentexile)}{discard(*|opponentexile)} -auto=kicker token(Eldrazi scion)*3 +auto=kicker token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )!*3 text=When you cast Blight Herder, you may put two cards your opponents own from exile into their owners' graveyards. If you do, put three 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {C} to your mana pool." mana={5} type=Creature @@ -10863,9 +10856,8 @@ type=Instant [/card] [card] name=Blind-Spot Giant -abilities=cantattack,cantblock -auto=aslongas(other giant|myBattlefield) -cantattack -auto=aslongas(other giant|myBattlefield) -cantblock +auto=aslongas(other giant|myBattlefield) cantattack <1 +auto=aslongas(other giant|myBattlefield) cantblock <1 text=Blind-Spot Giant can't attack or block unless you control another Giant. mana={2}{R} type=Creature @@ -10980,7 +10972,7 @@ toughness=1 [/card] [card] name=Blisterpod -auto=@movedTo(this|graveyard) from(battlefield):token(Eldrazi Scion) controller +auto=@movedTo(this|graveyard) from(battlefield):token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! controller text=Devoid (This card has no color.) -- When Blisterpod dies, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." mana={G} abilities=devoid @@ -11384,10 +11376,9 @@ toughness=2 [/card] [card] name=Bloodcrazed Goblin -auto=this(opponentdamagecount >0) -cantattack +auto=this(variable{odnoncount}<1) cantattack text=Bloodcrazed Goblin can't attack unless an opponent was dealt noncombat damage this turn. mana={R} -abilities=cantattack type=Creature subtype=Goblin Berserker power=2 @@ -11397,7 +11388,7 @@ toughness=2 name=Bloodcrazed Hoplite auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):counter(1/1,1) auto=@counteradded(1/1) from(this):counter(1/1,-1) target(creature|opponentbattlefield) -text=Heroic ? Whenever you cast a spell that targets Bloodcrazed Hoplite, put a +1/+1 counter on it. -- Whenever a +1/+1 counter is placed on Bloodcrazed Hoplite, remove a +1/+1 counter from target creature an opponent controls. +text=Heroic — Whenever you cast a spell that targets Bloodcrazed Hoplite, put a +1/+1 counter on it. -- Whenever a +1/+1 counter is placed on Bloodcrazed Hoplite, remove a +1/+1 counter from target creature an opponent controls. mana={1}{B} type=Creature subtype=Human Soldier @@ -11770,7 +11761,7 @@ toughness=3 name=Bloodsoaked Champion abilities=cantblock autograveyard={1}{B}:moveTo(mybattlefield) restriction{raid} -text=Bloodsoaked Champion can't block. -- Raid ? {1}{B}: Return Bloodsoaked Champion from your graveyard to the battlefield. Activate this ability only if you attacked with a creature this turn. +text=Bloodsoaked Champion can't block. -- Raid — {1}{B}: Return Bloodsoaked Champion from your graveyard to the battlefield. Activate this ability only if you attacked with a creature this turn. mana={B} type=Creature subtype=Human Warrior @@ -13088,7 +13079,8 @@ name=Bound by Moonsilver target=creature auto=cantattack auto=cantblock -auto={S(other *|mybattlefield)}:rehook target(creature) assorcery +auto=canttransform +auto={S(other *|mybattlefield)}:rehook target(creature) assorcery limit:1 text=Enchant creature -- Enchanted creature can't attack, block, or transform. -- Sacrifice another permanent: Attach Bound by Moonsilver to target creature. Activate this ability only any time you could cast a sorcery and only once each turn. mana={2}{W} type=Enchantment @@ -13170,7 +13162,7 @@ auto={1}{G}{T}:name(+1/+1 counter) counter(1/1,1) target(creature) auto={1}{G}{T}:name(2 damage to flyer) damage:2 target(creature[flying]) auto={1}{G}{T}:name(gain 3 life) life:3 controller auto={1}{G}{T}:name(put up to 4 on bottom) bottomoflibrary target(*|mygraveyard) -text=Attacking creatures you control have deathtouch. -- {1}{G},{T}: Choose one ? Put a +1/+1 counter on target creature; or Bow of Nylea deals 2 damage to target creature with flying; or you gain 3 life; or put up to four target cards from your graveyard on the bottom of your library in any order. +text=Attacking creatures you control have deathtouch. -- {1}{G},{T}: Choose one — Put a +1/+1 counter on target creature; or Bow of Nylea deals 2 damage to target creature with flying; or you gain 3 life; or put up to four target cards from your graveyard on the bottom of your library in any order. mana={1}{G}{G} type=Legendary Enchantment Artifact [/card] @@ -13836,7 +13828,7 @@ type=Sorcery name=Brilliant Spectrum auto=draw:converge auto=reject notatarget(<2>*|myhand) -text=Converge ? Draw X cards, where X is the number of colors of mana spent to cast Brilliant Spectrum. Then discard two cards. +text=Converge — Draw X cards, where X is the number of colors of mana spent to cast Brilliant Spectrum. Then discard two cards. mana={3}{U} type=Sorcery [/card] @@ -13929,7 +13921,7 @@ type=Instant [card] name=Bring to Light auto=notatarget(*[creature;instant;sorcery;manacost<=converge]|mylibrary) moveto(exile) and!( transforms((,newability[may name(cast for free) activate name(cast for free) castcard(normal)])) oneshot)! -text=Converge ? Search your library for a creature, instant, or sorcery card with converted mana cost less than or equal to the number of colors of mana spent to cast Bring to Light, exile that card, then shuffle your library. You may cast that card without paying its mana cost. +text=Converge — Search your library for a creature, instant, or sorcery card with converted mana cost less than or equal to the number of colors of mana spent to cast Bring to Light, exile that card, then shuffle your library. You may cast that card without paying its mana cost. mana={3}{G}{U} type=Sorcery [/card] @@ -14073,14 +14065,14 @@ toughness=2 [/card] [card] name=Brood Birthing -auto=aslongas(eldrazi spawn|myBattlefield) Token(-193507)*3 +auto=aslongas(eldrazi spawn|myBattlefield) token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*3 text=If you control at least one 0/1 Eldrazi Spawn creature token, put three 0/1 colorless Eldrazi Spawn creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={1}{R} type=Sorcery [/card] [card] name=Brood Butcher -auto=choice token(Eldrazi Scion) controller +auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! controller auto={B}{G}{S(creature|mybattlefield):target(creature) -2/-2 ueot text=Devoid (This card has no color.) -- When Brood Butcher enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." -- {B}{G}, Sacrifice a creature: Target creature gets -2/-2 until end of turn. mana={3}{B}{G} @@ -14113,7 +14105,7 @@ toughness=3 [/card] [card] name=Brood Monitor -auto=choice token(Eldrazi Scion)*3 controller +auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )!*3 controller text=Devoid (This card has no color.) -- When Brood Monitor enters the battlefield, put three 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={4}{G}{G} abilities=devoid @@ -14288,7 +14280,7 @@ toughness=2 [card] name=Brutal Deceiver auto={1}:name(Look) reveal:1 optionone name(Look) target(*|reveal) doNothing optiononeend optiontwo all(*|reveal) moveto(mylibrary) optiontwoend revealend -auto={2}:reveal:1 optionone if type(land|reveal)~morethan~0 then all(this) +1/0 ueot && all(this) firststrike ueot optiononeend optiontwo name(Put Back On Top) target(<1>*|reveal) moveto(mylibrary) optiontwoend revealend limit:1 +auto={2}:reveal:1 optionone if type(land|reveal)~morethan~0 then all(this) +1/0 ueot && all(this) first strike ueot optiononeend optiontwo name(Put Back On Top) target(<1>*|reveal) moveto(mylibrary) optiontwoend revealend limit:1 text={1}: Look at the top card of your library. -- {2}: Reveal the top card of your library. If it's a land card, Brutal Deceiver gets +1/+0 and gains first strike until end of turn. Activate this ability only once each turn. mana={2}{R} type=Creature @@ -14812,7 +14804,7 @@ type=Instant [card] name=Bygone Bishop abilities=flying -auto=@movedto(creature[manacost<=3]|mystack):token(Clue) controller +auto=@movedto(creature[manacost<=3]|mystack):token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=Flying -- Whenever you cast a creature spell with converted mana cost 3 or less, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={2}{W} type=Creature @@ -14822,7 +14814,7 @@ toughness=3 [/card] [card] name=Byway Courier -auto=@movedTo(this|graveyard) from(battlefield):token(Clue) controller +auto=@movedTo(this|graveyard) from(battlefield):token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=When Byway Courier dies, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={2}{G} type=Creature @@ -15196,7 +15188,7 @@ type=Sorcery [/card] [card] name=Call the Scions -auto=token(Eldrazi Scion)*2 controller +auto=token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )!*2 controller text=Devoid (This card has no color.) -- Put two 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={2}{G} abilities=devoid @@ -15918,7 +15910,7 @@ toughness=1 [/card] [card] name=Carrier Thrall -auto=@movedTo(this|graveyard) from(battlefield):token(Eldrazi Scion) controller +auto=@movedTo(this|graveyard) from(battlefield):token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! controller text=When Carrier Thrall dies, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." mana={1}{B} type=Creature @@ -16147,7 +16139,7 @@ toughness=4 [card] name=Catacomb Sifter abilities=devoid -auto=choice token(Eldrazi Scion) controller +auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! controller auto=@movedTo(other creature|graveyard) from(myBattlefield):name(Scry) reveal:1 optionone name(Put On Top) target(*|reveal) moveto(mylibrary) optiononeend optiontwo name(put on bottom) target(<1>*|reveal) bottomoflibrary optiontwoend revealend text=Devoid (This card has no color.) -- When Catacomb Sifter enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {C} to your mana pool." -- Whenever another creature you control dies, scry 1. (Look at the top card of your library. You may put that card on the bottom of your library.) mana={1}{B}{G} @@ -17734,7 +17726,7 @@ toughness=3 name=Chasm Guide auto=choice all(creature|mybattlefield) haste ueot auto=@movedTo(ally|myBattlefield):all(creature|mybattlefield) haste ueot -text=Rally ? Whenever Chasm Guide or another Ally enters the battlefield under your control, creatures you control gain haste until end of turn. +text=Rally — Whenever Chasm Guide or another Ally enters the battlefield under your control, creatures you control gain haste until end of turn. mana={3}{R} type=Creature subtype=Goblin Scout Ally @@ -18055,7 +18047,7 @@ toughness=2 [/card] [card] name=Choked Estuary -auto=aslongas(island,swamp|myhand)~lessthan~1 tap(noevent) +auto=aslongas(island,swamp|myhand) tap(noevent) <1 auto={T}:add{U} auto={T}:add{B} text=As Choked Estuary enters the battlefield, you may reveal an Island or Swamp card from your hand. If you don't, Choked Estuary enters the battlefield tapped. -- {T}: Add {U} or {B} to your mana pool. @@ -18564,7 +18556,7 @@ type=Enchantment name=Citadel Siege auto=choice name(Khans) transforms((,newability[counter(0/0.1.Khans)],newability[@each my combatbegins:counter(1/1.2) target(creature|mybattlefield)])) forever auto=choice name(Dragons) transforms((,newability[counter(0/0.1.Dragons)],newability[@each opponent combatbegins:tap target(creature|opponentbattlefield)])) forever -text=As Citadel Siege enters the battlefield, choose Khans or Dragons. -- ? Khans ? At the beginning of combat on your turn, put two +1/+1 counters on target creature you control. -- ? Dragons ? At the beginning of combat on each opponent's turn, tap target creature that player controls. +text=As Citadel Siege enters the battlefield, choose Khans or Dragons. -- — Khans — At the beginning of combat on your turn, put two +1/+1 counters on target creature you control. -- — Dragons — At the beginning of combat on each opponent's turn, tap target creature that player controls. mana={2}{W}{W} type=Enchantment [/card] @@ -18962,7 +18954,6 @@ type=Instant [/card] [card] name=Clip Wings -auto=sacrifice notatarget(creature[flying]|mybattlefield) auto=ability$! sacrifice notatarget(creature[flying]|mybattlefield) !$ opponent text=Each opponent sacrifices a creature with flying. mana={1}{G} @@ -19517,13 +19508,6 @@ mana={5}{U}{R} type=Enchantment [/card] [card] -name=Clue -auto={2}{s}: draw:1 -text={2}, sacrifice this token, draw a card -type=Artifact -subtype=Clue -[/card] -[card] name=Clutch of Currents target=creature|battlefield auto=moveto(ownerhand) @@ -19875,7 +19859,7 @@ auto=aslongas(island|mybattlefield) lord(creature|opponentbattlefield) transform auto=aslongas(mountain|mybattlefield) lord(creature|opponentbattlefield) transforms((,newability[attackcost:1])) auto=aslongas(swamp|mybattlefield) lord(creature|opponentbattlefield) transforms((,newability[attackcost:1])) auto=aslongas(plains|mybattlefield) lord(creature|opponentbattlefield) transforms((,newability[attackcost:1])) -text=Domain ? Creatures can't attack you unless their controller pays {X} for each creature he or she controls that's attacking you, where X is the number of basic land types among lands you control. +text=Domain — Creatures can't attack you unless their controller pays {X} for each creature he or she controls that's attacking you, where X is the number of basic land types among lands you control. mana={3}{U} type=Enchantment [/card] @@ -20057,6 +20041,15 @@ mana={3}{U} type=Instant [/card] [card] +name=Compelling Deterrence +target=*[-land] +auto=moveto(ownerhand) +auto=if type(zombie|mybattlefield)~morethan~0 then ability$!name(discard) target(*|myhand) reject!$ targetcontroller +text=Return target nonland permanent to its owner's hand. Then that player discards a card if you control a Zombie. +mana={1}{U} +type=Instant +[/card] +[card] name=Complete Disregard target=creature[power<=3]|battlefield auto=moveto(exile) @@ -20255,7 +20248,7 @@ toughness=1 name=Confirm Suspicions target=*|mystack auto=fizzle -auto=token(Clue)*3 controller +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )!*3 controller text=Counter target spell. -- Investigate three times. (To investigate, put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={3}{U}{U} type=Instant @@ -20272,7 +20265,7 @@ subtype=Aura [card] name=Confront the Unknown target=creature -auto=token(Clue) controller +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller auto=foreach(clue|mybattlefield) 1/1 text=Investigate, then target creature gets +1/+1 until end of turn for each Clue you control. (To investigate, put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={G} @@ -20423,15 +20416,6 @@ mana={U} type=Instant [/card] [card] -name=Construct -type=Artifact Creature -subtype=Construct -abilities=trample -auto=@next endofturn:moveTo(exile) -power=6 -toughness=12 -[/card] -[card] name=Consul's Lieutenant abilities=first strike auto=this(cantargetcard(*[-renown]) transforms((,newability[@combatdamaged(player) from(this):counter(1/1) && becomes(renown) forever])) @@ -20501,7 +20485,7 @@ subtype=Aura name=Consuming Sinkhole auto=choice target(creature[land]) moveto(exile) auto=choice damage:4 target(player) -text=Devoid (This card has no color.) -- Choose one ? -- ? Exile target land creature. -- ? Consuming Sinkhole deals 4 damage to target player. +text=Devoid (This card has no color.) -- Choose one — -- — Exile target land creature. -- — Consuming Sinkhole deals 4 damage to target player. mana={3}{R} abilities=devoid type=Instant @@ -21065,7 +21049,7 @@ toughness=3 name=Corpsehatch target=creature[-black] auto=destroy -auto=Token(-193507)*2 +auto=token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*2 text=Destroy target nonblack creature. -- Put two 0/1 colorless Eldrazi Spawn creature tokens onto the battlefield. They have sacrifice this creature: Add {1} to your mana pool. mana={3}{B}{B} type=Sorcery @@ -21678,7 +21662,7 @@ name=Crater's Claws target=creature,player auto=if type(creature[power=>4]|mybattlefield) then damage:2 auto=damage:X -text=Crater's Claws deals X damage to target creature or player. -- Ferocious ? Crater's Claws deals X plus 2 damage to that creature or player instead if you control a creature with power 4 or greater. +text=Crater's Claws deals X damage to target creature or player. -- Ferocious — Crater's Claws deals X plus 2 damage to that creature or player instead if you control a creature with power 4 or greater. mana={R}{X} type=Sorcery [/card] @@ -21735,7 +21719,7 @@ toughness=2 [card] name=Crawling Sensation auto=@each my upkeep:may deplete:2 controller -auto=@movedto(land|mygraveyard) restriction{thisturn(land|mygraveyard)~lessthan~1}:token(Insect,creature Insect,1/1,green) +auto=@movedto(land|mygraveyard) turnlimited:token(Insect,creature Insect,1/1,green) text=At the beginning of your upkeep, you may put the top two cards of your library into your graveyard. -- Whenever one or more land cards are put into your graveyard from anywhere for the first time each turn, put a 1/1 green Insect creature token onto the battlefield. mana={2}{G} type=Enchantment @@ -22181,7 +22165,7 @@ toughness=4 name=Crow of Dark Tidings abilities=flying auto=deplete:2 controller -auto=@movedto(mygraveyard):deplete:2 controller +auto=@movedTo(this|graveyard) from(battlefield):deplete:2 controller text=Flying -- When Crow of Dark Tidings enters the battlefield or dies, put the top two cards of your library into your graveyard. mana={2}{B} type=Creature @@ -23315,7 +23299,6 @@ toughness=3 [/card] [card] name=Cyclops of One-Eyed Pass -text= mana={2}{R}{R} type=Creature subtype=Cyclops @@ -23579,7 +23562,7 @@ type=Instant [/card] [card] name=Dance with Devils -auto=token(-410068)*2 +auto=token(Devil,Creature Devil,1/1,red) and!( transforms((,newability[@movedto(this|mygraveyard): damage:1 target(*[creature;player])])) forever )!*2 text=Put two 1/1 red Devil creature tokens onto the battlefield. They have "When this creature dies, it deals 1 damage to target creature or player." mana={3}{R} type=Instant @@ -23715,6 +23698,16 @@ power=3 toughness=1 [/card] [card] +name=Daring Sleuth +auto=@sacrificed(clue|mybattlefield):flip(Bearer of Overwhelming Truths) +text=When you sacrifice a Clue, transform Daring Sleuth. +mana={1}{U} +type=Creature +subtype=Human Rogue +power=2 +toughness=1 +[/card] +[card] name=Dark Banishing target=creature[-black] auto=bury @@ -23746,7 +23739,7 @@ target=creature auto=regenerate auto=draw:1 controller auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then regenerate all(other creature|mybattlefield) -text=Regenerate target creature. Draw a card. (The next time the creature would be destroyed this turn, it isn't. Instead tap it, remove all damage from it, and remove it from combat.) -- Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, also regenerate each other creature you control. +text=Regenerate target creature. Draw a card. (The next time the creature would be destroyed this turn, it isn't. Instead tap it, remove all damage from it, and remove it from combat.) -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, also regenerate each other creature you control. mana={2}{B} type=Instant [/card] @@ -23823,7 +23816,7 @@ type=Sorcery name=Dark Petition auto=moveto(myhand) notatarget(*|mylibrary) auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then add{B}{B}{B} -text=Search your library for a card and put that card into your hand. Then shuffle your library. -- Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, add {B}{B}{B} to your mana pool. +text=Search your library for a card and put that card into your hand. Then shuffle your library. -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, add {B}{B}{B} to your mana pool. mana={3}{B}{B} type=Sorcery [/card] @@ -24278,7 +24271,6 @@ toughness=3 [/card] [card] name=Dauntless Cathar -abilities=flying autograveyard={1}{W}{e}:token(Spirit,creature Spirit,1/1,white,flying) assorcery text={1}{W}, Exile Dauntless Cathar from your graveyard: Put a 1/1 white Spirit creature token with flying onto the battlefield. Activate this ability only any time you could cast a sorcery. mana={2}{W} @@ -25242,7 +25234,7 @@ toughness=2 [card] name=Deathpact Angel abilities=flying -auto=@movedTo(this|graveyard) from(battlefield):token(Cleric,Creature Cleric,1/1,white,black) && all(Cleric[token]|mybattlefield) transforms((,newability[{3}{W}{B}{B}{T}{S}:moveto(ownerbattlefield) notatarget(Deathpact Angel|mygraveyard)])) forever +auto=@movedTo(this|graveyard) from(battlefield):token(Cleric,Creature Cleric,1/1,white,black) and!( transforms((,newability[{3}{W}{B}{B}{T}{S}:moveto(ownerbattlefield) notatarget(Deathpact Angel|mygraveyard)])) forever )! text=Flying -- When Deathpact Angel dies, put a 1/1 white and black Cleric creature token onto the battlefield. It has "{3}{W}{B}{B}, {T}, Sacrifice this creature: Return a card named Deathpact Angel from your graveyard to the battlefield." mana={3}{W}{B}{B} type=Creature @@ -25409,7 +25401,8 @@ type=Artifact [card] name=Declaration in Stone target=creature -auto=transforms((,newability[all(*[share!name!]) moveto(exile)],newability[moveto(exile)],newability[token(Clue) controller])) +auto=all(*[-token;share!name!]|targetcontrollerbattlefield) moveto(exile) and!( token(Clue,Artifact Clue,0/0) targetcontroller and!( transforms((,newability[{S}{2}:draw:1])) forever )! )! +auto=all(*[token;share!name!]|targetcontrollerbattlefield) moveto(exile) text=Exile target creature and all other creatures its controller controls with the same name as that creature. That player investigates for each nontoken creature exiled this way. mana={1}{W} type=Sorcery @@ -25609,8 +25602,7 @@ toughness=6 [/card] [card] name=Deep-Sea Serpent -abilities=cantattack -auto=aslongas(island|opponentBattlefield) -cantattack +auto=aslongas(island|opponentBattlefield) cantattack <1 text=Deep-Sea Serpent can't attack unless defending player controls an Island. mana={4}{U}{U} type=Creature @@ -26322,7 +26314,7 @@ type=Enchantment [card] name=Deny Existence target=creature|stack -auto=fizzle and exiledeath +auto=fizzleto(exile) text=Counter target creature spell. If that spell is countered this way, exile it instead of putting it into its owner's graveyard. mana={2}{U} type=Instant @@ -26408,7 +26400,7 @@ toughness=4 [card] name=Descend upon the Sinful auto=moveto(exile) all(creature) -auto=token(Angel,creature angel,4/4,white,flying) controller restriction{delirium} +auto=if delirium then token(Angel,creature angel,4/4,white,flying) controller text=Exile all creatures. -- Delirium Put a 4/4 white Angel creature token with flying onto the battlefield if there are four or more card types among cards in your graveyard. mana={4}{W}{W} type=Sorcery @@ -26788,15 +26780,6 @@ type=Enchantment subtype=Aura [/card] [card] -name=Devil -type=Creature -subtype=Devil -auto=@movedto(this|mygraveyard): damage:1 target(creature,player) -text=when this creature dies it deals 1 damage to target creature or player -power=1 -toughness=1 -[/card] -[card] name=Devil's Play target=creature,player auto=damage:X @@ -26807,7 +26790,7 @@ type=Sorcery [/card] [card] name=Devils' Playground -auto=token(-410068)*4 +auto=token(Devil,Creature Devil,1/1,red) and!( transforms((,newability[@movedto(this|mygraveyard): damage:1 target(*[creature;player])])) forever )!*4 text=Put four 1/1 red Devil creature tokens onto the battlefield. They have "When this creature dies, it deals 1 damage to target creature or player." mana={4}{R}{R} type=Sorcery @@ -27328,7 +27311,7 @@ toughness=2 [card] name=Diregraf Colossus auto=foreach(zombie|mygraveyard)counter(1/1,1) -auto=@movedto(zombie|mystack):token(-370619) +auto=@movedto(zombie|mystack):token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )! text=Diregraf Colossus enters the battlefield with a +1/+1 counter on it for each Zombie card in your graveyard. -- Whenever you cast a Zombie spell, put a 2/2 black Zombie creature token onto the battlefield tapped. mana={2}{B} type=Creature @@ -27510,7 +27493,7 @@ auto={1}{E(*[instant;sorcery]|mygraveyard)}:name(counter noncreature unless pay auto={1}{E(*[instant;sorcery]|mygraveyard)}:1/1 ueot auto={1}{E(*[instant;sorcery]|mygraveyard)}:tap target(creature) auto={1}{E(*[instant;sorcery]|mygraveyard)}:untap target(creature) -text={1}, Exile an instant or sorcery card from your graveyard: Choose one ? -- ? Counter target noncreature spell unless its controller pays {2}. -- ? Disciple of the Ring gets +1/+1 until end of turn. -- ? Tap target creature. -- ? Untap target creature. +text={1}, Exile an instant or sorcery card from your graveyard: Choose one — -- — Counter target noncreature spell unless its controller pays {2}. -- — Disciple of the Ring gets +1/+1 until end of turn. -- — Tap target creature. -- — Untap target creature. mana={3}{U}{U} type=Creature subtype=Human Wizard @@ -28184,7 +28167,7 @@ name=Domri Rade auto=counter(0/0,3,loyalty) auto={C(0/0,1,Loyalty)}:name(+1: Reveal) reveal:1 optionone target(creature|reveal)moveto(myhand) optiononeend optiontwo name(Put Back On Top) target(<1>*|reveal) moveto(mylibrary) optiontwoend revealend auto={C(0/0,-2,Loyalty)}:name(-2: Fight) target(creature|mybattlefield) transforms((,newability[target(creature) dynamicability])) ueot -auto={C(0/0,-7,Loyalty)}:name(-7: emblem) emblem transforms((,newability[lord(creature|mybattlefield)doublestrike],newability[lord(creature|mybattlefield)trample],newability[lord(creature|mybattlefield)hexproof],newability[lord(creature|mybattlefield)haste])) forever dontremove +auto={C(0/0,-7,Loyalty)}:name(-7: emblem) emblem transforms((,newability[lord(creature|mybattlefield)double strike],newability[lord(creature|mybattlefield)trample],newability[lord(creature|mybattlefield)hexproof],newability[lord(creature|mybattlefield)haste])) forever dontremove text=+1: Look at the top card of your library. If it's a creature card, you may reveal it and put it into your hand. -- -2: Target creature you control fights another target creature. -- -7: You get an emblem with "Creatures you control have double strike, trample, hexproof, and haste." mana={1}{R}{G} type=Planeswalker @@ -28271,7 +28254,7 @@ toughness=3 name=Doomwake Giant auto=all(creature|opponentbattlefield) -1/-1 auto=@movedTo(enchantment|myBattlefield):all(creature|opponentbattlefield) -1/-1 -text=Constellation ? Whenever Doomwake Giant or another enchantment enters the battlefield under your control, creatures your opponents control get -1/-1 until end of turn. +text=Constellation — Whenever Doomwake Giant or another enchantment enters the battlefield under your control, creatures your opponents control get -1/-1 until end of turn. mana={4}{B} type=Enchantment Creature subtype=Giant @@ -29109,8 +29092,8 @@ toughness=3 [/card] [card] name=Drana's Chosen -auto={T(ally|myBattlefield)}{t}:token(-370619) -text=Cohort ? {T}, Tap an untapped Ally you control: Put a 2/2 black Zombie creature token onto the battlefield tapped. +auto={T(ally|myBattlefield)}{t}:token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )! +text=Cohort — {T}, Tap an untapped Ally you control: Put a 2/2 black Zombie creature token onto the battlefield tapped. mana={3}{B} type=Creature subtype=Vampire Shaman Ally @@ -29168,7 +29151,7 @@ toughness=8 [/card] [card] name=Dread Drone -auto=Token(-193507)*2 +auto=token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*2 text=When Dread Drone enters the battlefield, put two 0/1 colorless Eldrazi Spawn creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={4}{B} type=Creature @@ -29276,7 +29259,7 @@ type=Sorcery name=Dreadbringer Lampads auto=name(intimidate) target(creature) transforms((,newability[intimidate])) ueot auto=@movedTo(enchantment|myBattlefield):name(intimidate) target(creature) transforms((,newability[intimidate])) ueot -text=Constellation ? Whenever Dreadbringer Lampads or another enchantment enters the battlefield under your control, target creature gains intimidate until end of turn. (It can't be blocked except by artifact creatures and/or creatures that share a color with it.) +text=Constellation — Whenever Dreadbringer Lampads or another enchantment enters the battlefield under your control, target creature gains intimidate until end of turn. (It can't be blocked except by artifact creatures and/or creatures that share a color with it.) mana={4}{B} type=Enchantment Creature subtype=Nymph @@ -29475,8 +29458,7 @@ type=Artifact [/card] [card] name=Dreamwinder -abilities=cantattack -auto=aslongas(island|opponentBattlefield) -cantattack +auto=aslongas(island|opponentBattlefield) cantattack <1 auto={U}{S(island|myBattlefield)}:ueot name(land becomes an island) loseabilities && losesubtypesof(land) && transforms((island)) target(land) text=Dreamwinder can't attack unless defending player controls an Island. -- {U}, Sacrifice an Island: Target land becomes an Island until end of turn. mana={3}{U} @@ -29698,7 +29680,7 @@ toughness=4 name=Drogskol Reaver abilities=flying,double strike,lifelink auto=@lifeof(player):draw:1 controller -text=Flying, doublestrike, lifelink -- Whenever you gain life, draw a card. +text=Flying, double strike, lifelink -- Whenever you gain life, draw a card. mana={5}{W}{U} type=Creature subtype=Spirit @@ -30004,7 +29986,7 @@ toughness=1 [/card] [card] name=Drowner of Hope -auto=choice token(Eldrazi Scion) *2 controller +auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! *2 controller auto={S(Eldrazi Scion|mybattlefield)}:tap target(creature) text=Devoid (This card has no color.) -- When Drowner of Hope enters the battlefield, put two 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." -- Sacrifice an Eldrazi Scion: Tap target creature. mana={5}{U} @@ -30026,7 +30008,7 @@ toughness=3 [/card] [card] name=Drownyard Explorers -auto=token(Clue) controller +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=When Drownyard Explorers enters the battlefield, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={3}{U} type=Creature @@ -30036,9 +30018,9 @@ toughness=4 [/card] [card] name=Drownyard Temple -auto={T}:Add{1} +auto={T}:Add{C} autograveyard={3}:moveto(mybattlefield) and!(tap(noevent))! -text={T}: Add {1} to your mana pool. -- {3}: Return Drownyard Temple from your graveyard to the battlefield tapped. +text={T}: Add {C} to your mana pool. -- {3}: Return Drownyard Temple from your graveyard to the battlefield tapped. type=Land [/card] [card] @@ -30499,7 +30481,7 @@ toughness=1 [/card] [card] name=Duskwatch Recruiter -auto={2}{G}:reveal:4 optionone name(Get Creature) target(creature|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<4>*|reveal) bottomoflibrary optiontwoend revealend +auto={2}{G}:reveal:3 optionone name(Get Creature) target(creature|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<3>*|reveal) bottomoflibrary optiontwoend revealend auto=@each upkeep restriction{lastturn(*|stack)~lessthan~1}:flip(Krallenhorde Howler) text={2}{G}: Look at the top three cards of your library. You may reveal a creature card from among them and put it into your hand. Put the rest on the bottom of your library in any order. -- At the beginning of each upkeep, if no spells were cast last turn, transform Duskwatch Recruiter. mana={1}{G} @@ -31211,7 +31193,7 @@ toughness=1 [/card] [card] name=Ebony Charm -auto=choice life:-1 opponent && life:1 controller +auto=choice target(opponent) life:-1 && life:1 controller auto=choice target(*|graveyard) moveTo(exile) auto=aslongas(creature|battlefield) choice fear target(creature) text=Choose one - Target opponent loses 1 life and you gain 1 life; or exile up to three target cards from a single graveyard; or target creature gains fear until end of turn. (It can't be blocked except by artifact creatures and/or black creatures.) @@ -31372,7 +31354,7 @@ toughness=2 [card] name=Eerie Interlude target=creature|mybattlefield -auto=blink ueot +auto=(blink) text=Exile any number of target creatures you control. Return those cards to the battlefield under their owner's control at the beginning of the next end step. mana={2}{W} type=Instant @@ -31413,7 +31395,7 @@ subtype=Shapeshifter name=Eidolon of Blossoms auto=draw:1 auto=@movedTo(enchantment|myBattlefield):draw:1 -text=Constellation ? Whenever Eidolon of Blossoms or another enchantment enters the battlefield under your control, draw a card. +text=Constellation — Whenever Eidolon of Blossoms or another enchantment enters the battlefield under your control, draw a card. mana={2}{G}{G} type=Enchantment Creature subtype=Spirit @@ -31706,18 +31688,9 @@ power=3 toughness=1 [/card] [card] -name=Eldrazi Scion -auto={S}:Add{1} -text=Sacrifice this creature: Add {1} to your mana pool. -type=Creature -subtype=Eldrazi Scion -power=1 -toughness=1 -[/card] -[card] name=Eldrazi Skyspawner abilities=flying -auto=choice token(Eldrazi Scion) controller +auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! controller text=Devoid (This card has no color.) -- Flying -- When Eldrazi Skyspawner enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." mana={2}{U} abilities=devoid @@ -31727,14 +31700,6 @@ power=2 toughness=1 [/card] [card] -name=Eldrazi Spawn -type=Creature -subtype=Eldrazi Spawn -auto={S}:Add{1} -power=0 -toughness=1 -[/card] -[card] name=Electric Eel auto=damage:1 controller auto={R}{R}:2/0 && damage:1 controller @@ -32718,7 +32683,7 @@ name=Embodiment of Fury abilities=trample auto=lord(creature[land]|mybattlefield) trample auto=@movedTo(land|mybattlefield):target(land|mybattlefield) transforms((Elemental Land Creature,3/3,newability[haste])) ueot -text=Trample -- Land creatures you control have trample. -- Landfall ? Whenever a land enters the battlefield under your control, you may have target land you control become a 3/3 Elemental creature with haste until end of turn. It's still a land. +text=Trample -- Land creatures you control have trample. -- Landfall — Whenever a land enters the battlefield under your control, you may have target land you control become a 3/3 Elemental creature with haste until end of turn. It's still a land. mana={3}{R} type=Creature subtype=Elemental @@ -32730,7 +32695,7 @@ name=Embodiment of Insight abilities=vigilance auto=lord(creature[land]|mybattlefield) vigilance auto=@movedTo(land|mybattlefield):target(land|mybattlefield) transforms((Elemental Land Creature,3/3,newability[haste])) ueot -text=Vigilance -- Land creatures you control have vigilance. -- Landfall ? Whenever a land enters the battlefield under your control, you may have target land you control become a 3/3 Elemental creature with haste until end of turn. It's still a land. +text=Vigilance -- Land creatures you control have vigilance. -- Landfall — Whenever a land enters the battlefield under your control, you may have target land you control become a 3/3 Elemental creature with haste until end of turn. It's still a land. mana={4}{G} type=Creature subtype=Elemental @@ -32800,7 +32765,7 @@ name=Emeria Shepherd abilities=flying auto=@movedTo(land[-plains]|myBattlefield):moveto(myhand) target(*[-land;-instant;-sorcery]|mygraveyard) auto=@movedTo(land[plains]|myBattlefield):moveto(mybattlefield) target(*[-land;-instant;-sorcery]|mygraveyard) -text=Flying -- Landfall ? Whenever a land enters the battlefield under your control, you may return target nonland permanent card from your graveyard to your hand. If that land is a Plains, you may return that nonland permanent card to the battlefield instead. +text=Flying -- Landfall — Whenever a land enters the battlefield under your control, you may return target nonland permanent card from your graveyard to your hand. If that land is a Plains, you may return that nonland permanent card to the battlefield instead. mana={5}{W}{W} type=Creature subtype=Angel @@ -32961,7 +32926,7 @@ toughness=15 [/card] [card] name=Emrakul's Hatcher -auto=Token(-193507)*3 +auto=token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*3 text=When Emrakul's Hatcher enters the battlefield, put three 0/1 colorless Eldrazi Spawn creatures onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={4}{R} type=Creature @@ -33452,7 +33417,7 @@ text=First strike -- When Enlistment Officer enters the battlefield, reveal the mana={3}{W} type=Creature subtype=Human Soldier -abilities=firststrike +abilities=first strike power=2 toughness=3 [/card] @@ -33840,7 +33805,7 @@ type=Legendary Enchantment [card] name=Erdwal Illuminator abilities=flying -auto=@movedto(clue|mybattlefield) restriction{type(clue[fresh]|mybattlefield)~equalto~1}:token(Clue) +auto=@movedto(clue|mybattlefield) turnlimited:token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! text=Flying -- Whenever you investigate for the first time each turn, investigate an additional time. mana={1}{U} type=Creature @@ -34172,7 +34137,7 @@ name=Essence Feed target=player auto=life:-3 auto=life:3 controller -auto=Token(-193507)*3 +auto=token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*3 text=Target player loses 3 life. You gain 3 life and put three 0/1 colorless Eldrazi Spawn creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={5}{B} type=Sorcery @@ -34198,8 +34163,8 @@ subtype=Aura [card] name=Essence Flux target=creature|mybattlefield -auto=blink ueot -auto=if type(mytgt[spirit]) then counter(1/1,1) +auto=if cantargetcard(*[spirit]) then moveto(exile) and!( transforms((,newability[moveto(ownerbattlefield)],newability[counter(1/1.1)])) oneshot )! +auto=if cantargetcard(*[-spirit]) then moveto(exile) and!(moveto(ownerbattlefield))! text=Exile target creature you control, then return that card to the battlefield under its owner's control. If it's a Spirit, put a +1/+1 counter on it. mana={U} type=Instant @@ -34438,8 +34403,8 @@ toughness=3 [/card] [card] name=Ethereal Whiskergill -abilities=cantattack,flying -auto=aslongas(island|opponentBattlefield) -cantattack +abilities=flying +auto=aslongas(island|opponentBattlefield) cantattack <1 text=Flying -- Ethereal Whiskergill can't attack unless defending player controls an Island. mana={3}{U} type=Creature @@ -34747,7 +34712,7 @@ toughness=5 [card] name=Exalted Dragon abilities=flying,cantattack -auto={S(land|myBattlefield)}:-cantattack +auto={S(land|myBattlefield)}:-cantattack restriction{myattackersonly} text=Flying -- Exalted Dragon can't attack unless you sacrifice a land. mana={4}{W}{W} type=Creature @@ -34830,7 +34795,7 @@ type=Instant name=Exert Influence target=creature[power<=converge]|battlefield auto=moveto(mybattlefield) -text=Converge ? Gain control of target creature if its power is less than or equal to the number of colors of mana spent to cast Exert Influence. +text=Converge — Gain control of target creature if its power is less than or equal to the number of colors of mana spent to cast Exert Influence. mana={4}{U} type=Sorcery [/card] @@ -35068,7 +35033,7 @@ type=Sorcery name=Expose Evil target=creature auto=tap -auto=token(Clue) controller +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=Tap up to two target creatures. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={1}{W} type=Instant @@ -35094,7 +35059,7 @@ name=Exquisite Firecraft target=creature,player auto=damage:4 auto=aslongas(*[instant;sorcery]|mygraveyard) nofizzle >1 -text=Exquisite Firecraft deals 4 damage to target creature or player. -- Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, Exquisite Firecraft can't be countered by spells or abilities. +text=Exquisite Firecraft deals 4 damage to target creature or player. -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, Exquisite Firecraft can't be countered by spells or abilities. mana={1}{R}{R} type=Sorcery [/card] @@ -35295,7 +35260,7 @@ subtype=Elf [/card] [card] name=Eyeless Watcher -auto=choice token(Eldrazi Scion)*2 controller +auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )!*2 controller text=Devoid (This card has no color.) -- When Eyeless Watcher enters the battlefield, put two 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={3}{G} abilities=devoid @@ -35361,8 +35326,11 @@ toughness=4 [/card] [card] name=Fable of Wolf and Owl -auto=@movedTo(*[green]|mystack):may token(-15208711) -auto=@movedTo(*[blue]|mystack):may token(-15208712) +auto=@movedTo(*[green;-blue]|mystack):may token(Wolf,Creature Wolf,2/2,green,tnum:11) +auto=@movedTo(*[blue;-green]|mystack):may token(Bird,Creature Bird,1/1,flying,blue,tnum:12) +auto=@movedTo(*[blue&green]|mystack):may token(Bird,Creature Bird,1/1,flying,blue,tnum:12) +auto=@movedTo(*[blue&green]|mystack):may token(Wolf,Creature Wolf,2/2,green,tnum:11) +auto=@movedTo(*[blue&green]|mystack):may name(create bird & wolf) token(Bird,Creature Bird,1/1,flying,blue,tnum:12) && token(Wolf,Creature Wolf,2/2,green,tnum:11) text=Whenever you cast a green spell, you may put a 2/2 green Wolf creature token onto the battlefield. -- Whenever you cast a blue spell, you may put a 1/1 blue Bird creature token with flying onto the battlefield. mana={3}{GU}{GU}{GU} type=Enchantment @@ -36485,8 +36453,7 @@ type=Artifact [/card] [card] name=Felhide Brawler -abilities=cantblock -auto=aslongas(other minotaur|myBattlefield) -cantblock +auto=aslongas(other minotaur|myBattlefield) cantblock <1 text=Felhide Brawler can't block unless you control another Minotaur. mana={1}{B} type=Creature @@ -36704,7 +36671,6 @@ subtype=Aura [/card] [card] name=Feral Krushok -text= mana={4}{G} type=Creature subtype=Beast @@ -37143,7 +37109,7 @@ toughness=2 name=Fiery Impulse target=creature auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then damage:3 else damage:2 -text=Fiery Impulse deals 2 damage to target creature. -- Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, Fiery Impulse deals 3 damage to that creature instead. +text=Fiery Impulse deals 2 damage to target creature. -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, Fiery Impulse deals 3 damage to that creature instead. mana={R} type=Instant [/card] @@ -37610,7 +37576,7 @@ toughness=3 name=Firemantle Mage auto=all(ally|mybattlefield) menace ueot auto=@movedTo(other ally|myBattlefield):may lord(ally|myBattlefield) all(ally|mybattlefield) menace ueot -text=Rally ? Whenever Firemantle Mage or another Ally enters the battlefield under your control, creatures you control gain menace until end of turn. (A creature with menace can't be blocked except by two or more creatures.) +text=Rally — Whenever Firemantle Mage or another Ally enters the battlefield under your control, creatures you control gain menace until end of turn. (A creature with menace can't be blocked except by two or more creatures.) mana={2}{R} type=Creature subtype=Human Shaman Ally @@ -37910,8 +37876,8 @@ type=Sorcery [card] name=Flameblade Angel abilities=flying -auto=@damaged(controller):may damage:1 opponent -auto=@damaged(creature|mybattlefield):may damage:1 opponent +auto=@damaged(controller) from(*|opponentbattlefield,opponentstack,opponentgraveyard,opponentlibrary,opponentexile,opponenthand):may damage:1 opponent +auto=@damaged(*|mybattlefield) from(*|opponentbattlefield,opponentstack,opponentgraveyard,opponentlibrary,opponentexile,opponenthand):may damage:1 opponent text=Flying -- Whenever a source an opponent controls deals damage to you or a permanent you control, you may have Flameblade Angel deal 1 damage to that source's controller. mana={4}{R}{R} type=Creature @@ -38419,8 +38385,8 @@ toughness=1 [/card] [card] name=Fleeting Memories -auto=token(Clue) controller -auto=@movedto(clue|mygraveyard):deplete:3 opponent +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=@sacrificed(clue|mybattlefield):target(player) deplete:3 text=When Fleeting Memories enters the battlefield, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- Whenever you sacrifice a Clue, target player puts the top three cards of his or her library into his or her graveyard. mana={2}{U} type=Enchantment @@ -38682,9 +38648,8 @@ toughness=2 [/card] [card] name=Floodchaser -abilities=cantattack auto=counter(1/1,6) -auto=aslongas(island|opponentBattlefield) -cantattack +auto=aslongas(island|opponentBattlefield) cantattack <1 auto={U}{C(1/1,-1)}:ueot name(land becomes an island) loseabilities && losesubtypesof(land) && transforms((island)) target(land) text=Floodchaser enters the battlefield with six +1/+1 counters on it. -- Floodchaser can't attack unless defending player controls an Island. -- {U}, Remove a +1/+1 counter from Floodchaser: Target land becomes an Island until end of turn. mana={5}{U} @@ -39511,7 +39476,7 @@ toughness=1 name=Forgeborn Oreads auto=damage:1 target(creature,player) auto=@movedTo(enchantment|myBattlefield):damage:1 target(creature,player) -text=Constellation ? Whenever Forgeborn Oreads or another enchantment enters the battlefield under your control, Forgeborn Oreads deals 1 damage to target creature or player. +text=Constellation — Whenever Forgeborn Oreads or another enchantment enters the battlefield under your control, Forgeborn Oreads deals 1 damage to target creature or player. mana={2}{R}{R} type=Enchantment Creature subtype=Nymph @@ -39558,8 +39523,8 @@ type=Land [/card] [card] name=Forgotten Creation -auto=cantbeblockedby(creature[power>3]) -auto=@each my upkeep:may name(draw discard) discard all(myhand) and draw:type:*[fresh]:mygraveyard) +abilities=skulk +auto=@each my upkeep:may name(discard hand) count(type:*:myhand) && reject all(*|myhand) && draw:countedamount controller text=Skulk (This creature can't be blocked by creatures with greater power.) -- At the beginning of your upkeep, you may discard all the cards in your hand. If you do, draw that many cards. mana={3}{U} type=Creature @@ -40162,7 +40127,7 @@ toughness=1 [/card] [card] name=From Beyond -auto=@each my upkeep:token(Eldrazi Scion) controller +auto=@each my upkeep:token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! controller auto={1}{G}{S}:moveto(myhand) notatarget(*[eldrazi]|mylibrary) text=Devoid (This card has no color.) -- At the beginning of your upkeep, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." -- {1}{G}, Sacrifice From Beyond: Search your library for an Eldrazi card, reveal it, put it into your hand, then shuffle your library. mana={3}{G} @@ -40171,8 +40136,10 @@ type=Enchantment [/card] [card] name=From Under the Floorboards -auto=ifnot madnessplayed then token(-229968)*3 && life:3 -auto=if madnessplayed then token(-229968)*x && life:x +auto=ifnot madnessplayed then token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )!*3 +auto=ifnot madnessplayed then life:3 +auto=if madnessplayed then token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )!*x +auto=if madnessplayed then life:x abilities=madness autoexile=restriction{discarded} pay({b}{b}{x}) name(pay XBB to cast) activate name(pay XBB to cast) castcard(normal madness)?name(put in graveyard) moveto(ownergraveyard) text=Madness {X}{B}{B} (If you discard this card, discard it into exile. When you do, cast it for its madness cost or put it into your graveyard.) -- Put three 2/2 black Zombie creature tokens onto the battlefield tapped and you gain 3 life. If From Under the Floorboards's madness cost was paid, instead put X of those tokens onto the battlefield tapped and you gain X life. @@ -40648,7 +40615,7 @@ subtype=Aura [/card] [card] name=Furtive Homunculus -auto=cantbeblockedby(creature[power>2]) +abilities=skulk text=Skulk (This creature can't be blocked by creatures with greater power.) mana={1}{U} type=Creature @@ -41466,7 +41433,7 @@ toughness=2 [card] name=Geist of Saint Traft abilities=opponentshroud -auto=@combat(attacking) source(this):token(Angel Token,Creature Angel,4/4,white,flying,battleready) && all(Angel Token[attacking]|mybattlefield) phaseaction[combatends once] moveto(exile) +auto=@combat(attacking) source(this):token(Angel Token,Creature Angel,4/4,white,flying,battleready) and!( transforms((,newability[phaseaction[combatends once] moveto(exile)])) forever )! text=Hexproof -- Whenever Geist of Saint Traft attacks, put a 4/4 white Angel creature token with flying onto the battlefield tapped and attacking. Exile that token at the end of combat. mana={1}{W}{U} type=Legendary Creature @@ -41505,6 +41472,15 @@ power=3 toughness=5 [/card] [card] +name=Geistblast +target=creature,player +auto=damage:2 +autograveyard={2}{U}{e}:name(copy spell) target(instant,sorcery|mystack) castcard(copied noevent) +text=Geistblast deals 2 damage to target creature or player. -- {2}{U}, Exile Geistblast from your graveyard: Copy target instant or sorcery spell you control. You may choose new targets for the copy. +mana={2}{R} +type=Instant +[/card] +[card] name=Geistcatcher's Rig auto=may damage:4 target(creature[flying]) oneshot text=When Geistcatcher's Rig enters the battlefield, you may have it deal 4 damage to target creature with flying. @@ -41576,7 +41552,7 @@ toughness=1 [/card] [card] name=Gemini Engine -auto=@combat(attacking) source(this):token(Twin,Gemini Creature,p/t,battleready) && all(Twin[gemini]|mybattlefield) phaseaction[combatends,sourceinplay] sacrifice +auto=@combat(attacking) source(this):token(Twin,Gemini Creature,p/t,battleready) and!( transforms((,newability[phaseaction[combatends,sourceinplay] sacrifice])) forever )! text=Whenever Gemini Engine attacks, put a colorless Construct artifact creature token named Twin onto the battlefield attacking. Its power is equal to Gemini Engine's power and its toughness is equal to Gemini Engine's toughness. Sacrifice the token at end of combat. mana={6} type=Artifact Creature @@ -41790,7 +41766,7 @@ type=Land [card] name=Geralf's Masterpiece abilities=flying -auto=foreach(*|myhand):-1/-1 +auto=foreach(*|myhand) -1/-1 autograveyard={3}{U}{discard(*|myhand)}{discard(*|myhand)}{discard(*|myhand)}:moveto(myhand) and!(tap(noevent))! text=Flying -- Geralf's Masterpiece gets -1/-1 for each card in your hand. -- {3}{U}, Discard three cards: Return Geralf's Masterpiece from your graveyard to the battlefield tapped. mana={3}{U}{U} @@ -41918,7 +41894,7 @@ toughness=4 name=Geyserfield Stalker abilities=menace auto=@movedto(land|myBattlefield):2/2 ueot -text=Menace (This creature can't be blocked except by two or more creatures.) -- Landfall ? Whenever a land enters the battlefield under your control, Geyserfield Stalker gets +2/+2 until end of turn. +text=Menace (This creature can't be blocked except by two or more creatures.) -- Landfall — Whenever a land enters the battlefield under your control, Geyserfield Stalker gets +2/+2 until end of turn. mana={4}{B} type=Creature subtype=Elemental @@ -42095,7 +42071,7 @@ toughness=3 [/card] [card] name=Ghost Council of Orzhova -auto=ability$!choice life:-1 target(opponent) && life:1 controller!$ controller +auto=choice target(opponent) life:-1 && life:1 controller auto={1}{S(creature|mybattlefield)}:(blink)ueot text=When Ghost Council of Orzhova enters the battlefield, target opponent loses 1 life and you gain 1 life. -- {1}, Sacrifice a creature: Exile Ghost Council of Orzhova. Return it to the battlefield under its owner's control at the beginning of the next end step. mana={W}{W}{B}{B} @@ -42631,7 +42607,7 @@ subtype=Giant [card] name=Gibbering Fiend auto=damage:1 opponent -auto==@each opponent upkeep restriction{delirium}:deplete:1 opponent +auto=@each opponent upkeep restriction{delirium}:damage:1 opponent text=When Gibbering Fiend enters the battlefield, it deals 1 damage to each opponent. -- Delirium At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, Gibbering Fiend deals 1 damage to that player. mana={1}{R} type=Creature @@ -42705,7 +42681,7 @@ toughness=1 [card] name=Gideon's Phalanx auto=if type(*[instant;sorcery]|mygraveyard)~lessthan~1 then token(Knight,Creature Knight,2/2,white,vigilance)*4 controller else token(Knight,Creature Knight,2/2,white,vigilance)*4 && all(creature|mybattlefield) indestructible ueot -text=Put four 2/2 white Knight creature tokens with vigilance onto the battlefield. -- Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, creatures you control gain indestructible until end of turn. +text=Put four 2/2 white Knight creature tokens with vigilance onto the battlefield. -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, creatures you control gain indestructible until end of turn. mana={5}{W}{W} type=Instant [/card] @@ -42915,8 +42891,8 @@ type=Land [/card] [card] name=Glacial Crasher -abilities=trample, cantattack -auto=aslongas(mountain|Battlefield) -cantattack +abilities=trample +auto=aslongas(mountain|Battlefield) cantattack <1 text=Trample (If this creature would assign enough damage to its blockers to destroy them, you may have it assign the rest of its damage to defending player or planeswalker.) -- Glacial Crasher can't attack unless there is a mountain on the battlefield. mana={4}{U}{U} type=Creature @@ -43860,8 +43836,7 @@ toughness=3 [/card] [card] name=Goblin Cohort -abilities=cantattack -auto=@movedTo(creature|mystack):-cantattack ueot +auto=this(variable{countmycrespell}<1) cantattack text=Goblin Cohort can't attack unless you've cast a creature spell this turn. mana={R} type=Creature @@ -44393,9 +44368,9 @@ toughness=2 [/card] [card] name=Goblin Rock Sled -abilities=trample,cantattack +abilities=trample auto=@combat(attacking) source(this):frozen -auto=aslongas(mountain|opponentbattlefield) -cantattack +auto=aslongas(mountain|opponentbattlefield) cantattack <1 text=Trample -- Goblin Rock Sled doesn't untap during your untap step if it attacked during your last turn. -- Goblin Rock Sled can't attack unless defending player controls a Mountain. mana={1}{R} type=Creature @@ -44768,9 +44743,7 @@ toughness=4 [/card] [card] name=Godhunter Octopus -abilities=cantattack -auto=aslongas(enchantment|opponentBattlefield) -cantattack -auto=aslongas(*[enchanted]|opponentBattlefield) -cantattack +auto=aslongas(*[enchantment;enchanted]|opponentBattlefield) cantattack <1 text=Godhunter Octopus can't attack unless defending player controls an enchantment or an enchanted permanent. mana={5}{U} type=Creature @@ -44946,18 +44919,6 @@ power=2 toughness=2 [/card] [card] -name=Goldnight Castigator -abilities=flying,haste -auto=@damaged(controller):damage:thatmuch controller -auto=@damaged(this):damage:thatmuch this -text=Flying, haste -- If a source would deal damage to you, it deals double that damage to you instead. -- If a source would deal damage to Goldnight Castigator, it deals double that damage to Goldnight Castigator instead. -mana={2}{R}{R} -type=Creature -subtype=Angel -power=4 -toughness=9 -[/card] -[card] name=Goldnight Commander auto=@movedTo(other creature|myBattlefield):all(creature|mybattlefield) 1/1 ueot text=Whenever another creature enters the battlefield under your control, creatures you control get +1/+1 until end of turn. @@ -45181,7 +45142,7 @@ toughness=6 name=Gone Missing target=* auto=moveto(ownerlibrary) -auto=token(Clue) controller +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=Put target permanent on top of its owner's library. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={4}{U} type=Sorcery @@ -45585,7 +45546,7 @@ type=Land name=Grave Birthing target=opponent auto=ability$!moveto(exile) notatarget(*|mygraveyard)!$ targetedplayer -auto=token(Eldrazi Scion) controller +auto=token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! controller auto=draw:1 controller text=Devoid (This card has no color.) -- Target opponent exiles a card from his or her graveyard. You put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." -- Draw a card. mana={2}{B} @@ -45964,7 +45925,6 @@ type=Artifact Land [/card] [card] name=Great Hart -text= mana={3}{W} type=Creature subtype=Elk @@ -46392,7 +46352,7 @@ type=Sorcery name=Grim Guardian auto=life:-1 opponent auto=@movedTo(enchantment|myBattlefield):life:-1 opponent -text=Constellation ? Whenever Grim Guardian or another enchantment enters the battlefield under your control, each opponent loses 1 life. +text=Constellation — Whenever Grim Guardian or another enchantment enters the battlefield under your control, each opponent loses 1 life. mana={2}{B} type=Enchantment Creature subtype=Zombie @@ -46913,7 +46873,7 @@ type=Land name=Grove Rumbler abilities=trample auto=@movedTo(land|myBattlefield):2/2 ueot -text=Trample -- Landfall ? Whenever a land enters the battlefield under your control, Grove Rumbler gets +2/+2 until end of turn. +text=Trample -- Landfall — Whenever a land enters the battlefield under your control, Grove Rumbler gets +2/+2 until end of turn. mana={2}{R}{G} type=Creature subtype=Elemental @@ -46924,7 +46884,7 @@ toughness=3 name=Grovetender Druids auto=pay({1}) token(Plant,Creature Plant,1/1,green) auto=@movedTo(ally|myBattlefield):pay({1}) token(Plant,Creature Plant,1/1,green) -text=Rally ? Whenever Grovetender Druids or another Ally enters the battlefield under your control, you may pay {1}. If you do, put a 1/1 green Plant creature token onto the battlefield. +text=Rally — Whenever Grovetender Druids or another Ally enters the battlefield under your control, you may pay {1}. If you do, put a 1/1 green Plant creature token onto the battlefield. mana={2}{G}{W} type=Creature subtype=Elf Druid Ally @@ -46941,7 +46901,7 @@ type=Enchantment [card] name=Growth Spasm auto=moveTo(myBattlefield) and!(tap(noevent))! notatarget(land[basic]|myLibrary) -auto=Token(-193507) +auto=token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )! text=Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library. -- Put a 0/1 colorless Eldrazi Spawn creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." mana={2}{G} type=Sorcery @@ -47116,8 +47076,8 @@ toughness=2 [card] name=Gryff's Boon target=creature -auto=1/0 -auto=flying +auto=teach(creature) 1/0 +auto=teach(creature) flying autograveyard={3}{W}:rehook target(creature) assorcery text=Enchant creature -- Enchanted creature gets +1/+0 and has flying. -- {3}{W}: Return Gryff's Boon from your graveyard to the battlefield attached to target creature. Activate this ability only any time you could cast a sorcery. mana={W} @@ -47217,7 +47177,7 @@ name=Guardian of Tazeem abilities=flying auto=@movedTo(land[-island]|myBattlefield):tap target(creature) auto=@movedTo(land[island]|myBattlefield):target(creature) tap && frozen -text=Flying -- Landfall ? Whenever a land enters the battlefield under your control, tap target creature an opponent controls. If that land is an Island, that creature doesn't untap during its controller's next untap step. +text=Flying -- Landfall — Whenever a land enters the battlefield under your control, tap target creature an opponent controls. If that land is an Island, that creature doesn't untap during its controller's next untap step. mana={3}{U}{U} type=Creature subtype=Sphinx @@ -47601,7 +47561,7 @@ name=Guul Draz Overseer abilities=flying auto=@movedTo(land[-swamp]|myBattlefield):all(other creature|mybattlefield) 1/0 ueot auto=@movedTo(land[swamp]|myBattlefield):all(other creature|mybattlefield) 2/0 ueot -text=Flying -- Landfall ? Whenever a land enters the battlefield under your control, other creatures you control get +1/+0 until end of turn. If that land is a Swamp, those creatures get +2/+0 until end of turn instead. +text=Flying -- Landfall — Whenever a land enters the battlefield under your control, other creatures you control get +1/+0 until end of turn. If that land is a Swamp, those creatures get +2/+0 until end of turn instead. mana={4}{B}{B} type=Creature subtype=Vampire @@ -48002,8 +47962,7 @@ subtype=Aura [/card] [card] name=Hammerhead Shark -abilities=cantattack -auto=aslongas(island|opponentbattlefield) -cantattack +auto=aslongas(island|opponentbattlefield) cantattack <1 text=Hammerhead Shark can't attack unless defending player controls an Island. mana={1}{U} type=Creature @@ -48084,7 +48043,7 @@ toughness=2 [/card] [card] name=Hand of Justice -auto={T}{T(other creature[white]|myBattlefield)}{T(other creature[white]|myBattlefield)}{T(other creature[white]|myBattlefield)}:destroy target(creture) +auto={T}{T(other creature[white]|myBattlefield)}{T(other creature[white]|myBattlefield)}{T(other creature[white]|myBattlefield)}:destroy target(creature) text={T}, Tap three untapped white creatures you control: Destroy target creature. mana={5}{W} type=Creature @@ -48472,7 +48431,7 @@ toughness=3 name=Harvestguard Alseids auto=name(prevent all damage) target(creature) transforms((,newability[preventalldamage to(this)])) ueot auto=@movedto(enchantment|mybattlefield):name(prevent all damage) target(creature) transforms((,newability[preventalldamage to(this)])) ueot -text=Constellation ? Whenever Harvestguard Alseids or another enchantment enters the battlefield under your control, prevent all damage that would be dealt to target creature this turn. +text=Constellation — Whenever Harvestguard Alseids or another enchantment enters the battlefield under your control, prevent all damage that would be dealt to target creature this turn. mana={2}{W} type=Enchantment Creature subtype=Nymph @@ -48554,9 +48513,9 @@ toughness=2 [card] name=Haunted Cloak auto={1}:equip -auto=vigilance -auto=trample -auto=haste +auto=teach(creature) vigilance +auto=teach(creature) trample +auto=teach(creature) haste text=Equipped creature has vigilance, trample, and haste. -- Equip {1} mana={3} type=Artifact @@ -49374,7 +49333,7 @@ type=Enchantment [/card] [card] name=Heir of Falkenrath -auto={discard(*|myhand)}:flip(Heir to the Night) +auto={discard(*|myhand)}:flip(Heir to the Night) limit:1 text=Discard a card: Transform Heir of Falkenrath. Activate this ability only once each turn. mana={1}{B} type=Creature @@ -49945,7 +49904,7 @@ toughness=4 name=Hero of Goma Fada auto=choice all(creature|mybattlefield) indestructible ueot auto=@movedTo(ally|myBattlefield):all(creature|mybattlefield) indestructible ueot -text=Rally ? Whenever Hero of Goma Fada or another Ally enters the battlefield under your control, creatures you control gain indestructible until end of turn. +text=Rally — Whenever Hero of Goma Fada or another Ally enters the battlefield under your control, creatures you control gain indestructible until end of turn. mana={4}{W} type=Creature subtype=Human Knight Ally @@ -51575,9 +51534,7 @@ type=Enchantment [/card] [card] name=Howlpack Wolf -abilities=cantblock -auto=aslongas(wolf|mybattlefield) -cantblock -auto=aslongas(werewolf|mybattlefield) -cantblock +auto=aslongas(other *[wolf;werewolf]|mybattlefield) cantblock <1 text=Howlpack Wolf can't block unless you control another Wolf or Werewolf. mana={2}{R} type=Creature @@ -51691,7 +51648,7 @@ toughness=1 name=Humble the Brute target=creature[power>3] auto=destroy -auto=token(Clue) controller +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=Destroy target creature with power 4 or greater. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={4}{W} type=Instant @@ -51709,7 +51666,7 @@ type=Instant name=Humbler of Mortals auto=all(creature|myBattlefield) trample ueot auto=@movedTo(enchantment|myBattlefield):all(creature|myBattlefield) trample ueot -text=Constellation ? Whenever Humbler of Mortals or another enchantment enters the battlefield under your control, creatures you control gain trample until end of turn. +text=Constellation — Whenever Humbler of Mortals or another enchantment enters the battlefield under your control, creatures you control gain trample until end of turn. mana={4}{G}{G} type=Enchantment Creature subtype=Elemental @@ -52533,7 +52490,7 @@ name=Icy Blast target=creature|battlefield auto=tap auto=if type(creature[power>=4]|mybattlefield)~morethan~0 then frozen -text=Tap X target creatures. -- Ferocious ? If you control a creature with power 4 or greater, those creatures don't untap during their controllers' next untap steps. +text=Tap X target creatures. -- Ferocious — If you control a creature with power 4 or greater, those creatures don't untap during their controllers' next untap steps. mana={X}{U} type=Instant [/card] @@ -53173,8 +53130,7 @@ type=Instant [/card] [card] name=Incorrigible Youths -abilities=haste -abilities=madness +abilities=haste,madness autoexile=restriction{discarded} pay({2}{r}) name(pay 2r to cast) activate name(pay 2r to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard) text=Haste -- Madness {2}{R} (If you discard this card, discard it into exile. When you do, cast it for its madness cost or put it into your graveyard.) mana={3}{R}{R} @@ -53224,7 +53180,7 @@ type=Sorcery [/card] [card] name=Incubator Drone -auto=choice token(Eldrazi Scion) controller +auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! controller text=Devoid (This card has no color.) -- When Incubator Drone enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." mana={3}{U} abilities=devoid @@ -53395,7 +53351,7 @@ subtype=Aura [/card] [card] name=Inexorable Blob -auto=@combat(attacking) source(this) restriction{delirium}: aslongas(*|mygraveyard)~morethan~6 token(Ooze,creature Ooze,3/3,green,battleready) +auto=@combat(attacking) source(this) restriction{delirium}:token(Ooze,creature Ooze,3/3,green,battleready) text=Delirium Whenever Inexorable Blob attacks, if there are four or more card types among cards in your graveyard, put a 3/3 green Ooze creature token onto the battlefield tapped and attacking. mana={2}{G} type=Creature @@ -53443,15 +53399,6 @@ type=Enchantment subtype=Aura [/card] [card] -name=Infectious Curse -auto=@targeted(opponent):add{1} -auto=@upkeep:life:1 -auto=@upkeep:life:-1 opponent -text=Enchant player -- Spells you cast that target enchanted player cost {1} less to cast. -- At the beginning of enchanted player's upkeep, that player loses 1 life and you gain 1 life. -type=Enchantment -subtype=Aura Curse -[/card] -[card] name=Infectious Horror auto=@combat(attacking) source(this):life:-2 opponent text=Whenever Infectious Horror attacks, each opponent loses 2 life. @@ -53641,7 +53588,7 @@ name=Infuse with the Elements target=creature|battlefield auto=trample ueot auto=counter(1/1,converge) -text=Converge ? Put X +1/+1 counters on target creature, where X is the number of colors of mana spent to cast Infuse with the Elements. That creature gains trample until end of turn. +text=Converge — Put X +1/+1 counters on target creature, where X is the number of colors of mana spent to cast Infuse with the Elements. That creature gains trample until end of turn. mana={3}{G} type=Instant [/card] @@ -53962,7 +53909,7 @@ toughness=1 [card] name=Insidious Mist abilities=hexproof,unblockable,indestructible,cantblock -auto=@combat(notblocked) source(this):may flip(Elusive Tormentor) +auto=@combat(notblocked) source(this):transforms((,newability[pay[[{2}{B}]] flip(Elusive Tormentor)])) oneshot text=Hexproof, indestructible -- Insidious Mist can't block and can't be blocked. -- Whenever Insidious Mist attacks and isn't blocked, you may pay {2}{B}. If you do, transform it. type=Creature subtype=Elemental @@ -54238,6 +54185,17 @@ power=3 toughness=3 [/card] [card] +name=Invasive Surgery +target=sorcery|stack +auto=fizzle +auto=if delirium then all(*[share!name!]|targetcontrollerlibrary) moveto(exile) +auto=if delirium then all(*[share!name!]|targetcontrollerhand) moveto(exile) +auto=if delirium then all(*[share!name!]|targetcontrollergraveyard) moveto(exile) +text=Counter target sorcery spell. -- Delirium — If there are four or more card types among cards in your graveyard, search the graveyard, hand, and library of that spell's controller for any number of cards with the same name as that spell, exile those cards, then that player shuffles his or her library. +mana={U} +type=Instant +[/card] +[card] name=Invert the Skies auto=if spent({G}) then all(creature|opponentbattlefield) -flying ueot auto=if spent({U}) then all(creature|mybattlefield) flying ueot @@ -54320,7 +54278,7 @@ toughness=1 [card] name=Invocation of Saint Traft target=creature -auto=@combat(attacking) source(mytgt):token(Saint Traft Angel,Creature Angel,4/4,white,flying,battleready) && all(Saint Traft Angel[attacking]|mybattlefield) phaseaction[combatends once] moveto(exile) +auto=@combat(attacking) source(mytgt):token(Angel,Creature Angel,4/4,white,flying,battleready) and!( transforms((,newability[phaseaction[combatends once] moveto(exile)])) forever )! text=Enchant creature -- Enchanted creature has "Whenever this creature attacks, put a 4/4 white Angel creature token with flying onto the battlefield tapped and attacking. Exile that token at end of combat." mana={1}{W}{U} type=Enchantment @@ -54961,10 +54919,10 @@ subtype=Jace [card] name=Jace, Unraveler of Secrets auto=counter(0/0,5,loyalty) -auto={C(0/0,1,Loyalty)}:deplete:1 && may moveto(mylibrary) target(*[fresh]|mygraveyard) && draw:1 -auto={C(0/0,-2,Loyalty)}:moveto(ownerhand) target(creature) -auto={C(0/0,-8,Loyalty)}:name(emblem) emblem transforms((,newability[@movedto(*|opponentstack) restriction{thisturn(*|opponentstack)~equalto~0}:fizzle all(*|opponentstack)])) forever dontremove -text=+1: put the top card of your library into your graveyard, you may return it to the top of your library, draw 1 -- -2: return a target creature to its owners hand -- -8: you get an emblem with whenever an opponent casts a spell if its the first spell they cast this turn, counter that spell +auto={C(0/0,1,Loyalty)}:name(+1: Scry) scry:1 scrycore delayed draw:1 scrycoreend scryend +auto={C(0/0,-2,Loyalty)}:name(-2: Bounce) moveto(ownerhand) target(creature) +auto={C(0/0,-8,Loyalty)}:name(-8: Emblem) emblem transforms((,newability[@movedto(*|opponentstack) restriction{thisturn(*|opponentstack)~equalto~0}:fizzle all(*|opponentstack)])) forever dontremove +text=+1: Scry 1, then draw a card. -- -2: Return target creature to its owner's hand. -- -8: You get an emblem with "Whenever an opponent casts his or her first spell each turn, counter that spell." mana={3}{U}{U} type=Planeswalker subtype=Jace @@ -55008,7 +54966,7 @@ toughness=1 name=Jace's Scrutiny target=creature auto=-4/-0 -auto=token(Clue) controller +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=Target creature gets -4/-0 until end of turn. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={1}{U} type=Instant @@ -55068,7 +55026,7 @@ toughness=8 name=Jaddi Offshoot abilities=defender auto=@movedTo(land|myBattlefield):life:1 controller -text=Defender -- Landfall ? Whenever a land enters the battlefield under your control, you gain 1 life. +text=Defender -- Landfall — Whenever a land enters the battlefield under your control, you gain 1 life. mana={G} type=Creature subtype=Plant @@ -56486,7 +56444,7 @@ toughness=4 name=Kalastria Healer auto=choice life:-1 all(opponent) && life:1 controller auto=@movedTo(ally|myBattlefield):life:-1 all(opponent) && life:1 controller -text=Rally ? Whenever Kalastria Healer or another Ally enters the battlefield under your control, each opponent loses 1 life and you gain 1 life. +text=Rally — Whenever Kalastria Healer or another Ally enters the battlefield under your control, each opponent loses 1 life and you gain 1 life. mana={1}{B} type=Creature subtype=Vampire Cleric Ally @@ -56556,7 +56514,6 @@ toughness=0 [/card] [card] name=Kalonian Tusker -text= mana={G}{G} type=Creature subtype=Beast @@ -58053,7 +58010,7 @@ toughness=5 [card] name=King Macar, the Gold-Cursed auto=@untapped(this):may moveto(exile) target(creature) && token(-378445) controller -text=Inspired ? Whenever King Macar, the Gold-Cursed becomes untapped, you may exile target creature. If you do, put a colorless artifact token named Gold onto the battlefield. It has "Sacrifice this artifact: Add one mana of any color to your mana pool." +text=Inspired — Whenever King Macar, the Gold-Cursed becomes untapped, you may exile target creature. If you do, put a colorless artifact token named Gold onto the battlefield. It has "Sacrifice this artifact: Add one mana of any color to your mana pool." mana={2}{B}{B} type=Legendary Creature subtype=Human @@ -59058,7 +59015,7 @@ auto=@combat(attacking) source(dragon|mybattlefield):all(creature|mybattlefield) other={3}{R}{B} name(Dash) auto=if paid(alternative) then transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveto(ownerhand) all(this)])) forever text=Flying. -- Whenever a Dragon you control attacks, creatures you control get +1/+0 until end of turn. -- Dash {3}{B}{R} (You may cast this spell for its dash cost. If you do, it gains haste, and it's returned from the battlefield to its owner's hand at the beginning of the next end step.) -mana={3}{B}}{R} +mana={3}{B}{R} type=Legendary Creature subtype=Dragon power=4 @@ -59153,7 +59110,7 @@ toughness=1 name=Kor Bladewhirl auto=choice all(creature|mybattlefield) first strike ueot auto=@movedTo(ally|myBattlefield):all(creature|mybattlefield) first strike ueot -text=Rally ? Whenever Kor Bladewhirl or another Ally enters the battlefield under your control, creatures you control gain first strike until end of turn. +text=Rally — Whenever Kor Bladewhirl or another Ally enters the battlefield under your control, creatures you control gain first strike until end of turn. mana={1}{W} type=Creature subtype=Kor Soldier Ally @@ -59194,7 +59151,7 @@ toughness=1 name=Kor Entanglers auto=tap target(creature|opponentbattlefield) auto=@movedTo(ally|myBattlefield):tap target(creature|opponentbattlefield) -text=Rally ? Whenever Kor Entanglers or another Ally enters the battlefield under your control, tap target creature an opponent controls. +text=Rally — Whenever Kor Entanglers or another Ally enters the battlefield under your control, tap target creature an opponent controls. mana={4}{W} type=Creature subtype=Kor Soldier Ally @@ -59464,7 +59421,7 @@ toughness=5 [/card] [card] name=Kozilek's Predator -auto=Token(-193507)*2 +auto=token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*2 text=When Kozilek's Predator enters the battlefield, put two 0/1 colorless Eldrazi Spawn creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={3}{G} type=Creature @@ -59563,7 +59520,7 @@ toughness=0 [/card] [card] name=Krallenhorde Howler -auto=lord(creature|myhand) altercost(colorless, -1) +auto=lord(creature|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Duskwatch Recruiter) text=Creature spells you cast cost {1} less to cast. -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Krallenhorde Howler. type=Creature @@ -60248,7 +60205,7 @@ toughness=3 name=Kytheon's Tactics auto=all(creature|mybattlefield) 2/1 ueot auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then all(creature|mybattlefield) vigilance ueot -text=Creatures you control get +2/+1 until end of turn. -- Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, those creatures also gain vigilance until end of turn. (Attacking doesn't cause them to tap.) +text=Creatures you control get +2/+1 until end of turn. -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, those creatures also gain vigilance until end of turn. (Attacking doesn't cause them to tap.) mana={1}{W}{W} type=Sorcery [/card] @@ -60453,8 +60410,7 @@ toughness=2 [/card] [card] name=Lambholt Pacifist -abilities=cantattack -auto=aslongas(creature[power>=4]|mybattlefield) transforms((,newability[-cantattack])) +auto=aslongas(creature[power>=4]|mybattlefield) cantattack <1 auto=@each upkeep restriction{lastturn(*|stack)~lessthan~1}:flip(Lambholt Butcher) text=Lambholt Pacifist can't attack unless you control a creature with power 4 or greater. -- At the beginning of each upkeep, if no spells were cast last turn, transform Lambholt Pacifist. mana={1}{G} @@ -60465,7 +60421,7 @@ toughness=3 [/card] [card] name=Lamplighter of Selhoff -auto=if type(zombie|mybattlefield)~morethan~0 then may draw:1 && discard(*|myhand) +auto=if type(other zombie|mybattlefield)~morethan~0 then may draw:1 && discard(*|myhand) text=When Lamplighter of Selhoff enters the battlefield, if you control another Zombie, you may draw a card. If you do, discard a card. mana={4}{U} type=Creature @@ -60569,7 +60525,7 @@ toughness=1 name=Lantern Scout auto=choice all(creature|mybattlefield) lifelink ueot auto=@movedTo(ally|myBattlefield):all(creature|mybattlefield) lifelink ueot -text=Rally ? Whenever Lantern Scout or another Ally enters the battlefield under your control, creatures you control gain lifelink until end of turn. +text=Rally — Whenever Lantern Scout or another Ally enters the battlefield under your control, creatures you control gain lifelink until end of turn. mana={2}{W} type=Creature subtype=Human Scout Ally @@ -61405,7 +61361,7 @@ toughness=1 [card] name=Leonin Iconoclast auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):destroy target(Creature[enchantment]|opponentbattlefield) -text=Heroic ? Whenever you cast a spell that targets Leonin Iconoclast, destroy target enchantment creature an opponent controls. +text=Heroic — Whenever you cast a spell that targets Leonin Iconoclast, destroy target enchantment creature an opponent controls. mana={3}{W} type=Creature subtype=Cat Monk @@ -62305,18 +62261,9 @@ mana={1}{B} type=Enchantment [/card] [card] -name=Liliana's Reaver Zombie -type=Creature -subtype=Zombie -auto=tap -power=2 -toughness=2 -color=black -[/card] -[card] name=Liliana's Reaver abilities=deathtouch -auto=@combatdamaged(player) from(this):token(-370740) +auto=@combatdamaged(player) from(this):token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )! auto=@combatdamagefoeof(player) from(this):ability$!name(discard) notatarget(*|myhand) reject!$ opponent auto=@combatdamageof(player) from(this):ability$!name(discard) notatarget(*|myhand) reject!$ controller text=Deathtouch. -- Whenever Liliana's Reaver deals combat damage to a player, that player discards a card and you put a 2/2 black Zombie creature token onto the battlefield tapped. @@ -62767,7 +62714,7 @@ toughness=2 [/card] [card] name=Llanowar Mentor -auto={G}{T}{discard(*|myhand)}:token(461) +auto={G}{T}{discard(*|myhand)}:token(Llanowar Elves) text={G}, {T}, Discard a card: Put a 1/1 green Elf Druid creature token named Llanowar Elves onto the battlefield. It has "{T}: Add {G} to your mana pool." mana={G} type=Creature @@ -62825,11 +62772,11 @@ toughness=3 [/card] [card] name=Loam Dryad -auto={T}{t(creature|mybattlefield)}:add{G} -auto={T}{t(creature|mybattlefield)}:add{B} -auto={T}{t(creature|mybattlefield)}:add{W} -auto={T}{t(creature|mybattlefield)}:add{U} -auto={T}{t(creature|mybattlefield)}:add{R} +auto={T}{t(other creature|mybattlefield)}:add{G} +auto={T}{t(other creature|mybattlefield)}:add{B} +auto={T}{t(other creature|mybattlefield)}:add{W} +auto={T}{t(other creature|mybattlefield)}:add{U} +auto={T}{t(other creature|mybattlefield)}:add{R} text={T}, Tap an untapped creature you control: Add one mana of any color to your mana pool. mana={G} type=Creature @@ -64492,7 +64439,7 @@ toughness=0 [/card] [card] name=Magmatic Chasm -auto=all(creature[-flying]|battlefield) cantblock ueot +auto=lord(creature[-flying]|battlefield) cantblock ueot text=Creatures without flying can't block this turn. mana={1}{R} type=Sorcery @@ -64563,9 +64510,9 @@ type=Instant [/card] [card] name=Magnifying Glass -auto={T}:Add{1} -auto={4}{T}:token(Clue) controller -text={T}: Add {1} to your mana pool. -- {4}, {T}: Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") +auto={T}:Add{C} +auto={4}{T}:token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +text={T}: Add {C} to your mana pool. -- {4}, {T}: Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={3} type=Artifact [/card] @@ -64833,7 +64780,7 @@ toughness=4 name=Makindi Patrol auto=choice all(creature|mybattlefield) vigilance ueot auto=@movedTo(ally|myBattlefield):all(creature|mybattlefield) vigilance ueot -text=Rally ? Whenever Makindi Patrol or another Ally enters the battlefield under your control, creatures you control gain vigilance until end of turn. +text=Rally — Whenever Makindi Patrol or another Ally enters the battlefield under your control, creatures you control gain vigilance until end of turn. mana={2}{W} type=Creature subtype=Human Knight Ally @@ -64856,7 +64803,7 @@ toughness=3 name=Makindi Sliderunner abilities=trample auto=@movedTo(land|myBattlefield):1/1 ueot -text=Trample -- Landfall ? Whenever a land enters the battlefield under your control, Makindi Sliderunner gets +1/+1 until end of turn. +text=Trample -- Landfall — Whenever a land enters the battlefield under your control, Makindi Sliderunner gets +1/+1 until end of turn. mana={1}{R} type=Creature subtype=Beast @@ -64927,7 +64874,7 @@ toughness=1 [card] name=Malakir Soothsayer auto={T(ally|myBattlefield)}{t}:draw:1 && life:-1 -text=Cohort ? {T}, Tap an untapped Ally you control: You draw a card and you lose 1 life. +text=Cohort — {T}, Tap an untapped Ally you control: You draw a card and you lose 1 life. mana={4}{B} type=Creature subtype=Vampire Shaman Ally @@ -65336,7 +65283,7 @@ subtype=Aura [card] name=Manic Scribe auto=deplete:3 opponent -auto==@each opponent upkeep restriction{delirium}:deplete:3 opponent +auto=@each opponent upkeep restriction{delirium}:deplete:3 opponent text=When Manic Scribe enters the battlefield, each opponent puts the top three cards of his or her library into his or her graveyard. -- Delirium At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, that player puts the top three cards of his or her library into his or her graveyard. mana={1}{U} type=Creature @@ -65664,7 +65611,7 @@ toughness=4 [card] name=Mardu Charm auto=choice name(4 Damage) damage:4 target(creature) -auto=choice name(2 Warrior tokens) token(-386593)*2 +auto=choice name(2 Warrior tokens) token(Warrior,Creature Warrior,1/1,white) and!( transforms((,newability[first strike ueot])) )!*2 auto=choice name(discard opponent) target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*[-creature;-land]|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Choose one: -- Mardu Charm deals 4 damage to target creature. -- Put two 1/1 white Warrior creature tokens onto the battlefield. They gain first strike until end of turn. -- Target opponent reveals his or her hand. You choose a noncreature, nonland card from it. That player discards that card. mana={R}{W}{B} @@ -65767,16 +65714,6 @@ power=3 toughness=2 [/card] [card] -name=Mardu Warrior token -auto=first strike ueot -text= -type=Creature -color=white -subtype=Warrior -power=1 -toughness=1 -[/card] -[card] name=Mardu Warshrieker auto=if raid then Add{R}{W}{B} text=Raid - When Mardu Warshrieker enters the battlefield, if you attacked with a creature this turn, add {R}{W}{B} to your mana pool. @@ -66540,7 +66477,7 @@ type=Sorcery [/card] [card] name=Master Transmuter -auto={H(artifact|mybattlefield)}{U}{T}:may name(put artifact in play) ability$!moveTo(mybattlefield) notatarget(artifact|myhand)!$ controller +auto={H(artifact|mybattlefield)}{U}{T}:name(put artifact in play) transforms((,newability[ability$! moveTo(mybattlefield) notatarget(artifact|myhand) !$ controller])) oneshot text={U}, {T}, Return an artifact you control to its owner's hand: You may put an artifact card from your hand onto the battlefield. mana={3}{U} type=Artifact Creature @@ -67346,8 +67283,7 @@ toughness=2 [/card] [card] name=Mercurial Pretender -auto=may copy NotATarget(creature) -auto=transforms((,newability[{2}{U}{U}:moveto(ownerhand)])) forever +auto=may copy NotATarget(creature) and!( transforms((,newability[{2}{U}{U}:moveto(ownerhand)])) forever )! text=You may have Mercurial Pretender enter the battlefield as a copy of any creature you control except it gains ?{2}{U}{U}: Return this creature to its owner?s hand.? mana={4}{U} type=Creature @@ -67909,7 +67845,7 @@ type=Instant [card] name=Midnight Ritual target=creature|mygraveyard -auto=transforms((,newability[moveTo(exile)],newability[token(-19707)])) +auto=transforms((,newability[moveTo(exile)],newability[token(Zombie)])) text=Exile X target creature cards from your graveyard. For each creature card exiled this way, put a 2/2 black Zombie creature token onto the battlefield. mana={X}{2}{B} type=Sorcery @@ -68467,8 +68403,7 @@ toughness=0 [/card] [card] name=Mindless Null -abilities=cantblock -auto=aslongas(vampire|myBattlefield) -cantblock +auto=aslongas(vampire|myBattlefield) cantblock <1 text=Mindless Null can't block unless you control a Vampire. mana={2}{B} type=Creature @@ -68612,7 +68547,7 @@ toughness=2 name=Mindwrack Demon abilities=flying, trample auto=deplete:4 controller -auto=@each my upkeep:if delirium then name(Delirium active) else life:-4 controller +auto=@each my upkeep restriction{notdelirum}:life:-4 controller text=Flying, trample -- When Mindwrack Demon enters the battlefield, put the top four cards of your library into your graveyard. -- Delirium At the beginning of your upkeep, you lose 4 life unless there are four or more card types among cards in your graveyard. mana={2}{B}{B} type=Creature @@ -68724,7 +68659,6 @@ toughness=3 [/card] [card] name=Minotaur Abomination -text= mana={4}{B}{B} type=Creature subtype=Zombie Minotaur @@ -69013,7 +68947,7 @@ type=Land [card] name=Mirror-Sigil Sergeant abilities=trample -auto=@each my upkeep restriction{type(*[blue]|myBattlefield)~morethan~0}:may token(158598) +auto=@each my upkeep restriction{type(*[blue]|myBattlefield)~morethan~0}:may token(Mirror-Sigil Sergeant) text=Trample -- At the beginning of your upkeep, if you control a blue permanent, you may put a token that's a copy of Mirror-Sigil Sergeant onto the battlefield. mana={5}{W} type=Creature @@ -69655,8 +69589,7 @@ type=Artifact [/card] [card] name=Mogg Conscripts -abilities=cantattack -auto=@movedTo(creature|mystack):-cantattack ueot +auto=this(variable{countmycrespell}<1) cantattack text=Mogg Conscripts can't attack unless you've cast a creature spell this turn. mana={R} type=Creature @@ -70159,7 +70092,7 @@ toughness=2 [card] name=Monastery Mentor auto=@movedTo(*[-creature]|mystack):1/1 ueot -auto=@movedTo(*[-creature]|mystack):choice name(Create Monk) token(-391883) controller +auto=@movedTo(*[-creature]|mystack):choice name(Create Monk) token(Monk,Creature Monk,1/1,white) and!( transforms((,newability[@movedTo(*[-creature]|mystack):1/1 ueot])) )! controller text=Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) -- Whenever you cast a noncreature spell, put a 1/1 white Monk creature token with prowess onto the battlefield. mana={2}{W} type=Creature @@ -70223,16 +70156,6 @@ power=1 toughness=1 [/card] [card] -name=Monk Token -auto=@movedTo(*[-creature]|mystack):1/1 ueot -text=Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) -color=white -type=Creature -subtype=Monk -power=1 -toughness=1 -[/card] -[card] name=Monkey Cage auto=@movedTo(creature[manacost=0]|battlefield) once:sacrifice all(this) && loseabilities all(this) auto=@movedTo(creature[manacost=1]|battlefield) once:sacrifice all(this) && loseabilities all(this) && token(Ape,Creature Ape,2/2,green) @@ -71342,7 +71265,7 @@ subtype=Aura [card] name=Munda's Vanguard auto={T(ally|myBattlefield)}{t}:all(creature|mybattlefield) counter(1/1,1) -text=Cohort ? {T}, Tap an untapped Ally you control: Put a +1/+1 counter on each creature you control. +text=Cohort — {T}, Tap an untapped Ally you control: Put a +1/+1 counter on each creature you control. mana={4}{W} type=Creature subtype=Kor Knight Ally @@ -71363,7 +71286,7 @@ toughness=2 [card] name=Murasa Ranger auto=@movedTo(land|myBattlefield):pay({3}{G}) counter(1/1,2) -text=Landfall ? Whenever a land enters the battlefield under your control, you may pay {3}{G}. If you do, put two +1/+1 counters on Murasa Ranger. +text=Landfall — Whenever a land enters the battlefield under your control, you may pay {3}{G}. If you do, put two +1/+1 counters on Murasa Ranger. mana={3}{G} type=Creature subtype=Human Warrior @@ -71394,7 +71317,7 @@ toughness=4 name=Murderer's Axe auto={discard(*|myhand)}:equip auto=2/2 -text=Equipped creature gets +2/+2. -- EquipDiscard a card. +text=Equipped creature gets +2/+2. -- Equip—Discard a card. mana={4} type=Artifact subtype=Equipment @@ -71793,7 +71716,7 @@ toughness=1 [/card] [card] name=Myr Propagator -auto={3}{T}:token(215069) +auto={3}{T}:token(Myr Propagator) text={3}, {T}: Put a token that's a copy of Myr Propagator onto the battlefield. mana={3} type=Artifact Creature @@ -71804,21 +71727,8 @@ toughness=1 [card] name=Myr Prototype auto=@each my upkeep:counter(1/1,1) -auto=this(counter{1/1.1}=) {1}:-cantattack myAttackersOnly -auto=this(counter{1/1.2}=) {2}:-cantattack myAttackersOnly -auto=this(counter{1/1.3}=) {3}:-cantattack myAttackersOnly -auto=this(counter{1/1.4}=) {4}:-cantattack myAttackersOnly -auto=this(counter{1/1.5}=) {5}:-cantattack myAttackersOnly -auto=this(counter{1/1.6}=) {6}:-cantattack myAttackersOnly -auto=this(counter{1/1.7}=) {7}:-cantattack myAttackersOnly -auto=this(counter{1/1.8}=) {8}:-cantattack myAttackersOnly -auto=this(counter{1/1.9}=) {9}:-cantattack myAttackersOnly -auto=this(counter{1/1.10}=) {10}:-cantattack myAttackersOnly -auto=this(counter{1/1.11}=) {11}:-cantattack myAttackersOnly -auto=this(counter{1/1.12}=) {12}:-cantattack myAttackersOnly -auto=this(counter{1/1.13}=) {13}:-cantattack myAttackersOnly -auto=this(counter{1/1.14}=) {14}:-cantattack myAttackersOnly -auto=this(counter{1/1.15}=) {15}:-cantattack myAttackersOnly +auto=attackcost:counter{1%1} +auto=blockcost:counter{1%1} text=At the beginning of your upkeep, put a +1/+1 counter on Myr Prototype. -- Myr Prototype can't attack or block unless you pay {1} for each +1/+1 counter on it. mana={5} type=Artifact Creature @@ -72186,10 +72096,11 @@ type=Sorcery [card] name=Nahiri, the Harbinger auto=counter(0/0,4,loyalty) -auto={C(0/0,1,Loyalty)}:name(Reveal) reveal:1 optionone name(Choose to put in Graveyard) target(*|reveal) moveto(mygraveyard) optiononeend optiontwo name(put Back and draw) target(<1>*|reveal) moveto(mylibrary) optiontwoend afterrevealed choice draw:1 controller afterrevealedend revealend -auto={C(0/0,-2,Loyalty)}:moveto(ownerhand) target(creature) -auto={C(0/0,-8,Loyalty)}:name(-8: emblem) emblem transforms((,newability[@movedto(*|mystack) restriction{thisturn(*|opponentstack)~lessthan~2}:all(trigger[to]) fizzle])) forever dontremove -text=+1: put the top card of your library into your graveyard, you may return it to the top of your library, draw 1 -- -2: return a target creature to its owners hand -- -8: you get an emblem with whenever an opponent casts a spell if its the first spell they cast this turn, counter that spell +auto={C(0/0,1,Loyalty)}:name(+1: Reveal) reveal:1 optionone name(Choose to put in Graveyard) target(*|reveal) moveto(mygraveyard) optiononeend optiontwo name(put Back and draw) target(<1>*|reveal) moveto(mylibrary) optiontwoend afterrevealed choice draw:1 controller afterrevealedend revealend +auto={C(0/0,-2,Loyalty)}:name(-2: Exile tapped Artifact or Creature) target(creature,artifact[tapped]) moveto(exile) +auto={C(0/0,-2,Loyalty)}:name(-2: Exile target Enchantment) target(enchantment) moveto(exile) +auto={C(0/0,-8,Loyalty)}:name(-8: Fetch) moveto(mybattlefield) notatarget(artifact,creature|mylibrary) and!( transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveTo(ownerhand)])) forever )! +text=+2: You may discard a card. If you do, draw a card. -- -2: Exile target enchantment, tapped artifact, or tapped creature. -- -8: Search your library for an artifact or creature card, put it onto the battlefield, then shuffle your library. It gains haste. Return it to your hand at the beginning of the next end step. mana={2}{R}{W} type=Planeswalker subtype=Nahiri @@ -72822,7 +72733,7 @@ subtype=Aura [/card] [card] name=Necromancer's Stockpile -auto=aslongas(creature|myhand) {1}{B}:notatarget(creature|myhand) and!( if cantargetcard(zombie|*) then token(-383323) )! reject && draw:1 +auto=aslongas(creature|myhand) {1}{B}:notatarget(creature|myhand) and!( if cantargetcard(zombie|*) then token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )! )! reject && draw:1 text={1}{B},Discard a creature card: Draw a card. If the discarded card was a Zombie card, put a 2/2 black Zombie creature token onto the battlefield tapped. mana={1}{B} type=Enchantment @@ -72831,7 +72742,7 @@ type=Enchantment name=Necromantic Summons target=creature|graveyard auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then transforms((,newability[moveto(mybattlefield)],newability[counter(1/1.2)])) forever else moveto(mybattlefield) -text=Put target creature card from a graveyard onto the battlefield under your control. -- Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, that creature enters the battlefield with two additional +1/+1 counters on it. +text=Put target creature card from a graveyard onto the battlefield under your control. -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, that creature enters the battlefield with two additional +1/+1 counters on it. mana={4}{B} type=Sorcery [/card] @@ -72992,9 +72903,9 @@ toughness=1 name=Needle Spires auto={t}:add{w} auto={t}:add{r} -auto={1}{B}{G}:all(this) transforms((Elemental Creature,setpower=2,settoughness=1,red,white,doublestrike)) ueot +auto={1}{B}{G}:all(this) transforms((Elemental Creature,setpower=2,settoughness=1,red,white,double strike)) ueot auto=tap(noevent) -text=Needle Spires enters the battlefield tapped. -- {T}: Add {R} or {W} to your mana pool. -- {2}{R}{W}: Needle Spires becomes a 2/1 red and white Elemental creature with doublestrike until end of turn. It's still a land. +text=Needle Spires enters the battlefield tapped. -- {T}: Add {R} or {W} to your mana pool. -- {2}{R}{W}: Needle Spires becomes a 2/1 red and white Elemental creature with double strike until end of turn. It's still a land. type=Land [/card] [card] @@ -73065,6 +72976,16 @@ mana={1}{U} type=Instant [/card] [card] +name=Neglected Heirloom +auto=@transformed(mytgt):all(this) flip(Ashmouth Blade) +auto={1}:equip +auto=teach(creature) 1/1 +text=Equipped creature gets +1/+1. -- When equipped creature transforms, transform Neglected Heirloom. -- Equip {1} +mana={1} +type=Artifact +subtype=Equipment +[/card] +[card] name=Nekrataal abilities=first strike auto=bury target(creature[-black;-artifact]) @@ -73184,7 +73105,7 @@ toughness=3 [/card] [card] name=Nest Invader -auto=Token(-193507) +auto=token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )! text=When Nest Invader enters the battlefield, put a 0/1 colorless Eldrazi Spawn creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={1}{G} type=Creature @@ -73943,7 +73864,7 @@ text={T}, Sacrifice Nihil Spellbomb: Exile all cards from target player's gravey [/card] [card] name=Nihilistic Glee -auto={2}{B}{discard(*|myhand)}:life:-1 opponent && life:1 controller +auto={2}{B}{discard(*|myhand)}:target(opponent) life:-1 && life:1 controller auto=aslongas(*|myhand) {L:2}{1}:draw:1 <1 text={2}{B}, Discard a card: Target opponent loses 1 life and you gain 1 life. -- Hellbent - {1}, Pay 2 life: Draw a card. Activate this ability only if you have no cards in hand. mana={2}{B}{B} @@ -74256,7 +74177,7 @@ type=Sorcery [card] name=Nissa's Pilgrimage auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then name(fetch to play) notatarget(forest[basic]|mylibrary) transforms((,newability[name(move to hand) notatarget(forest[basic]|mylibrary) moveTo(myhand)],newability[moveTo(myBattlefield) and!(tap(noevent))!])) oneshot else name(fetch to play) notatarget(forest[basic]|mylibrary) transforms((,newability[name(move to hand) notatarget(forest[basic]|mylibrary) moveTo(myhand)],newability[moveTo(myBattlefield) and!(tap(noevent))!])) oneshot -text=Search your library for up to two basic Forest cards, reveal those cards, and put one onto the battlefield tapped and the rest into your hand. Then shuffle your library. -- Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, search your library for up to three basic Forest cards instead of two. +text=Search your library for up to two basic Forest cards, reveal those cards, and put one onto the battlefield tapped and the rest into your hand. Then shuffle your library. -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, search your library for up to three basic Forest cards instead of two. mana={2}{G} type=Sorcery [/card] @@ -74664,8 +74585,8 @@ toughness=2 [card] name=Not Forgotten target=*|graveyard -auto=moveto(ownerlibrary) -auto=token(Spirit,creature Spirit,1/1,white,flying) +auto=choice name(put on top) moveto(ownerlibrary) && token(Spirit,creature Spirit,1/1,white,flying) +auto=choice bottomoflibrary && token(Spirit,creature Spirit,1/1,white,flying) text=Put target card from a graveyard on the top or bottom of its owner's library. Put a 1/1 white Spirit creature token with flying onto the battlefield. mana={1}{W} type=Sorcery @@ -74848,7 +74769,7 @@ type=Artifact [/card] [card] name=Null Caller -auto={3}{b}{e(creature|mygraveyard)}:token(-370619) +auto={3}{b}{e(creature|mygraveyard)}:token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )! text={3}{B}, Exile a creature card from your graveyard: Put a 2/2 black Zombie creature token onto the battlefield tapped. mana={3}{B} type=Creature @@ -75159,7 +75080,7 @@ toughness=7 name=Oakheart Dryads auto=1/1 target(creature) ueot auto=@movedTo(enchantment|myBattlefield):1/1 target(creature) ueot -text=Constellation ? Whenever Oakheart Dryads or another enchantment enters the battlefield under your control, target creature gets +1/+1 until end of turn. +text=Constellation — Whenever Oakheart Dryads or another enchantment enters the battlefield under your control, target creature gets +1/+1 until end of turn. mana={2}{G} type=Enchantment Creature subtype=Nymph Dryad @@ -75438,7 +75359,7 @@ type=Instant [card] name=Obsessive Skinner auto=counter(1/1,1) target(creature) -auto==@each opponent upkeep restriction{delirium}:counter(1/1,1) target(creature) +auto=@each opponent upkeep restriction{delirium}:counter(1/1,1) target(creature) text=When Obsessive Skinner enters the battlefield, put a +1/+1 counter on target creature. -- Delirium At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, put a +1/+1 counter on target creature. mana={1}{G} type=Creature @@ -75821,7 +75742,7 @@ name=Ojutai Exemplars auto=@movedto(*[-creature]|mystack):choice name(Tap target creature) tap target(creature|battlefield) auto=@movedto(*[-creature]|mystack):choice name(First Strike and Lifelink) transforms((,newability[first strike ueot],newability[lifelink ueot])) ueot auto=@movedto(*[-creature]|mystack):choice name(Exile and returned tapped) moveto(exile) and!( transforms((,newability[moveto(ownerbattlefield) and!(tap(noevent))!])) forever)! -text=Whenever you cast a noncreature spell, choose one ? -- ? Tap target creature. -- ? Ojutai Exemplars gains first strike and lifelink until end of turn. -- ? Exile Ojutai Exemplars, then return it to the battlefield tapped under its owner's control. +text=Whenever you cast a noncreature spell, choose one — -- — Tap target creature. -- — Ojutai Exemplars gains first strike and lifelink until end of turn. -- — Exile Ojutai Exemplars, then return it to the battlefield tapped under its owner's control. mana={2}{W}{W} type=Creature subtype=Human Monk @@ -75855,7 +75776,7 @@ name=Ojutai, Soul of Winter abilities=flying,vigilance auto=@combat(attacking) source(dragon|mybattlefield):name(tap & Freeze) target(*[-land]|opponentbattlefield) transforms((,newability[tap],newability[frozen])) uynt text=Flying, vigilance. -- Whenever a Dragon you control attacks, Tap target nonland permament your opponents control. It doesn't untap during its controller's next untap step. -mana={5}{W}}{U} +mana={5}{W}{U} type=Legendary Creature subtype=Dragon power=5 @@ -75915,8 +75836,8 @@ toughness=3 [card] name=Olivia, Mobilized for War abilities=flying -auto=@movedto(creature|mybattlefield):pay({d(*|myhand)}) all(trigger[to]) counter(1/1,1) && all(trigger[to]) transforms((vampire,newability[haste])) forever -text=flying -- whenever another creature enters the battlefield under your control, you may discard a card, if you do, put a +1/+1 counter on that creature and it becomes a vampire and gains haste +auto=@movedto(other creature|mybattlefield):all(trigger) transforms((,newability[may reject notatarget(*|myhand) and!( all(this) counter(1/1.1) && all(this) haste && all(this) becomes(vampire) forever )!])) forever )! +text=Flying -- Whenever another creature enters the battlefield under your control, you may discard a card. If you do, put a +1/+1 counter on that creature, it gains haste until end of turn, and it becomes a Vampire in addition to its other types. mana={1}{B}{R} type=Legendary Creature subtype=Vampire Knight @@ -75953,7 +75874,7 @@ type=Sorcery name=Omnath, Locus of Rage auto=@movedTo(land|myBattlefield):token(Elemental,Creature Elemental,5/5,red,green) controller auto=@movedto(Elemental|graveyard) from(mybattlefield):damage:3 target(creature,player) -text=Landfall ? Whenever a land enters the battlefield under your control, put a 5/5 red and green Elemental creature token onto the battlefield. -- Whenever Omnath, Locus of Rage or another Elemental you control dies, Omnath deals 3 damage to target creature or player. +text=Landfall — Whenever a land enters the battlefield under your control, put a 5/5 red and green Elemental creature token onto the battlefield. -- Whenever Omnath, Locus of Rage or another Elemental you control dies, Omnath deals 3 damage to target creature or player. mana={3}{R}{R}{G}{G} type=Legendary Creature subtype=Elemental @@ -75991,7 +75912,7 @@ subtype=Equipment name=Ondu Champion auto=choice all(creature|mybattlefield) trample ueot auto=@movedTo(ally|myBattlefield):all(creature|mybattlefield) trample ueot -text=Rally ? Whenever Ondu Champion or another Ally enters the battlefield under your control, creatures you control gain trample until end of turn. +text=Rally — Whenever Ondu Champion or another Ally enters the battlefield under your control, creatures you control gain trample until end of turn. mana={2}{R}{R} type=Creature subtype=Minotaur Warrior Ally @@ -76023,7 +75944,7 @@ toughness=4 name=Ondu Greathorn abilities=first strike auto=@movedTo(land|myBattlefield):2/2 ueot -text=First strike -- Landfall ? Whenever a land enters the battlefield under your control, Ondu Greathorn gets +2/+2 until end of turn. +text=First strike -- Landfall — Whenever a land enters the battlefield under your control, Ondu Greathorn gets +2/+2 until end of turn. mana={3}{W} type=Creature subtype=Beast @@ -76042,7 +75963,7 @@ type=Sorcery [card] name=Ondu War Cleric auto={T(ally|myBattlefield)}{t}:life:2 controller -text=Cohort ? {T}, Tap an untapped Ally you control: You gain 2 life. +text=Cohort — {T}, Tap an untapped Ally you control: You gain 2 life. mana={1}{W} type=Creature subtype=Human Cleric Ally @@ -76109,8 +76030,8 @@ toughness=3 [/card] [card] name=Ongoing Investigation -auto=@combatdamaged(player):token(Clue) controller -auto={1}{G}{e(creature|mygraveyard)}:token(Clue) controller && life:2 +auto=@combatdamaged(player) from(creature|mybattlefield):token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto={1}{G}{e(creature|mygraveyard)}:token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller && life:2 text=Whenever one or more creatures you control deal combat damage to a player, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- {1}{G}, Exile a creature card from your graveyard: Investigate. You gain 2 life. mana={1}{U} type=Enchantment @@ -76465,7 +76386,7 @@ name=Oran-Rief Hydra abilities=trample auto=@movedTo(land[-forest]|myBattlefield):counter(1/1,1) auto=@movedTo(land[forest]|myBattlefield):counter(1/1,2) -text=Trample -- Landfall ? Whenever a land enters the battlefield under your control, put a +1/+1 counter on Oran-Rief Hydra. If that land is a Forest, put two +1/+1 counters on Oran-Rief Hydra instead. +text=Trample -- Landfall — Whenever a land enters the battlefield under your control, put a +1/+1 counter on Oran-Rief Hydra. If that land is a Forest, put two +1/+1 counters on Oran-Rief Hydra instead. mana={4}{G}{G} type=Creature subtype=Hydra @@ -77549,7 +77470,7 @@ type=Sorcery [card] name=Pack Rat anyzone=type:rat:mybattlefield/type:rat:mybattlefield cdaactive -auto={2}{B}{discard(*|myhand)}:token(253624) +auto={2}{B}{discard(*|myhand)}:token(Pack Rat) text=Pack Rat's power and toughness are each equal to the number of Rats you control. -- {2}{B}, Discard a card: Put a token onto the battlefield that's a copy of Pack Rat. mana={1}{B} type=Creature @@ -77645,7 +77566,7 @@ type=Enchantment name=Painful Truths auto=draw:converge controller auto=life:-converge controller -text=Converge ? You draw X cards and you lose X life, where X is the number of colors of mana spent to cast Painful Truths. +text=Converge — You draw X cards and you lose X life, where X is the number of colors of mana spent to cast Painful Truths. mana={2}{B} type=Sorcery [/card] @@ -77685,7 +77606,7 @@ toughness=1 name=Palace Siege auto=choice name(Khans) transforms((,newability[counter(0/0.1.Khans)],newability[@each my upkeep:moveto(myhand) target(creature|mygraveyard)])) forever auto=choice name(Dragons) transforms((,newability[counter(0/0.1.Dragons)],newability[@each my upkeep:life:-2 opponent && life:2 controller])) forever -text=As Palace Siege enters the battlefield, choose Khans or Dragons. -- ? Khans ? At the beginning of your upkeep, return target creature card from your graveyard to your hand. -- ? Dragons ? At the beginning of your upkeep, each opponent loses 2 life and you gain 2 life. +text=As Palace Siege enters the battlefield, choose Khans or Dragons. -- — Khans — At the beginning of your upkeep, return target creature card from your graveyard to your hand. -- — Dragons — At the beginning of your upkeep, each opponent loses 2 life and you gain 2 life. mana={3}{B}{B} type=Enchantment [/card] @@ -78315,7 +78236,7 @@ type=Sorcery [card] name=Path to Exile target=creature -auto=transforms((,newability[moveto(exile)],newability[may name(fetch basic land) notatarget(land[basic]|mylibrary) moveTo(mybattlefield) and!(tap(noevent))!])) oneshot +auto=transforms((,newability[moveto(exile)],newability[name(fetch basic land) notatarget(land[basic]|mylibrary) moveTo(mybattlefield) and!( tap(noevent) )! ])) oneshot text=Exile target creature. Its controller may search his or her library for a basic land card, put that card onto the battlefield tapped, then shuffle his or her library. mana={W} type=Instant @@ -78491,8 +78412,8 @@ toughness=3 [/card] [card] name=Pawn of Ulamog -auto=@movedTo(this|graveyard) from(myBattlefield):may token(-193507) -auto=@movedTo(other creature[-token]|graveyard) from(myBattlefield):may token(-193507) +auto=@movedTo(this|graveyard) from(myBattlefield):may token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )! +auto=@movedTo(other creature[-token]|graveyard) from(myBattlefield):may token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )! text=Whenever Pawn of Ulamog or another nontoken creature you control dies, you may put a 0/1 colorless Eldrazi Spawn creature token onto the battlefield. It has "Sacrifice this creature: Add 1 to your mana pool." mana={1}{B}{B} type=Creature @@ -79025,7 +78946,9 @@ type=Sorcery [/card] [card] name=Persistent Nightmare -auto=@combatdamaged(player) from(this):moveto(myhand) and!(flip(Startled Awake) )! +abilities=skulk +auto=@combatdamaged(player) from(this):moveto(ownerhand) +color=blue text=Skulk (This creature can't be blocked by creatures with greater power.) -- When Persistent Nightmare deals combat damage to a player, return it to its owner's hand. type=Creature subtype=Nightmare @@ -79265,9 +79188,7 @@ toughness=1 [/card] [card] name=Phantasmal Image -auto=transforms((Illusion)) -auto=transforms((,newability[@targeted(this):sacrifice])) forever -auto=may copy NotATarget(creature) +auto=may copy NotATarget(creature) and!( transforms((Illusion,newability[@targeted(this):sacrifice])) forever )! text=You may have Phantasmal Image enter the battlefield as a copy of any creature on the battlefield, except it's an Illusion in addition to its other types and it gains "When this creature becomes the target of a spell or ability, sacrifice it." mana={1}{U} type=Creature @@ -79866,23 +79787,9 @@ type=Artifact [/card] [card] name=Phyrexian Marauder -abilities=cantblock,cantattack +abilities=cantblock auto=counter(1/1,X) -auto=this(counter{1/1.1}=) {1}:-cantattack myAttackersOnly -auto=this(counter{1/1.2}=) {2}:-cantattack myAttackersOnly -auto=this(counter{1/1.3}=) {3}:-cantattack myAttackersOnly -auto=this(counter{1/1.4}=) {4}:-cantattack myAttackersOnly -auto=this(counter{1/1.5}=) {5}:-cantattack myAttackersOnly -auto=this(counter{1/1.6}=) {6}:-cantattack myAttackersOnly -auto=this(counter{1/1.7}=) {7}:-cantattack myAttackersOnly -auto=this(counter{1/1.8}=) {8}:-cantattack myAttackersOnly -auto=this(counter{1/1.9}=) {9}:-cantattack myAttackersOnly -auto=this(counter{1/1.10}=) {10}:-cantattack myAttackersOnly -auto=this(counter{1/1.11}=) {11}:-cantattack myAttackersOnly -auto=this(counter{1/1.12}=) {12}:-cantattack myAttackersOnly -auto=this(counter{1/1.13}=) {13}:-cantattack myAttackersOnly -auto=this(counter{1/1.14}=) {14}:-cantattack myAttackersOnly -auto=this(counter{1/1.15}=) {15}:-cantattack myAttackersOnly +auto=attackcost:counter{1%1} text=Phyrexian Marauder enters the battlefield with X +1/+1 counters on it. -- Phyrexian Marauder can't block. -- Phyrexian Marauder can't attack unless you pay {1} for each +1/+1 counter on it. mana={X} type=Artifact Creature @@ -80161,6 +80068,14 @@ power=2 toughness=2 [/card] [card] +name=Pick the Brain +target=opponent +auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose card) target(*[-land]|reveal) moveto(exile) and!( if delirium then transforms((,newability[all(*[share!name!]|mygraveyard) moveto(exile)],newability[all(*[share!name!]|myhand) moveto(exile)],newability[all(*[share!name!]|mylibrary) moveto(exile) and!(shuffle)!]))) oneshot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend +text=Target opponent reveals his or her hand. You choose a nonland card from it and exile that card. -- Delirium — If there are four or more card types among cards in your graveyard, search that player's graveyard, hand, and library for any number of cards with the same name as the exiled card, exile those cards, then that player shuffles his or her library. +mana={2}{B} +type=Sorcery +[/card] +[card] name=Pieces of the Puzzle auto=reveal:5 optionone name(Get Cards) target(*[instant;sorcery]|reveal) moveto(myhand) optiononeend optiontwo name(put in graveyard) target(<1>*|reveal) moveto(ownergraveyard) and!( all(*|reveal) moveto(ownergraveyard) )! optiontwoend revealend text=Reveal the top five cards of your library. Put up to two instant and/or sorcery cards from among them into your hand and the rest into your graveyard. @@ -80383,7 +80298,7 @@ type=Sorcery name=Pious Evangel auto=life:1 auto=@movedto(creature|mybattlefield):life:1 -auto={2}{T}{S(creature|mybattlefield)}: flip(Wayward Disciple) +auto={2}{T}{S(other *|mybattlefield)}: flip(Wayward Disciple) text=Whenever Pious Evangel or another creature enters the battlefield under your control, you gain 1 life. -- {2}, {T}, Sacrifice another permanent: Transform Pious Evangel. mana={2}{W} type=Creature @@ -81232,10 +81147,9 @@ toughness=1 [/card] [card] name=Pore Over the Pages -target=land|mybattlefield -auto=untap auto=draw:3 controller -auto=reject target(*|myhand) +auto=untap target(land|mybattlefield) +auto=ability$!reject target(*|myhand)!$ controller text=Draw three cards, untap up to two lands, then discard a card. mana={3}{U}{U} type=Sorcery @@ -81677,8 +81591,8 @@ type=Sorcery [card] name=Press for Answers target=creature -auto=frozen -auto=token(Clue) controller +auto=freeze +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=Tap target creature. It doesn't untap during its controller's next untap step. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={1}{U} type=Sorcery @@ -82312,8 +82226,8 @@ type=Enchantment [/card] [card] name=Prized Amalgam -autograveyard=@movedto(other creature|mybattlefield) from(mygraveyard) once:phaseactionmulti[endofturn once] moveto(mybattlefield) && tap -autograveyard=@movedto(other creature|mystack) from(mygraveyard) once:phaseactionmulti[endofturn once] moveto(mybattlefield) && tap +autograveyard=@movedto(other creature|mybattlefield) from(mygraveyard) once:phaseactionmulti[endofturn once] moveto(mybattlefield) && tap(noevent) +autograveyard=@movedto(other creature|mystack) from(mygraveyard) once:phaseactionmulti[endofturn once] moveto(mybattlefield) && tap(noevent) text=Whenever a creature enters the battlefield, if it entered from your graveyard or you cast it from your graveyard, return Prized Amalgam from your graveyard to the battlefield tapped at the beginning of the next end step. mana={1}{U}{B} type=Creature @@ -82407,8 +82321,7 @@ type=Sorcery [/card] [card] name=Progenitor Mimic -auto=transforms((,newability[@each my upkeep:all(this) ifnot cantargetcard(*[token]) then clone])) forever -auto=may copy NotATarget(creature) +auto=may copy NotATarget(creature) and!( transforms((,newability[@each my upkeep:all(this) ifnot cantargetcard(*[token]) then clone])) forever )! text=You may have Progenitor Mimic enter the battlefield as a copy of any creature on the battlefield except it gains "At the beginning of your upkeep, if this creature isn't a token, put a token onto the battlefield that's a copy of this creature." mana={4}{G}{U} type=Creature @@ -83644,8 +83557,7 @@ toughness=4 [card] name=Quick Sliver abilities=flash -auto=lord(sliver|myhand) flash -auto=lord(sliver|opponenthand) flash +auto=lord(sliver|hand,library,graveyard,exile) asflash text=Flash -- Any player may play Sliver cards as though they had flash. mana={1}{G} type=Creature @@ -83953,8 +83865,8 @@ toughness=1 [/card] [card] name=Rabid Bite -target=creature -auto=transforms((,newability[dynamicability target(creature)])) +target=creature|mybattlefield +auto=transforms((,newability[dynamicability target(creature|opponentbattlefield)])) text=Target creature you control deals damage equal to its power to target creature you don't control. mana={1}{G} type=Sorcery @@ -84062,7 +83974,7 @@ toughness=3 [card] name=Radiant Flames auto=damage:converge all(creature|battlefield) -text=Converge ? Radiant Flames deals X damage to each creature, where X is the number of colors of mana spent to cast Radiant Flames. +text=Converge — Radiant Flames deals X damage to each creature, where X is the number of colors of mana spent to cast Radiant Flames. mana={2}{R} type=Sorcery [/card] @@ -84975,8 +84887,7 @@ type=Sorcery [/card] [card] name=Rancid Rats -abilities=deathtouch -auto=cantbeblockedby(creature[power>1]) +abilities=deathtouch,skulk text=Skulk (This creature can't be blocked by creatures with greater power.) -- Deathtouch (Any amount of damage this deals to a creature is enough to destroy it.) mana={1}{B} type=Creature @@ -85053,7 +84964,7 @@ type=Sorcery [card] name=Rapacious One abilities=trample -auto=@combatdamaged(player) from(this):token(-193507)*thatmuch +auto=@combatdamaged(player) from(this):token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*thatmuch text=Trample -- Whenever Rapacious One deals combat damage to a player, put that many colorless 0/1 Eldrazi Spawn tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={5}{R} type=Creature @@ -85257,7 +85168,7 @@ toughness=3 name=Rattlechains abilities=flash, flying auto=target(spirit) hexproof ueot -auto=lord(spirit|myhand) flash +auto=lord(spirit|myhand,mylibrary,mygraveyard,myexile) asflash text=Flash -- Flying -- When Rattlechains enters the battlefield, target Spirit gains hexproof until end of turn. -- You may cast Spirit spells as though they had flash. mana={1}{U} type=Creature @@ -85317,7 +85228,7 @@ name=Ravaging Blaze target=creature auto=damage:X auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then damage:x targetcontroller -text=Ravaging Blaze deals X damage to target creature. -- Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, Ravaging Blaze also deals X damage to that creature's controller. +text=Ravaging Blaze deals X damage to target creature. -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, Ravaging Blaze also deals X damage to that creature's controller. mana={X}{R}{R} type=Instant [/card] @@ -85878,7 +85789,7 @@ toughness=6 [card] name=Reaper of Flight Moonsilver abilities=flying -auto=while(restriction{delirium}) {s(creature|mybattlefield)} +2/+1 ueot +auto=while(restriction{delirium}) {s(other creature|mybattlefield)}:2/1 ueot text=Flying -- Delirium Sacrifice another creature: Reaper of Flight Moonsilver gets +2/+1 until end of turn. Activate this ability only if there are four or more card types among cards in your graveyard. mana={3}{W}{W} type=Creature @@ -86297,8 +86208,7 @@ type=Enchantment [/card] [card] name=Red Cliffs Armada -abilities=cantattack -auto=aslongas(island|opponentBattlefield) -cantattack +auto=aslongas(island|opponentBattlefield) cantattack <1 text=Red Cliffs Armada can't attack unless defending player controls an Island. mana={4}{U} type=Creature @@ -86514,7 +86424,6 @@ toughness=3 [/card] [card] name=Regathan Firecat -text= mana={2}{R} type=Creature subtype=Elemental Cat @@ -86675,18 +86584,6 @@ mana={2}{R}{R} type=Sorcery [/card] [card] -name=Relentless Dead -auto=@movedTo(this|graveyard) from(battlefield):transforms((,newability[{B}:moveto(myhand)])) ueot -auto=@movedTo(this|graveyard) from(battlefield):transforms((,newability[{X}:moveto(myhand) target(zombie[manacost=X]|mygraveyard)])) ueot -text=Menace (This creature can't be blocked except by two or more creatures.) -- When Relentless Dead dies, you may pay {B}. If you do, return it to its owner's hand. -- When Relentless Dead dies, you may pay {X}. If you do, return another target Zombie creature card with converted mana cost X from your graveyard to the battlefield. -mana={B}{B} -abilities=menace -type=Creature -subtype=Zombie -power=2 -toughness=2 -[/card] -[card] name=Relentless Hunter abilities=trample auto={1}{r}{g}:+1/+1 ueot && trample ueot @@ -87218,9 +87115,9 @@ toughness=4 [/card] [card] name=Resolute Blademaster -auto=choice all(creature|mybattlefield) doublestrike ueot -auto=@movedTo(ally|myBattlefield):all(creature|mybattlefield) doublestrike ueot -text=Rally ? Whenever Resolute Blademaster or another Ally enters the battlefield under your control, creatures you control gain doublestrike until end of turn. +auto=choice all(creature|mybattlefield) double strike ueot +auto=@movedTo(ally|myBattlefield):all(creature|mybattlefield) double strike ueot +text=Rally — Whenever Resolute Blademaster or another Ally enters the battlefield under your control, creatures you control gain double strike until end of turn. mana={3}{R}{W} type=Creature subtype=Human Soldier Ally @@ -87457,14 +87354,14 @@ type=Enchantment [card] name=Retreat to Emeria auto=@movedTo(land|myBattlefield):name(choose one) transforms((,newability[choice name(Kor Token) token(-402007) controller],newability[choice name(1/1 ueot) all(creature|mybattlefield) 1/1 ueot])) -text=Landfall ? Whenever a land enters the battlefield under your control, choose one ? -- ? Put a 1/1 white Kor Ally creature token onto the battlefield. -- ? Creatures you control get +1/+1 until end of turn. +text=Landfall — Whenever a land enters the battlefield under your control, choose one — -- — Put a 1/1 white Kor Ally creature token onto the battlefield. -- — Creatures you control get +1/+1 until end of turn. mana={3}{W} type=Enchantment [/card] [card] name=Retreat to Kazandu auto=@movedTo(land|myBattlefield):transforms((,newability[if type(creature|battlefield)~morethan~0 then choice target(creature) counter(1/1)],newability[choice name(gain 2 life) life:2 controller])) -text=Landfall ? Whenever a land enters the battlefield under your control, choose one ? -- ? Put a +1/+1 counter on target creature. -- ? You gain 2 life. +text=Landfall — Whenever a land enters the battlefield under your control, choose one — -- — Put a +1/+1 counter on target creature. -- — You gain 2 life. mana={2}{G} type=Enchantment [/card] @@ -88523,8 +88420,8 @@ type=Sorcery [/card] [card] name=Rise from the Tides -auto=foreach(sorcery|mygraveyard):token(-370619) -auto=foreach(instant|mygraveyard):token(-370619) +auto=foreach(sorcery|mygraveyard):token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )! +auto=foreach(instant|mygraveyard):token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )! text=Put a 2/2 black Zombie creature token onto the battlefield tapped for each instant and sorcery card in your graveyard. mana={5}{U} type=Sorcery @@ -89198,7 +89095,7 @@ type=Sorcery name=Roilmage's Trick auto=all(creature|opponentbattlefield) -converge/0 ueot auto=draw:1 controller -text=Converge ? Creatures your opponents control get -X/-0 until end of turn, where X is the number of colors of mana spent to cast Roilmage's Trick. +text=Converge — Creatures your opponents control get -X/-0 until end of turn, where X is the number of colors of mana spent to cast Roilmage's Trick. mana={3}{U} type=Sorcery [/card] @@ -89308,8 +89205,7 @@ toughness=6 [/card] [card] name=Ronom Serpent -abilities=cantattack -auto=aslongas(land[snow]|opponentBattlefield) -cantattack +auto=aslongas(land[snow]|opponentBattlefield) cantattack <1 auto=aslongas(land[snow]|myBattlefield) all(this) sacrifice while <1 text=Ronom Serpent can't attack unless defending player controls a snow land. -- When you control no snow lands, sacrifice Ronom Serpent. mana={5}{U} @@ -89382,7 +89278,7 @@ type=Enchantment name=Root Out target=artifact,enchantment auto=destroy -auto=token(Clue) controller +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=Destroy target artifact or enchantment. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={2}{G} type=Sorcery @@ -89705,7 +89601,6 @@ toughness=5 [/card] [card] name=Rotting Mastodon -text= mana={4}{B} type=Creature subtype=Zombie Elephant @@ -90023,7 +89918,6 @@ type=Enchantment [/card] [card] name=Rumbling Baloth -text= mana={2}{G}{G} type=Creature subtype=Beast @@ -90082,8 +89976,7 @@ type=Instant [card] name=Runaway Carriage abilities=trample -auto=@combat(attacking) source(this):treason ueot -auto=@combat(blocking) source(this):treason ueot +auto=@combat(attacking,blocking) source(this):phaseaction[combatends,sourceinplay] sacrifice text=Trample -- When Runaway Carriage attacks or blocks, sacrifice it at end of combat. mana={4} type=Artifact Creature @@ -92114,15 +92007,15 @@ type=Sorcery [/card] [card] name=Savageborn Hydra -abilities=doublestrike +abilities=double strike auto=counter(1/1,X) auto={1}{RG}:counter(1/1,1) asSorcery text=Double strike. -- Savageborn Hydra enters the battlefield with X +1/+1 counters on it. -- {1}{R/G}: Put a +1/+1 counter on Savageborn Hydra. Activate this ability only any time you could play a sorcery. mana={X}{R}{G} type=Creature subtype=Hydra -power=2 -toughness=2 +power=0 +toughness=0 [/card] [card] name=Savannah Lions @@ -92446,9 +92339,7 @@ toughness=4 [/card] [card] name=Scarred Puma -abilities=cantattack -auto=aslongas(creature[green;attacking]|myBattlefield) -cantattack -auto=aslongas(creature[black;attacking]|myBattlefield) -cantattack +auto=aslongas(other creature[black;green;attacking]|myBattlefield) cantattack <1 text=Scarred Puma can't attack unless a black or green creature also attacks. mana={R} type=Creature @@ -92747,7 +92638,7 @@ toughness=4 [/card] [card] name=Scion Summoner -auto=token(Eldrazi scion) +auto=token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! text=Devoid (This card has no color.) -- When Scion Summoner enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {C} to your mana pool." ({C} represents colorless mana.) mana={2}{G} abilities=devoid @@ -93492,7 +93383,7 @@ toughness=1 [card] name=Scythe Leopard auto=@movedTo(land|myBattlefield):1/1 ueot -text=Landfall ? Whenever a land enters the battlefield under your control, Scythe Leopard gets +1/+1 until end of turn. +text=Landfall — Whenever a land enters the battlefield under your control, Scythe Leopard gets +1/+1 until end of turn. mana={G} type=Creature subtype=Cat @@ -93579,8 +93470,7 @@ type=Instant [/card] [card] name=Sea Monster -abilities=cantattack -auto=aslongas(island|opponentBattlefield) -cantattack +auto=aslongas(island|opponentBattlefield) cantattack <1 text=Sea Monster can't attack unless defending player controls an Island. mana={4}{U}{U} type=Creature @@ -93753,8 +93643,7 @@ type=Sorcery [/card] [card] name=Sealock Monster -abilities=cantattack -auto=aslongas(island|opponentBattlefield) -cantattack +auto=aslongas(island|opponentBattlefield) cantattack <1 auto=this(cantargetcard(*[-monstrous]) {5}{U}{U}:becomes(monstrous) forever && counter(1/1,3) && transforms((,newAbility[target(land|opponentbattlefield) becomes(island) forever])) forever text=Sealock Monster can't attack unless defending player controls an Island. -- {5}{U}{U}: Monstrosity 3. (If this creature isn't monstrous, put three +1/+1 counters on it and it becomes monstrous.) -- When Sealock Monster becomes monstrous, target land becomes an Island in addition to its other types. mana={3}{U}{U} @@ -94649,7 +94538,7 @@ name=Send to Sleep target=creature|battlefield auto=tap auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then frozen -text=Tap up to two target creatures. -- Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, those creatures don't untap during their controllers' next untap steps. +text=Tap up to two target creatures. -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, those creatures don't untap during their controllers' next untap steps. mana={1}{U} type=Instant [/card] @@ -94678,7 +94567,7 @@ toughness=2 [card] name=Sengir Nosferatu abilities=flying -auto={1}{B}{E}:token(Bat Token,Creature Bat,1/2,flying,black) && all(Bat Token) transforms((,newability[{1}{B}{S}:moverandom(Sengir Nosferatu) from(exile) to(mybattlefield)])) forever +auto={1}{B}{E}:token(Bat,Creature Bat,1/2,flying,black) and!( transforms((,newability[{1}{B}{S}:notatarget(Sengir Nosferatu|exile) moveto(mybattlefield)])) forever )! text=Flying -- {1}{B}, Exile Sengir Nosferatu: Put a 1/2 black Bat creature token with flying onto the battlefield. It has "{1}{B}, Sacrifice this creature: Return an exiled card named Sengir Nosferatu to the battlefield under its owner's control." mana={3}{B}{B} type=Creature @@ -94983,8 +94872,7 @@ type=Artifact [/card] [card] name=Serpent of the Endless Sea -abilities=cantattack -auto=aslongas(island|opponentBattlefield) -cantattack +auto=aslongas(island|opponentBattlefield) cantattack <1 anyzone=type:island:myBattlefield/type:island:myBattlefield cdaactive text=Serpent of the Endless Sea's power and toughness are each equal to the number of Islands you control. -- Serpent of the Endless Sea can't attack unless defending player controls an Island. mana={4}{U} @@ -95691,7 +95579,7 @@ name=Shaman of the Great Hunt abilities=haste auto=lord(creature|mybattlefield) transforms((,newability[@combatdamaged(player) from(this):counter(1/1.1) all(this)])) auto={2}{GU}{GU}:foreach(creature[power>=4]|mybattlefield) draw:1 -text=Haste -- Whenever a creature you control deals combat damage to a player, put a +1/+1 counter on it. -- Ferocious ? {2}{G/U}{G/U}: Draw a card for each creature you control with power 4 or greater. +text=Haste -- Whenever a creature you control deals combat damage to a player, put a +1/+1 counter on it. -- Ferocious — {2}{G/U}{G/U}: Draw a card for each creature you control with power 4 or greater. mana={3}{R} type=Creature subtype=Orc Shaman @@ -95712,7 +95600,7 @@ toughness=2 name=Shamanic Revelation auto=draw:type:creature:mybattlefield auto=foreach(creature[power>=4]|mybattlefield) life:4 -text=Draw a card for each creature you control. -- Ferocious ? You gain 4 life for each creature you control with power 4 or greater. +text=Draw a card for each creature you control. -- Ferocious — You gain 4 life for each creature you control with power 4 or greater. mana={3}{G}{G} type=Sorcery [/card] @@ -96370,7 +96258,7 @@ toughness=2 [card] name=Shimmer Myr abilities=flash -auto=lord(artifact|myhand) flash +auto=lord(artifact|myhand,mylibrary,mygraveyard,myexile) asflash text=Flash -- You may cast artifact cards as though they had flash. mana={3} type=Artifact Creature @@ -97399,7 +97287,7 @@ subtype=Arcane [/card] [card] name=Sifter of Skulls -auto=@movedto(other creature[-token]|graveyard) from(mybattlefield):token(Eldrazi scion) controller +auto=@movedto(other creature[-token]|graveyard) from(mybattlefield):token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! controller text=Devoid (This card has no color.) -- Whenever another nontoken creature you control dies, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {C} to your mana pool." ({C} represents colorless mana.) mana={3}{B} abilities=devoid @@ -97420,8 +97308,8 @@ type=Sorcery name=Sigarda, Heron's Grace abilities=flying, playershroud auto=lord(human|mybattlefield) hexproof -auto={2},{e(*|mygraveyard)}: token(Human Soldier,creature Human Soldier,1/1,white) -text=flying -- you and humans you control have hexproof -- {2}, exile a card from your graveyard: put a 1/1 white human soldier onto the battlefield +auto={2}{E(*|mygraveyard)}:token(Human Soldier,Creature Human Soldier,1/1,white) +text=Flying -- You and Humans you control have hexproof. -- {2}, Exile a card from your graveyard: Put a 1/1 white Human Soldier creature token onto the battlefield. mana={3}{G}{W} type=Legendary Creature subtype=Angel @@ -97605,8 +97493,7 @@ toughness=1 [/card] [card] name=Silburlind Snapper -abilities=cantattack -auto=@movedto(*[-creature]|mystack):-cantattack ueot +auto=this(variable{countmynoncrespell}<1) cantattack text=Silburlind Snapper can't attack unless you've cast a noncreature spell this turn. mana={5}{U} type=Creature @@ -97623,7 +97510,6 @@ type=Instant [/card] [card] name=Silent Artisan -text= mana={3}{W}{W} type=Creature subtype=Giant @@ -98721,13 +98607,20 @@ type=Instant name=Skin Invasion target=creature auto=mustattack -auto=@movedto(mytgt|ownergraveyard) from(ownerbattlefield):token(Skin Shedder,creature Insect Horror,3/4,red) controller +auto=@movedto(mytgt|graveyard) from(battlefield):all(this) transforms((,newability[moveto(mybattlefield)],newability[flip(Skin Shedder)])) forever text=Enchant creature -- Enchanted creature attacks each combat if able. -- When enchanted creature dies, return Skin Invasion to the battlefield transformed under your control. mana={R} type=Enchantment subtype=Aura [/card] [card] +name=Skin Shedder +type=Creature +subtype=Insect Horror +power=3 +toughness=4 +[/card] +[card] name=Skinbrand Goblin autohand={R}{discard}:name(bloodrush) target(creature[attacking]) 2/1 ueot text=Bloodrush — {R}, Discard Skinbrand Goblin: Target attacking creature gets +2/+1 until end of turn. @@ -98850,7 +98743,7 @@ toughness=1 [/card] [card] name=Skirk Ridge Exhumer -auto={B}{discard(*|myhand)}{T}:token(39905) +auto={B}{discard(*|myhand)}{T}:token(Festering Goblin) text={B}, {T}, Discard a card: Put a 1/1 black Zombie Goblin creature token named Festering Goblin onto the battlefield. It has "When Festering Goblin dies, target creature gets -1/-1 until end of turn." mana={1}{B} type=Creature @@ -98934,7 +98827,7 @@ toughness=3 [/card] [card] name=Skittering Invasion -auto=Token(-193507)*5 +auto=token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*5 text=Put five 0/1 colorless Eldrazi Spawn creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={7} type=Tribal Sorcery @@ -99247,7 +99140,7 @@ toughness=1 name=Skybind auto=(blink) target(*[-enchantment]) ueot auto=@movedTo(enchantment|myBattlefield):(blink) target(*[-enchantment]) ueot -text=Constellation ? Whenever Skybind or another enchantment enters the battlefield under your control, exile target nonenchantment permanent. Return that card to the battlefield under its owner's control at the beginning of the next end step. +text=Constellation — Whenever Skybind or another enchantment enters the battlefield under your control, exile target nonenchantment permanent. Return that card to the battlefield under its owner's control at the beginning of the next end step. mana={3}{W}{W} type=Enchantment [/card] @@ -99449,7 +99342,7 @@ type=Sorcery name=Skyrider Elf abilities=flying auto=counter(1/1,converge) -text=Flying -- Converge ? Skyrider Elf enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it. +text=Flying -- Converge — Skyrider Elf enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it. mana={X}{G}{U} type=Creature subtype=Elf Warrior Ally @@ -100131,8 +100024,7 @@ type=Land [/card] [card] name=Slipstream Eel -abilities=cantattack -auto=aslongas(island|opponentbattlefield) -cantattack +auto=aslongas(island|opponentbattlefield) cantattack <1 autohand=__CYCLING__({1}{U}) text=Slipstream Eel can't attack unless defending player controls an Island. -- Cycling {1}{U} ({1}{U}, Discard this card: Draw a card.) mana={5}{U}{U} @@ -100143,10 +100035,10 @@ toughness=6 [/card] [card] name=Slipstream Serpent -abilities=islandhome,cantattack +abilities=islandhome facedown={3} autofacedown={5}{U}:morph -auto=aslongas(island|opponentbattlefield) -cantattack +auto=aslongas(island|opponentbattlefield) cantattack <1 text=Slipstream Serpent can't attack unless defending player controls an Island. -- When you control no Islands, sacrifice Slipstream Serpent. -- Morph {5}{U} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) mana={7}{U} type=Creature @@ -100254,7 +100146,6 @@ toughness=1 [/card] [card] name=Sliver Construct -text= mana={3} type=Artifact Creature subtype=Sliver Construct @@ -100689,7 +100580,7 @@ toughness=2 [card] name=Snapping Gnarlid auto=@movedTo(land|myBattlefield):1/1 ueot -text=Landfall ? Whenever a land enters the battlefield under your control, Snapping Gnarlid gets +1/+1 until end of turn. +text=Landfall — Whenever a land enters the battlefield under your control, Snapping Gnarlid gets +1/+1 until end of turn. mana={1}{G} type=Creature subtype=Beast @@ -101565,8 +101456,8 @@ auto={C(0/0,-8,Loyalty)}:damage:8 target(creature,planeswalker) && life:8 contro auto={C(0/0,-9,Loyalty)}:damage:9 target(creature,planeswalker) && life:9 controller auto={C(0/0,-10,Loyalty)}:damage:10 target(creature,planeswalker) && life:10 controller auto={C(0/0,-15,Loyalty)}:damage:15 target(creature,planeswalker) && life:15 controller -auto={C(0/0,-9,Loyalty)}:token(Vampire Knight,creture Vampire Knight,1/1,black,lifelink)*highestlifetotal -text=+1: draw a card, your opponent loses life equal to its converted mana cost -- -X: Sorin, Grim Nemesis deals x damage to target creature or planeswalker and you gain x life -- -9: put a number of 1/1 black vampire knigt creature tokens with lifelink onto the battlefield equal to the highest life total among all players +auto={C(0/0,-9,Loyalty)}:token(Vampire Knight,Creature Vampire Knight,1/1,black,lifelink)*highestlifetotal +text=+1: Reveal the top card of your library and put that card into your hand. Each opponent loses life equal to its converted mana cost. -- -X: Sorin, Grim Nemesis deals X damage to target creature or planeswalker and you gain X life. -- -9: Put a number of 1/1 black Vampire Knight creature tokens with lifelink onto the battlefield equal to the highest life total among all players. mana={4}{W}{B} type=Planeswalker subtype=Sorin @@ -102281,7 +102172,7 @@ toughness=1 [/card] [card] name=Sparkspitter -auto={R}{T}{discard(*|myhand)}:token(73579) +auto={R}{T}{discard(*|myhand)}:token(Spark Elemental) text={R}, {T}, Discard a card: Put a 3/1 red Elemental creature token named Spark Elemental onto the battlefield. It has trample, haste, and "At the beginning of the end step, sacrifice Spark Elemental." mana={2}{R} type=Creature @@ -102342,7 +102233,7 @@ toughness=5 [card] name=Spawnbinder Mage auto={T(ally|myBattlefield)}{t}:target(creature) tap -text=Cohort ? {T}, Tap an untapped Ally you control: Tap target creature. +text=Cohort — {T}, Tap an untapped Ally you control: Tap target creature. mana={3}{W} type=Creature subtype=Human Wizard Ally @@ -102352,7 +102243,7 @@ toughness=4 [card] name=Spawning Bed auto={T}:add{1} -auto={6}{T}{S}:token(Eldrazi Scion)*3 +auto={6}{T}{S}:token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )!*3 text={T}: Add {1} to your mana pool. -- {6}, {T}, Sacrifice Spawning Bed: Put three 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." type=Land [/card] @@ -102360,7 +102251,7 @@ type=Land name=Spawning Breath target=creature,player auto=damage:1 -auto=Token(-193507) +auto=token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )! text=Spawning Breath deals 1 damage to target creature or player. -- Put a 0/1 colorless Eldrazi Spawn creature token with "Sacrifice this creature: Add {1} to your mana pool" onto the battlefield. mana={1}{R} type=Instant @@ -102385,7 +102276,7 @@ type=Land name=Spawnsire of Ulamog mana={10} auto=@combat(attacking) source(this):name(Annihilate) ability$!name(sacrifice a permanent) notatarget(<1>*|mybattlefield) sacrifice!$ opponent -auto={4}:token(-193507)*2 +auto={4}:token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*2 auto={20}:name(Cast Eldrazi's) ability$!castcard(named!:Emrakul, the Aeons Torn:!) _ castcard(named!:It That Betrays:!) _ castcard(named!:Ulamog, the Infinite Gyre:!) _ castcard(named!:Kozilek, Butcher of Truth:!) _ castcard(named!:Spawnsire of Ulamog:!) _ castcard(named!:Artisan of Kozilek:!) _ castcard(named!:Hand of Emrakul:!) _ castcard(named!:Ulamog's Crusher:!)!$ controller type=Creature subtype=Eldrazi @@ -102396,7 +102287,7 @@ text=Annihilator 1 (Whenever this creature attacks, defending player sacrifices [card] name=Spawnwrithe abilities=trample -auto=@combatdamaged(player) from(this):token(158687) +auto=@combatdamaged(player) from(this):token(Spawnwrithe) text=Trample -- Whenever Spawnwrithe deals combat damage to a player, put a token that's a copy of Spawnwrithe onto the battlefield. mana={2}{G} type=Creature @@ -103099,7 +102990,6 @@ toughness=2 [card] name=Spiked Jester abilities=haste -text= mana={B}{R} type=Creature subtype=Goblin Warrior @@ -103810,17 +103700,6 @@ power=2 toughness=2 [/card] [card] -name=Splinter Token -type=Creature -subtype=Splinter -abilities=flying -auto=cumulativeupcost[{G}] sacrifice -text=Flying -- Cumulative upkeep {G} -power=1 -toughness=1 -color=green -[/card] -[card] name=Splinter Twin target=creature auto=teach(creature) {T}:clone with(unearth,haste) @@ -103854,7 +103733,7 @@ type=Sorcery [/card] [card] name=Splintering Wind -auto={2}{G}:damage:1 target(creature) && token(-3148) +auto={2}{G}:damage:1 target(creature) && token(Splinter Token,Creature Splinter,1/1,green,flying) and!( transforms((,newability[cumulativeupcost[{G}] sacrifice])) forever )! auto=@movedTo(splinter token|nonbattlezone) from(mybattlefield):damage:1 all(creature) && damage:1 controller text={2}{G}: Splintering Wind deals 1 damage to target creature. Put a 1/1 green Splinter creature token onto the battlefield. It has flying and "Cumulative upkeep {G}." (At the beginning of its controller's upkeep, that player puts an age counter on it, then sacrifices it unless he or she pays its upkeep cost for each age counter on it.) -- Whenever a Splinter token leaves the battlefield, it deals 1 damage to you and each creature you control. mana={2}{G}{G} @@ -104117,7 +103996,7 @@ type=Instant [card] name=Sprouting Phytohydra abilities=defender -auto=@damaged(this):may token(111220) +auto=@damaged(this):may token(Sprouting Phytohydra) text=Defender (This creature can't attack.) -- Whenever Sprouting Phytohydra is dealt damage, you may put a token that's a copy of Sprouting Phytohydra onto the battlefield. mana={4}{G} type=Creature @@ -104779,8 +104658,9 @@ type=Instant [/card] [card] name=Startled Awake -auto=deplete:13 opponent -autograveyard={3}{U}{U}:moveto(mybattlefield) and!(flip(Persistant Nightmare) )! assorcery +target=opponent +auto=deplete:13 targetedplayer +autograveyard={3}{U}{U}:moveto(mybattlefield) and!(flip(Persistent Nightmare))! assorcery text=Target opponent puts the top thirteen cards of his or her library into his or her graveyard. -- {3}{U}{U}: Put Startled Awake from your graveyard onto the battlefield transformed. Activate this ability only any time you could cast a sorcery. mana={2}{U}{U} type=Sorcery @@ -104964,8 +104844,7 @@ toughness=3 [/card] [card] name=Steam Frigate -abilities=cantattack -auto=aslongas(island|opponentBattlefield) -cantattack +auto=aslongas(island|opponentBattlefield) cantattack <1 text=Steam Frigate can't attack unless defending player controls an Island. mana={2}{U} type=Creature @@ -105084,8 +104963,7 @@ toughness=4 [/card] [card] name=Steelclad Serpent -abilities=cantattack -auto=aslongas(artifact|myBattlefield) -cantattack >1 +auto=aslongas(other artifact|myBattlefield) cantattack <1 text=Steelclad Serpent can't attack unless you control another artifact. mana={5}{U} type=Artifact Creature @@ -105138,7 +105016,6 @@ type=Enchantment [card] name=Steeple Roc abilities=flying,first strike -text= mana={4}{W} type=Creature subtype=Bird @@ -105172,8 +105049,8 @@ type=Land [/card] [card] name=Stensia Masquerade -auto=lord(creature|mybattlefield) first strike -auto=@combatdamaged(player) from(vampire|mybattlefield): counter(1/1,1) all(trigger[to]) +auto=lord(creature[attacking]|mybattlefield) first strike +auto=@combatdamaged(player) from(vampire|mybattlefield): counter(1/1,1) all(trigger[from]) abilities=madness autoexile=restriction{discarded} pay({2}{r}) name(pay 2r to cast) activate name(pay 2r to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard) text=Attacking creatures you control have first strike. -- Whenever a Vampire you control deals combat damage to a player, put a +1/+1 counter on it. -- Madness {2}{R} (If you discard this card, discard it into exile. When you do, cast it for its madness cost or put it into your graveyard.) @@ -105422,7 +105299,7 @@ toughness=4 [/card] [card] name=Stitched Mangler -auto=target(creature) tap && frozen +auto=target(creature) freeze auto=tap(noevent) text=Stitched Mangler enters the battlefield tapped. -- When Stitched Mangler enters the battlefield, tap target creature an opponent controls. That creature doesn't untap during its controller's next untap step. mana={2}{U} @@ -105584,7 +105461,7 @@ toughness=2 [card] name=Stone Idol Trap autohand=affinity(creature[attacking]|battlefield) reduce({1}) -auto=token(-191552) +auto=token(Construct,Artifact Creature Construct,6/12,trample) and!( transforms((,newability[@next endofturn:moveTo(exile)])) forever )! text=Stone Idol Trap costs {1} less to cast for each attacking creature. -- Put a 6/12 colorless Construct artifact creature token with trample onto the battlefield. Exile it at the beginning of your next end step. mana={5}{R} type=Instant @@ -105662,7 +105539,7 @@ toughness=2 [card] name=Stoneforge Acolyte auto={t}{T(ally|myBattlefield)}:reveal:5 optionone name(Get Equipment) target(equipment|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<5>*|reveal) bottomoflibrary optiontwoend revealend -text=Cohort ? {T}, Tap an untapped Ally you control: Look at the top four cards of your library. You may reveal an Equipment card from among them and put it into your hand. Put the rest on the bottom of your library in any order. +text=Cohort — {T}, Tap an untapped Ally you control: Look at the top four cards of your library. You may reveal an Equipment card from among them and put it into your hand. Put the rest on the bottom of your library in any order. mana={W} type=Creature subtype=Kor Artificer Ally @@ -106388,7 +106265,7 @@ toughness=4 name=Strength from the Fallen auto=target(creature) type:creature:mygraveyard/type:creature:mygraveyard ueot auto=@movedTo(enchantment|myBattlefield):target(creature) type:creature:mygraveyard/type:creature:mygraveyard ueot -text=Constellation ? Whenever Strength from the Fallen or another enchantment enters the battlefield under your control, target creature gets +X/+X until end of turn, where X is the number of creature cards in your graveyard. +text=Constellation — Whenever Strength from the Fallen or another enchantment enters the battlefield under your control, target creature gets +X/+X until end of turn, where X is the number of creature cards in your graveyard. mana={1}{G} type=Enchantment [/card] @@ -106688,7 +106565,7 @@ type=Sorcery name=Stubborn Denial target=*[-creature]|stack auto=if type(creature[power>=4]|mybattlefield) then fizzle else transforms((,newability[pay[[{1}]] name(pay 1 mana) donothing?fizzle])) forever -text=Counter target noncreature spell unless its controller pays {1}. -- Ferocious ? If you control a creature with power 4 or greater, counter that spell instead. +text=Counter target noncreature spell unless its controller pays {1}. -- Ferocious — If you control a creature with power 4 or greater, counter that spell instead. mana={U} type=Instant [/card] @@ -107126,7 +107003,6 @@ toughness=2 [/card] [card] name=Summit Prowler -text= mana={2}{R}{R} type=Creature subtype=Yeti @@ -107909,7 +107785,7 @@ name=Survive the Night target=creature auto=1/0 auto=indestructible -auto=token(Clue) controller +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=Target creature gets +1/+0 and gains indestructible until end of turn. (Damage and effects that say "destroy" don't destroy it.) -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={2}{W} type=Instant @@ -108202,7 +108078,7 @@ other={1}{W} name(Spell Mastery) otherrestriction=type(*[instant;sorcery]|mygraveyard)~morethan~1 target=creature[tapped]|battlefield auto=destroy -text=Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, you may cast Swift Reckoning as though it had flash. (You may cast it any time you could cast an instant.) Destroy target tapped creature. +text=Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, you may cast Swift Reckoning as though it had flash. (You may cast it any time you could cast an instant.) Destroy target tapped creature. mana={1}{W} type=Sorcery [/card] @@ -108438,7 +108314,6 @@ type=Instant [/card] [card] name=Swordwise Centaur -text= mana={G}{G} type=Creature subtype=Centaur Warrior @@ -108966,7 +108841,7 @@ toughness=2 name=Tajuru Beastmaster auto=choice all(creature|mybattlefield) 1/1 ueot auto=@movedTo(ally|myBattlefield):all(creature|mybattlefield) 1/1 ueot -text=Rally ? Whenever Tajuru Beastmaster or another Ally enters the battlefield under your control, creatures you control get +1/+1 until end of turn. +text=Rally — Whenever Tajuru Beastmaster or another Ally enters the battlefield under your control, creatures you control get +1/+1 until end of turn. mana={5}{G} type=Creature subtype=Elf Warrior Ally @@ -108986,7 +108861,7 @@ toughness=4 [card] name=Tajuru Stalwart auto=counter(1/1,converge) -text=Converge ? Tajuru Stalwart enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it. +text=Converge — Tajuru Stalwart enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it. mana={2}{G} type=Creature subtype=Elf Scout Ally @@ -108997,7 +108872,7 @@ toughness=1 name=Tajuru Warcaller auto=choice all(creature|mybattlefield) 2/2 ueot auto=@movedTo(ally|myBattlefield):all(creature|mybattlefield) 2/2 ueot -text=Rally ? Whenever Tajuru Warcaller or another Ally enters the battlefield under your control, creatures you control get +2/+2 until end of turn. +text=Rally — Whenever Tajuru Warcaller or another Ally enters the battlefield under your control, creatures you control get +2/+2 until end of turn. mana={3}{G}{G} type=Creature subtype=Elf Warrior Ally @@ -109316,9 +109191,9 @@ subtype=Tamiyo [/card] [card] name=Tamiyo's Journal -auto=@upkeep:token(Clue) +auto=@upkeep:token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! auto={T}{S(clue|mybattlefield)}{S(clue|mybattlefield)}{S(clue|mybattlefield)}: moveto(myhand) target(*|mylibrary) -text=at the beginning of your upkeep, investigate -- {T}, sacrifice three clues: search your library for a card and put that card into your hand, then shuffle your library +text=At the beginning of your upkeep, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- {T}, Sacrifice three Clues: Search your library for a card and put that card into your hand. Then shuffle your library. mana={5} type=Legendary Artifact [/card] @@ -110757,7 +110632,7 @@ toughness=2 [card] name=Tethmos High Priest auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):moveTo(mybattlefield) target(creature[manacost<=2]|mygraveyard) -text=Heroic ? Whenever you cast a spell that targets Tethmos High Priest, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield. +text=Heroic — Whenever you cast a spell that targets Tethmos High Priest, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield. mana={2}{W} type=Creature subtype=Cat Cleric @@ -111052,7 +110927,7 @@ type=Sorcery name=Thassa's Devourer auto=deplete:2 target(player) auto=@movedTo(enchantment|myBattlefield):deplete:2 target(player) -text=Constellation ? Whenever Thassa's Devourer or another enchantment enters the battlefield under your control, target player puts the top two cards of his or her library into his or her graveyard. +text=Constellation — Whenever Thassa's Devourer or another enchantment enters the battlefield under your control, target player puts the top two cards of his or her library into his or her graveyard. mana={4}{U} type=Enchantment Creature subtype=Elemental @@ -111157,7 +111032,7 @@ abilities=deathtouch auto=upcost[{S(land|mybattlefield)}] sacrifice auto=maxPlay(land)+1 auto=@movedto(land|mygraveyard): draw:1 -text=deathtouch -- at the beggining of your upkeep, sacrifice The Gitrog Monster unless you sacrifice a land -- you may play an additional land on each of your turns -- whenever a land is put into a graveyard, draw a card +text=Deathtouch -- At the beginning of your upkeep, sacrifice The Gitrog Monster unless you sacrifice a land. -- You may play an additional land on each of your turns. -- Whenever one or more land cards are put into your graveyard from anywhere, draw a card. mana={3}{B}{G} type=Legendary Creature subtype=Frog Horror @@ -111879,7 +111754,7 @@ toughness=1 name=Thoughtrender Lamia auto=ability$!name(discard) target(*|myhand) reject!$ opponent auto=@movedTo(enchantment|myBattlefield):ability$!name(discard) target(*|myhand) reject!$ opponent -text=Constellation ? Whenever Thoughtrender Lamia or another enchantment enters the battlefield under your control, each opponent discards a card. +text=Constellation — Whenever Thoughtrender Lamia or another enchantment enters the battlefield under your control, each opponent discards a card. mana={4}{B}{B} type=Enchantment Creature subtype=Lamia @@ -111967,7 +111842,7 @@ toughness=2 [/card] [card] name=Thraben Inspector -auto=token(Clue) controller +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=When Thraben Inspector enters the battlefield, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={W} type=Creature @@ -113194,7 +113069,7 @@ toughness=3 [/card] [card] name=Tireless Tracker -auto=@movedto(land|mybattlefield):token(Clue) controller +auto=@movedto(land|mybattlefield):token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller auto=@sacrificed(clue|mybattlefield):counter(1/1,1) text=Whenever a land enters the battlefield under your control, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- Whenever you sacrifice a Clue, put a +1/+1 counter on Tireless Tracker. mana={2}{G} @@ -113342,6 +113217,16 @@ mana={1}{W} type=Instant [/card] [card] +name=To the Slaughter +target=player +auto=ifnot delirium then ability$!name(sacrifice) notatarget(creature,planeswalker|myBattlefield) sacrifice!$ targetedplayer +auto=if delirium then ability$!name(sacrifice) notatarget(creature|myBattlefield) sacrifice!$ targetedplayer +auto=if delirium then ability$!name(sacrifice) notatarget(planeswalker|myBattlefield) sacrifice!$ targetedplayer +text=Target player sacrifices a creature or planeswalker. -- Delirium — If there are four or more card types among cards in your graveyard, instead that player sacrifices a creature and a planeswalker. +mana={2}{B} +type=Instant +[/card] +[card] name=Tobias Andrion mana={3}{W}{U} type=Legendary Creature @@ -113556,7 +113441,7 @@ type=Sorcery [card] name=Tooth Collector auto=target(creature|opponentbattlefield) -1/-1 ueot -auto==@each opponent upkeep restriction{delirium}:target(creature|opponentbattlefield) -1/-1 ueot +auto=@each opponent upkeep restriction{delirium}:target(creature|opponentbattlefield) -1/-1 ueot text=When Tooth Collector enters the battlefield, target creature an opponent controls gets -1/-1 until end of turn. -- Delirium At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, target creature that player controls gets -1/-1 until end of turn. mana={2}{B} type=Creature @@ -114139,7 +114024,7 @@ toughness=4 [/card] [card] name=Town Gossipmonger -auto={T}{t(creature|mybattlefield)}:flip(Incited Rabble) +auto={T}{T(other creature|mybattlefield)}:flip(Incited Rabble) text={T}, Tap an untapped creature you control: Transform Town Gossipmonger. mana={W} type=Creature @@ -114296,7 +114181,7 @@ type=Instant [/card] [card] name=Trail of Evidence -auto=@movedto(instant,sorcery|mystack):token(Clue) controller +auto=@movedto(instant,sorcery|mystack):token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=Whenever you cast an instant or sorcery spell, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={2}{U} type=Enchantment @@ -114385,9 +114270,8 @@ toughness=1 [/card] [card] name=Training Drone -abilities=cantattack,cantblock -auto=this(gear > 0) -cantattack -auto=this(gear > 0) -cantblock +auto=this(gear < 1) cantattack +auto=this(gear < 1) cantblock text=Training Drone can't attack or block unless it's equipped. mana={3} type=Artifact Creature @@ -114688,7 +114572,6 @@ subtype=Aura [/card] [card] name=Traveling Philosopher -text= mana={1}{W} type=Creature subtype=Human Advisor @@ -115362,7 +115245,7 @@ toughness=1 [card] name=Triton Cavalry auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):may moveTo(ownerhand) target(enchantment|battlefield) -text=Heroic ? Whenever you cast a spell that targets Triton Cavalry, you may return target enchantment to its owner's hand. +text=Heroic — Whenever you cast a spell that targets Triton Cavalry, you may return target enchantment to its owner's hand. mana={3}{U} type=Creature subtype=Merfolk Soldier @@ -115391,7 +115274,6 @@ toughness=1 [/card] [card] name=Triton Shorethief -text= mana={U} type=Creature subtype=Merfolk Rogue @@ -115829,7 +115711,7 @@ type=Instant [card] name=Tunneling Geopede auto=@movedTo(land|myBattlefield):damage:1 all(opponent) -text=Landfall ? Whenever a land enters the battlefield under your control, Tunneling Geopede deals 1 damage to each opponent. +text=Landfall — Whenever a land enters the battlefield under your control, Tunneling Geopede deals 1 damage to each opponent. mana={2}{R} type=Creature subtype=Insect @@ -115942,7 +115824,6 @@ toughness=4 [/card] [card] name=Tusked Colossodon -text= mana={4}{G}{G} type=Creature subtype=Beast @@ -116429,7 +116310,7 @@ toughness=* [/card] [card] name=Ulvenwald Mysteries -auto=@movedto(creature[-token]|mygraveyard):token(Clue) controller +auto=@movedto(creature[-token]|mygraveyard):token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller auto=@sacrificed(clue|mybattlefield):token(Human Soldier,creature Human Soldier,1/1,white) text=Whenever a nontoken creature you control dies, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- Whenever you sacrifice a Clue, put a 1/1 white Human Soldier creature token onto the battlefield. mana={2}{G} @@ -116763,7 +116644,7 @@ subtype=Island Swamp name=Undergrowth Champion auto=this(counter{1/1.1}>0) phantom auto=@movedTo(land|myBattlefield):counter(1/1,1) -text=If damage would be dealt to Undergrowth Champion while it has a +1/+1 counter on it, prevent that damage and remove a +1/+1 counter from Undergrowth Champion. -- Landfall ? Whenever a land enters the battlefield under your control, put a +1/+1 counter on Undergrowth Champion. +text=If damage would be dealt to Undergrowth Champion while it has a +1/+1 counter on it, prevent that damage and remove a +1/+1 counter from Undergrowth Champion. -- Landfall — Whenever a land enters the battlefield under your control, put a +1/+1 counter on Undergrowth Champion. mana={1}{G}{G} type=Creature subtype=Elemental @@ -116820,7 +116701,7 @@ name=Underworld Coinsmith auto=life:1 auto=@movedTo(enchantment|myBattlefield):life:1 auto={W}{B}{L}:life:-1 opponent -text=Constellation ? Whenever Underworld Coinsmith or another enchantment enters the battlefield under your control, you gain 1 life. -- {W}{B}, Pay 1 life: Each opponent loses 1 life. +text=Constellation — Whenever Underworld Coinsmith or another enchantment enters the battlefield under your control, you gain 1 life. -- {W}{B}, Pay 1 life: Each opponent loses 1 life. mana={W}{B} type=Enchantment Creature subtype=Human Cleric @@ -116991,7 +116872,7 @@ name=Unholy Hunger target=creature auto=destroy auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then life:2 srccontroller -text=Destroy target creature. -- Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, you gain 2 life. +text=Destroy target creature. -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, you gain 2 life. mana={3}{B}{B} type=Instant [/card] @@ -117007,7 +116888,7 @@ subtype=Aura [card] name=Unified Front auto=token(Kor Ally,Creature Kor Ally,1/1,white)*converge -text=Converge ? Put a 1/1 white Kor Ally creature token onto the battlefield for each color of mana spent to cast Unified Front. +text=Converge — Put a 1/1 white Kor Ally creature token onto the battlefield for each color of mana spent to cast Unified Front. mana={3}{W} type=Sorcery [/card] @@ -117038,7 +116919,7 @@ toughness=3 [/card] [card] name=Uninvited Geist -auto=cantbeblockedby(creature[power>2]) +abilities=skulk auto=@combatdamaged(player) from(this):flip(Unimpeded Trespasser) text=Skulk (This creature can't be blocked by creatures with greater power.) -- When Uninvited Geist deals combat damage to a player, transform it. mana={2}{U} @@ -117426,7 +117307,7 @@ type=Enchantment [/card] [card] name=Urabrask the Hidden -auto=emblem transforms((,newability[aslongas(Urabrask the Hidden|mybattlefield) lord(creature|mybattlefield) haste >0])) ueot +auto=lord(creature|mybattlefield) haste auto=lord(creature|opponentbattlefield) transforms((,newability[tap(noevent)])) text=Creatures you control have Haste. -- Creatures your opponents control enter the battlefield tapped. mana={3}{R}{R} @@ -117892,7 +117773,7 @@ toughness=3 [card] name=Valakut Predator auto=@movedTo(land|myBattlefield):2/2 ueot -text=Landfall ? Whenever a land enters the battlefield under your control, Valakut Predator gets +2/+2 until end of turn. +text=Landfall — Whenever a land enters the battlefield under your control, Valakut Predator gets +2/+2 until end of turn. mana={2}{R} type=Creature subtype=Elemental @@ -117986,7 +117867,7 @@ name=Valorous Stance target=creature auto=choice name(indestructible) indestructible ueot auto=if cantargetcard(creature[power>=4]|battlefield) then choice name(Destroy) destroy -text=Choose one ? Target creature gains indestructible until end of turn. - Destroy target creature with toughness 4 or greater. +text=Choose one — Target creature gains indestructible until end of turn. - Destroy target creature with toughness 4 or greater. mana={1}{W} type=Instant [/card] @@ -118595,7 +118476,7 @@ toughness=2 [/card] [card] name=Vedalken Orrery -auto=lord(*[-land]|myhand) flash +auto=lord(*[-land]|myhand,mylibrary,mygraveyard,myexile) asflash text=You may cast nonland cards as though they had flash. mana={4} type=Artifact @@ -118646,9 +118527,8 @@ type=Enchantment [/card] [card] name=Veiled Serpent -abilities=cantattack autohand=__CYCLING__({2}) -auto=aslongas(island|opponentbattlefield) -cantattack +auto=aslongas(island|opponentbattlefield) cantattack <1 auto=@movedto(*|opponentstack) once:transforms((removetypes)) forever && transforms((Serpent Creature,setpower=4,settoughness=4)) forever text=When an opponent casts a spell, if Veiled Serpent is an enchantment, Veiled Serpent becomes a 4/4 Serpent creature that can't attack unless defending player controls an Island. -- Cycling {2} ({2}, Discard this card: Draw a card.) mana={2}{U} @@ -119098,10 +118978,7 @@ type=Enchantment [/card] [card] name=Vernal Equinox -auto=lord(creature|myhand) flash -auto=lord(creature|opponenthand) flash -auto=lord(enchantment|myhand) flash -auto=lord(enchantment|opponenthand) flash +auto=lord(*[creature;enchantment]|hand,library,graveyard,exile) asflash text=Any player may play creature and enchantment cards as though they had flash. mana={3}{G} type=Enchantment @@ -119161,7 +119038,7 @@ type=Enchantment [/card] [card] name=Vessel of Malignity -auto={1}{B}{s}:target(opponent) ability$! moveto(exile) target(*|myhand)!$ targetedplayer assorcery +auto={1}{B}{s}:name(exile from hand) target(opponent) ability$! moveto(exile) target(*|myhand)!$ targetedplayer assorcery text={1}{B}, Sacrifice Vessel of Malignity: Target opponent exiles two cards from his or her hand. Activate this ability only any time you could cast a sorcery. mana={1}{B} type=Enchantment @@ -119843,7 +119720,7 @@ type=Instant [card] name=Vile Redeemer abilities=flash -auto=pay({c}) foreach(creature[fresh]|mygraveyard) token(Eldrazi scion) +auto=pay({c}) foreach(creature[fresh]|mygraveyard) token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! text=Devoid (This card has no color.) -- Flash -- When you cast Vile Redeemer, you may pay {C}. If you do, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield for each nontoken creature that died under your control this turn. Those tokens have "Sacrifice this creature: Add {C} to your mana pool." mana={2}{G} abilities=devoid @@ -119904,6 +119781,17 @@ power=1 toughness=1 [/card] [card] +name=Village Messenger +abilities=haste +auto=@each upkeep restriction{lastturn(*|stack)~lessthan~1}:flip(Moonrise Intruder) +text=Haste -- At the beginning of each upkeep, if no spells were cast last turn, transform Village Messenger. +mana={R} +type=Creature +subtype=Human Werewolf +power=1 +toughness=1 +[/card] +[card] name=Village Survivors abilities=vigilance auto=this(controllerlife < 6) lord(other creature|mybattlefield) vigilance @@ -120640,10 +120528,9 @@ toughness=1 [/card] [card] name=Vodalian Serpent -abilities=cantattack kicker={2} auto=kicker counter(1/1,4) -auto=aslongas(island|opponentBattlefield) -cantattack +auto=aslongas(island|opponentBattlefield) cantattack <1 text=Kicker {2} (You may pay an additional {2} as you cast this spell.) -- Vodalian Serpent can't attack unless defending player controls an Island. -- If Vodalian Serpent was kicked, it enters the battlefield with four +1/+1 counters on it. mana={3}{U} type=Creature @@ -120787,7 +120674,7 @@ type=Sorcery [card] name=Void Attendant abilities=devoid -auto={1}{G}{s2g(*|opponentexile)}:token(Eldrazi Scion) +auto={1}{G}{s2g(*|opponentexile)}:token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! text=Devoid (This card has no color.) -- {1}{G}, Put a card an opponent owns from exile into that player's graveyard: Put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {C} to your mana pool." mana={2}{G} type=Creature @@ -122722,9 +122609,9 @@ type=Enchantment [/card] [card] name=Warped Landscape -auto={T}:Add{1} -auto={2}{T}{s}:moveto(mybattlefield) target(basic|mylibrary) and!(tap(noevent))! -text={T}: Add {1} to your mana pool. -- {2}, {T}, Sacrifice Warped Landscape: Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library. +auto={T}:Add{C} +auto={2}{T}{S}:moveto(mybattlefield) target(basic|mylibrary) and!(tap(noevent))! +text={T}: Add {C} to your mana pool. -- {2}, {T}, Sacrifice Warped Landscape: Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library. type=Land [/card] [card] @@ -123121,7 +123008,7 @@ type=Sorcery [card] name=Wavecrash Triton auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):target(creature|opponentbattlefield) transforms((,newability[tap],newability[frozen])) oneshot -text=Heroic ? Whenever you cast a spell that targets Wavecrash Triton, tap target creature an opponent controls. That creature doesn't untap during its controller's next untap step. +text=Heroic — Whenever you cast a spell that targets Wavecrash Triton, tap target creature an opponent controls. That creature doesn't untap during its controller's next untap step. mana={2}{U} type=Creature subtype=Merfolk Wizard @@ -123151,7 +123038,7 @@ toughness=4 name=Wave-Wing Elemental abilities=flying auto=@movedTo(land|myBattlefield):2/2 ueot -text=Flying -- Landfall ? Whenever a land enters the battlefield under your control, Wave-Wing Elemental gets +2/+2 until end of turn. +text=Flying -- Landfall — Whenever a land enters the battlefield under your control, Wave-Wing Elemental gets +2/+2 until end of turn. mana={5}{U} type=Creature subtype=Elemental @@ -123241,8 +123128,7 @@ toughness=4 [/card] [card] name=Wayward Disciple -auto=@movedto(creature|mygraveyard):life:1 controller -auto=@movedto(creature|mygraveyard):life:-1 opponent +auto=@movedto(creature|mygraveyard):target(opponent) life:-1 && life:1 controller text=Whenever Wayward Disciple or another creature you control dies, target opponent loses 1 life and you gain 1 life. type=Creature subtype=Human Cleric @@ -123484,7 +123370,7 @@ toughness=1 [/card] [card] name=Weirding Wood -auto=token(Clue) controller +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller auto=teach(land) {T}:add{G}{G} auto=teach(land) {T}:add{W}{W} auto=teach(land) {T}:add{U}{U} @@ -123626,7 +123512,7 @@ toughness=3 [card] name=Westvale Abbey auto={T}:Add{1} -auto={5}{T}{L}:token(Human Cleric,creature Human Cleric,1/1,white,black +auto={5}{T}{L}:token(Human Cleric,creature Human Cleric,1/1,white,black) auto={5}{T}{S(creature|mybattlefield)}{S(creature|mybattlefield)}{S(creature|mybattlefield)}{S(creature|mybattlefield)}{S(creature|mybattlefield)}:flip(Ormendahl, Profane Prince) text={T}: Add {1} to your mana pool. -- {5}, {T}, Pay 1 life: Put a 1/1 white and black Human Cleric creature token onto the battlefield. -- {5}, {T}, Sacrifice five creatures: Transform Westvale Abbey, then untap it. type=Land @@ -123644,7 +123530,6 @@ toughness=* [/card] [card] name=Wetland Sambar -text= mana={1}{U} type=Creature subtype=Elk @@ -123727,8 +123612,7 @@ type=Artifact [/card] [card] name=Whimwader -abilities=cantattack -auto=aslongas(*[blue]|opponentBattlefield) -cantattack +auto=aslongas(*[blue]|opponentBattlefield) cantattack <1 text=Whimwader can't attack unless defending player controls a blue permanent. mana={4}{U} type=Creature @@ -124070,7 +123954,7 @@ type=Instant name=Whitewater Naiads auto=unblockable target(creature) ueot auto=@movedTo(enchantment|myBattlefield):unblockable target(creature) ueot -text=Constellation ? Whenever Whitewater Naiads or another enchantment enters the battlefield under your control, target creature can't be blocked this turn. +text=Constellation — Whenever Whitewater Naiads or another enchantment enters the battlefield under your control, target creature can't be blocked this turn. mana={3}{U}{U} type=Enchantment Creature subtype=Nymph @@ -124687,7 +124571,7 @@ type=Sorcery [card] name=Winding Canyons auto={T}:Add{1} -auto={2}{T}:all(creature|myhand) transforms((,newability[flash ueot])) +auto={2}{T}:name(flash) emblem transforms((,newability[lord(creature|myhand,mylibrary,mygraveyard,myexile) asflash])) ueot text={T}: Add {1} to your mana pool. -- {2}, {T}: Until end of turn, you may play creature cards as though they had flash. type=Land [/card] @@ -124748,6 +124632,17 @@ power=2 toughness=2 [/card] [card] +name=Windrider Patrol +abilities=flying +auto=@combatdamaged(player) from(this):name(scry) scry:2 scrycore delayed dontshow donothing scrycoreend scryend +text=Flying -- Whenever Windrider Patrol deals combat damage to a player, scry 2. (Look at the top two cards of your library, then put any number of them on the bottom of your library and the rest on top in any order.) +mana={3}{U}{U} +type=Creature +subtype=Merfolk Wizard +power=4 +toughness=3 +[/card] +[card] name=Winds of Change auto=all(*|myhand) transforms((,newability[draw:1],newability[moveTo(mylibrary) and!(shuffle)!])) auto=all(*|opponenthand) transforms((,newability[draw:1],newability[moveTo(mylibrary) and!(shuffle)!])) @@ -125232,7 +125127,6 @@ toughness=1 [/card] [card] name=Witch's Familiar -text= mana={2}{B} type=Creature subtype=Zombie Minotaur @@ -125454,7 +125348,7 @@ type=Instant [/card] [card] name=Wolf of Devil's Breach -auto=this(attacking) {1}{R}{discard(*|myhand)}:damage:manacost +auto=this(attacking) {1}{R}{discard(*|myhand)}:damage:storedmanacost target(creature,planeswalker) text=Whenever Wolf of Devil's Breach attacks, you may pay {1}{R} and discard a card. If you do, Wolf of Devil's Breach deals damage to target creature or planeswalker equal to the discarded card's converted mana cost. mana={3}{R}{R} type=Creature @@ -125727,7 +125621,7 @@ type=Land name=Woodland Wanderer abilities=vigilance,trample auto=counter(1/1,converge) -text=Vigilance, trample -- Converge ? Woodland Wanderer enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it. +text=Vigilance, trample -- Converge — Woodland Wanderer enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it. mana={3}{G} type=Creature subtype=Elemental @@ -126309,8 +126203,7 @@ toughness=1 [/card] [card] name=Wu Warship -abilities=cantattack -auto=aslongas(island|opponentBattlefield) -cantattack +auto=aslongas(island|opponentBattlefield) cantattack <1 text=Wu Warship can't attack unless defending player controls an Island. mana={2}{U} type=Creature @@ -126453,18 +126346,9 @@ power=3 toughness=6 [/card] [card] -name=Xathrid Necromancer Zombie -type=Creature -subtype=Zombie -auto=tap(noevent) -power=2 -toughness=2 -color=black -[/card] -[card] name=Xathrid Necromancer -autograveyard=@movedTo(this|graveyard) from(mybattlefield):token(Xathrid Necromancer Zombie) controller -auto=@movedTo(other human|graveyard) from(mybattlefield):token(Xathrid Necromancer Zombie) controller +autograveyard=@movedTo(this|graveyard) from(mybattlefield):token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )! controller +auto=@movedTo(other human|graveyard) from(mybattlefield):token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )! controller text=Whenever Xathrid Necromancer or another Human creature you control dies, put a 2/2 black Zombie creature token onto the battlefield tapped. mana={2}{B} type=Creature @@ -126778,7 +126662,7 @@ toughness=2 [/card] [card] name=Yeva, Nature's Herald -auto=lord(creature[green]|myhand) flash +auto=lord(creature[green]|myhand,mylibrary,mygraveyard,myexile) asflash abilities=flash text=Flash (You may cast this spell any time you could cast an instant.) -- You may cast green creature cards as though they had flash. mana={2}{G}{G} @@ -126828,7 +126712,6 @@ subtype=Aura [/card] [card] name=Yoked Ox -text= mana={W} type=Creature subtype=Ox @@ -126972,7 +126855,7 @@ toughness=5 name=Zada's Commando abilities=first strike auto={T(ally|myBattlefield)}{t}:damage:1 target(opponent) -text=First strike -- Cohort ? {T}, Tap an untapped Ally you control: Zada's Commando deals 1 damage to target opponent. +text=First strike -- Cohort — {T}, Tap an untapped Ally you control: Zada's Commando deals 1 damage to target opponent. mana={1}{R} type=Creature subtype=Goblin Archer Ally @@ -127297,8 +127180,7 @@ toughness=3 [/card] [card] name=Zhou Yu, Chief Commander -abilities=cantattack -auto=aslongas(island|opponentBattlefield) -cantattack +auto=aslongas(island|opponentBattlefield) cantattack <1 text=Zhou Yu, Chief Commander can't attack unless defending player controls an Island. mana={5}{U}{U} type=Legendary Creature @@ -127615,15 +127497,6 @@ power=2 toughness=2 [/card] [card] -name=Zombie Token -type=Creature -subtype=Zombie -auto=tap(noevent) -power=2 -toughness=2 -color=black -[/card] -[card] name=Zombie Trailblazer auto={T(zombie|mybattlefield)}:ueot name(land becomes a swamp) loseabilities && losesubtypesof(land) && transforms((swamp)) target(land) auto={T(zombie|mybattlefield)}:swampwalk target(creature) @@ -127685,7 +127558,7 @@ toughness=3 [card] name=Zulaport Chainmage auto={T(ally|myBattlefield)}{t}:target(opponent) life:-2 -text=Cohort ? {T}, Tap an untapped Ally you control: Target opponent loses 2 life. +text=Cohort — {T}, Tap an untapped Ally you control: Target opponent loses 2 life. mana={3}{B} type=Creature subtype=Human Shaman Ally diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 139f9e9c8..37fe8f4e7 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -551,6 +551,18 @@ private: intValue +=1; } } + else if (s == "countallspell") + { + intValue = card->controller()->game->stack->seenThisTurn("*", Constants::CAST_ALL) + card->controller()->opponent()->game->stack->seenThisTurn("*", Constants::CAST_ALL); + } + else if (s == "countmycrespell") + { + intValue = card->controller()->game->stack->seenThisTurn("creature", Constants::CAST_ALL); + } + else if (s == "countmynoncrespell") + { + intValue = card->controller()->game->stack->seenThisTurn("*[-creature]", Constants::CAST_ALL); + } else if (s == "evictg") { intValue = card->imprintG; @@ -678,6 +690,14 @@ private: { intValue = target->controller()->opponent()->damageCount; } + else if (s == "pdnoncount") + { + intValue = target->controller()->nonCombatDamage; + } + else if (s == "odnoncount") + { + intValue = target->controller()->opponent()->nonCombatDamage; + } else if (s == "playerpoisoncount") { intValue = target->controller()->poisonCount; @@ -883,19 +903,29 @@ private: } else if (s == "gravecardtypes")//Tarmogoyf { - for (int i = 0; i < 2; i++) + intValue = 0; + int pc = 0, tc = 0, sc = 0, lc = 0, ic = 0, ec = 0, cc = 0, ac = 0; + for (int j = 0; j < 2; j++) { - MTGGameZone * checkZone = card->getObserver()->players[i]->game->graveyard; - intValue = - cardHasTypeinZone("planeswalker",checkZone) + - cardHasTypeinZone("tribal",checkZone) + - cardHasTypeinZone("sorcery",checkZone) + - cardHasTypeinZone("land",checkZone) + - cardHasTypeinZone("instant",checkZone) + - cardHasTypeinZone("enchantment",checkZone) + - cardHasTypeinZone("creature",checkZone) + - cardHasTypeinZone("artifact",checkZone); + MTGGameZone * checkZone = card->getObserver()->players[j]->game->graveyard; + if(cardHasTypeinZone("planeswalker",checkZone)) + pc = 1; + if(cardHasTypeinZone("tribal",checkZone)) + tc = 1; + if(cardHasTypeinZone("sorcery",checkZone)) + sc = 1; + if(cardHasTypeinZone("land",checkZone)) + lc = 1; + if(cardHasTypeinZone("instant",checkZone)) + ic = 1; + if(cardHasTypeinZone("enchantment",checkZone)) + ec = 1; + if(cardHasTypeinZone("creature",checkZone)) + cc = 1; + if(cardHasTypeinZone("artifact",checkZone)) + ac = 1; } + intValue = pc+tc+sc+lc+ic+ec+cc+ac; } else if (s == "powertotalinplay")//Count Total Power of Creatures you control... Formidable { @@ -1113,10 +1143,13 @@ public: TargetChooser * toTcCard, *fromTcCard; bool sourceUntapped; bool isSuspended; + bool limitOnceATurn; + int triggeredTurn; TrCardAddedToZone(GameObserver* observer, int id, MTGCardInstance * source, TargetZoneChooser * toTcZone, TargetChooser * toTcCard, - TargetZoneChooser * fromTcZone = NULL, TargetChooser * fromTcCard = NULL,bool once = false,bool sourceUntapped = false,bool isSuspended = false) : - Trigger(observer, id, source, once), toTcZone(toTcZone), fromTcZone(fromTcZone), toTcCard(toTcCard), fromTcCard(fromTcCard),sourceUntapped(sourceUntapped),isSuspended(isSuspended) + TargetZoneChooser * fromTcZone = NULL, TargetChooser * fromTcCard = NULL,bool once = false,bool sourceUntapped = false,bool isSuspended = false, bool limitOnceATurn = false) : + Trigger(observer, id, source, once), toTcZone(toTcZone), fromTcZone(fromTcZone), toTcCard(toTcCard), fromTcCard(fromTcCard),sourceUntapped(sourceUntapped),isSuspended(isSuspended),limitOnceATurn(limitOnceATurn) { + triggeredTurn = -1; }; @@ -1126,6 +1159,8 @@ public: if (!e) return 0; if(sourceUntapped && source->isTapped() == 1) return 0; + if (limitOnceATurn && triggeredTurn == game->turn) + return 0; if(isSuspended && !source->suspended) return 0; if (!toTcZone->targetsZone(e->to)) return 0; @@ -1140,7 +1175,7 @@ public: { return 0; } - + triggeredTurn = game->turn; return 1; } @@ -1210,6 +1245,28 @@ public: } }; +class TrCardTransformed: public Trigger +{ +public: + TrCardTransformed(GameObserver* observer, int id, MTGCardInstance * source, TargetChooser * tc, bool once = false) : + Trigger(observer, id, source, once, tc) + { + } + + int triggerOnEventImpl(WEvent * event) + { + WEventCardTransforms * e = dynamic_cast (event); + if (!e) return 0; + if (!tc->canTarget(e->card)) return 0; + return 1; + } + + TrCardTransformed * clone() const + { + return NEW TrCardTransformed(*this); + } +}; + class TrCombatTrigger: public Trigger { public: @@ -1891,6 +1948,7 @@ public: class AACopier: public ActivatedAbility { public: + MTGAbility * andAbility; AACopier(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target = NULL, ManaCost * _cost = NULL); int resolve(); const string getMenuText(); @@ -2211,7 +2269,12 @@ public: assert(modifier < 2); ((MTGCardInstance *) target)->basicAbilities.set(ability, modifier > 0); - + //---add or subtract so we can keep track - for future use + ((MTGCardInstance *) target)->modbasicAbilities[ability] += modifier; + //---make sure no negative values + if(((MTGCardInstance *) target)->modbasicAbilities[ability] < 0) + ((MTGCardInstance *) target)->modbasicAbilities[ability] = 0; + //---end add or subtract abilities return MTGAbility::addToGame(); } @@ -2262,7 +2325,7 @@ public: assert(value < 2); _target->basicAbilities.set(ability, value > 0); - _target->modifiedbAbi += 1; + return InstantAbility::addToGame(); } @@ -2275,10 +2338,7 @@ public: { MTGCardInstance * _target = (MTGCardInstance *) target; if (_target) - { _target->basicAbilities.set(ability, stateBeforeActivation); - _target->modifiedbAbi -= 1; - } return 1; } @@ -3522,7 +3582,9 @@ public: bool battleReady; MTGCardInstance * myToken; vector currentAbilities; + MTGAbility * andAbility; Player * tokenReciever; + string cID; //by id ATokenCreator(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable *, ManaCost * _cost, int tokenId,string starfound, WParsedInt * multiplier = NULL, int who = 0,bool aLivingWeapon = false) : @@ -3532,6 +3594,8 @@ public: MTGCard * card = MTGCollection()->getCardById(tokenId); if (card) name = card->data->getName(); battleReady = false; + andAbility = NULL; + cID = ""; } //by name, card still require valid card.dat info, this just makes the primitive code far more readable. token(Eldrazi scion) instead of token(-1234234)... ATokenCreator(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable *, ManaCost * _cost, string cardName, string starfound, WParsedInt * multiplier = NULL, @@ -3543,10 +3607,12 @@ public: tokenId = card->getId(); if (card) name = card->data->getName(); battleReady = false; + andAbility = NULL; + cID = ""; } //by construction ATokenCreator(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable *, ManaCost * _cost, string sname, string stypes, int _power, int _toughness, - string sabilities, string starfound,WParsedInt * multiplier = NULL, int _who = 0,bool aLivingWeapon = false,string spt = "") : + string sabilities, string starfound,WParsedInt * multiplier = NULL, int _who = 0,bool aLivingWeapon = false,string spt = "", string tnum = "") : ActivatedAbility(observer, _id, _source, _cost, 0),sabilities(sabilities),starfound(starfound), multiplier(multiplier), who(_who),aLivingWeapon(aLivingWeapon),spt(spt) { power = _power; @@ -3555,6 +3621,8 @@ public: tokenId = 0; aType = MTGAbility::STANDARD_TOKENCREATOR; battleReady = false; + andAbility = NULL; + cID = tnum; if (!multiplier) this->multiplier = NEW WParsedInt(1); //TODO this is a copy/past of other code that's all around the place, everything should be in a dedicated parser class; @@ -3641,6 +3709,16 @@ public: else { myToken = NEW Token(name, source, power, toughness); + if(!cID.empty()) + { + string customId = ""; + ostringstream tokID; + tokID << abs(myToken->getId()); + customId.append(""+tokID.str()+cID); + customId = cReplaceString(customId," ",""); + WParsedInt newID(customId, NULL, source); + myToken->setMTGId(-newID.getValue()); + } list::iterator it; for (it = types.begin(); it != types.end(); it++) { @@ -3683,6 +3761,23 @@ public: { battleReadyToken(spell->source); } + //andability + if(andAbility) + { + //backup andAbility for copier and cloner + spell->source->TokenAndAbility = andAbility->clone(); + MTGAbility * andAbilityClone = andAbility->clone(); + andAbilityClone->target = spell->source; + if(andAbility->oneShot) + { + andAbilityClone->resolve(); + SAFE_DELETE(andAbilityClone); + } + else + { + andAbilityClone->addToGame(); + } + } delete spell; } return 1; @@ -4499,7 +4594,8 @@ public: vector currentAbilities; string flipStats; bool isflipcard; - AAFlip(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target,string flipStats, bool isflipcard = false); + bool forcedcopy; + AAFlip(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target,string flipStats, bool isflipcard = false, bool forcedcopy = false); int resolve(); int testDestroy(); const string getMenuText(); diff --git a/projects/mtg/include/CardGui.h b/projects/mtg/include/CardGui.h index 0060d79db..ab73fb6c4 100644 --- a/projects/mtg/include/CardGui.h +++ b/projects/mtg/include/CardGui.h @@ -33,10 +33,10 @@ protected: /* ** Tries to render the Big version of a card picture, backups to text version in case of failure */ - static void RenderBig(MTGCard * card, const Pos& pos, bool thumb = false, bool noborder = false, bool smallerscale = false); + static void RenderBig(MTGCard * card, const Pos& pos, bool thumb = false, bool noborder = false, bool smallerscale = false, bool ingame = false); static void RenderCountersBig(MTGCard * card, const Pos& pos, int drawMode = DrawMode::kNormal); - static void AlternateRender(MTGCard * card, const Pos& pos); + static void AlternateRender(MTGCard * card, const Pos& pos, bool noborder = false, bool smallerscale = false); static void TinyCropRender(MTGCard * card, const Pos& pos, JQuad * quad); static string FormattedData (string data, string replace, string value); static bool FilterCard (MTGCard * card,string filter); @@ -54,9 +54,9 @@ public: CardGui(MTGCardInstance* card, const Pos& ref); virtual void Render(); virtual void Update(float dt); - - void DrawCard(const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false, bool noborder = false, bool smallscale = false); - static void DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false, bool noborder = false, bool smallscale = false); + bool isBlackBorder(string set); + void DrawCard(const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false, bool noborder = false, bool smallscale = false, bool ingame = false); + static void DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false, bool noborder = false, bool smallscale = false, bool ingame = false); static void DrawBorder(string setname, const Pos& inPosition, float x, bool noborder = false, bool smallscale = false); static JQuadPtr AlternateThumbQuad(MTGCard * card); virtual ostream& toString(ostream&) const; diff --git a/projects/mtg/include/CardPrimitive.h b/projects/mtg/include/CardPrimitive.h index afcfb9604..51f5dbcd0 100644 --- a/projects/mtg/include/CardPrimitive.h +++ b/projects/mtg/include/CardPrimitive.h @@ -57,8 +57,8 @@ public: uint8_t colors; typedef std::bitset BasicAbilitiesSet; + vector modbasicAbilities; BasicAbilitiesSet basicAbilities; - BasicAbilitiesSet origbasicAbilities; BasicAbilitiesSet LKIbasicAbilities; map magicTexts; @@ -115,6 +115,8 @@ public: bool isCreature(); bool isLand(); bool isSpell(); + bool isPermanent(); + bool isSorceryorInstant(); int dredge(); void setPower(int _power); int getPower(); diff --git a/projects/mtg/include/Damage.h b/projects/mtg/include/Damage.h index 5443f1b95..0cb6369d2 100644 --- a/projects/mtg/include/Damage.h +++ b/projects/mtg/include/Damage.h @@ -24,6 +24,7 @@ public: int handsize; int poisonCount; int damageCount; + int nonCombatDamage; int preventable; int thatmuch; int lifeLostThisTurn; diff --git a/projects/mtg/include/GuiStatic.h b/projects/mtg/include/GuiStatic.h index 513d7848b..db7c0505e 100644 --- a/projects/mtg/include/GuiStatic.h +++ b/projects/mtg/include/GuiStatic.h @@ -25,8 +25,8 @@ struct GuiAvatar: public GuiStatic BOTTOM_RIGHT } Corner; - static const unsigned Width = 35; - static const unsigned Height = 50; + static const unsigned Width = 32;//35 + static const unsigned Height = 45;//50 protected: int avatarRed; diff --git a/projects/mtg/include/MTGCardInstance.h b/projects/mtg/include/MTGCardInstance.h index 4e78569ac..cd18151a5 100644 --- a/projects/mtg/include/MTGCardInstance.h +++ b/projects/mtg/include/MTGCardInstance.h @@ -121,6 +121,7 @@ public: MTGGameZone * previousZone; MTGCardInstance * previous; MTGCardInstance * next; + MTGAbility * TokenAndAbility; int doDamageTest; bool skipDamageTestOnce; int summoningSickness; @@ -256,7 +257,6 @@ public: bool bypassTC; bool discarded; int copiedID; - int modifiedbAbi; bool StackIsEmptyandSorcerySpeed(); bool isTargetted(); int cardistargetted; diff --git a/projects/mtg/include/MTGDefinitions.h b/projects/mtg/include/MTGDefinitions.h index cd3137f39..f3d8c5451 100644 --- a/projects/mtg/include/MTGDefinitions.h +++ b/projects/mtg/include/MTGDefinitions.h @@ -257,7 +257,9 @@ class Constants FLYERSONLY = 135,//can attack only if it has flying TEMPFLASHBACK = 136, NOLEGENDRULE =137, - NB_BASIC_ABILITIES = 138, + CANTTRANSFORM =138, + ASFLASH =139, + NB_BASIC_ABILITIES = 140, RARITY_S = 'S', //Special Rarity RARITY_M = 'M', //Mythics diff --git a/projects/mtg/include/ManaCost.h b/projects/mtg/include/ManaCost.h index 04e7733bb..40addf0aa 100644 --- a/projects/mtg/include/ManaCost.h +++ b/projects/mtg/include/ManaCost.h @@ -101,6 +101,7 @@ public: ManaCost(const ManaCost& manaCost); ManaCost& operator= (const ManaCost& manaCost); void copy(ManaCost * _manaCost); + void changeCostTo(ManaCost * _manaCost); int isNull(); int getConvertedCost(); string toString(); diff --git a/projects/mtg/include/WEvent.h b/projects/mtg/include/WEvent.h index 33d70fe31..b4713c542 100644 --- a/projects/mtg/include/WEvent.h +++ b/projects/mtg/include/WEvent.h @@ -301,6 +301,12 @@ struct WEventCardControllerChange : public WEventCardUpdate { virtual Targetable * getTarget(int target); }; +//event when card transforms +struct WEventCardTransforms : public WEventCardUpdate { + WEventCardTransforms(MTGCardInstance * card); + virtual Targetable * getTarget(int target); +}; + std::ostream& operator<<(std::ostream&, const WEvent&); #endif diff --git a/projects/mtg/include/WResourceManager.h b/projects/mtg/include/WResourceManager.h index 4abe05ed9..d7f44c2a0 100644 --- a/projects/mtg/include/WResourceManager.h +++ b/projects/mtg/include/WResourceManager.h @@ -80,6 +80,7 @@ public: } }; virtual JQuadPtr RetrieveCard(MTGCard * card, int style = RETRIEVE_NORMAL,int submode = CACHE_NORMAL) = 0; + virtual JQuadPtr RetrieveCardToken(MTGCard * card, int style = RETRIEVE_NORMAL,int submode = CACHE_NORMAL, int tId = 0) = 0; virtual JSample * RetrieveSample(const string& filename, int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL) = 0; virtual JTexture * RetrieveTexture(const string& filename, int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL) = 0; virtual JQuadPtr RetrieveQuad(const string& filename, float offX=0.0f, float offY=0.0f, float width=0.0f, float height=0.0f, string resname="", int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL, int id = 0) = 0; diff --git a/projects/mtg/include/WResourceManagerImpl.h b/projects/mtg/include/WResourceManagerImpl.h index d759f943f..05b18617c 100644 --- a/projects/mtg/include/WResourceManagerImpl.h +++ b/projects/mtg/include/WResourceManagerImpl.h @@ -141,6 +141,7 @@ public: bool IsThreaded(); JQuadPtr RetrieveCard(MTGCard * card, int style = RETRIEVE_NORMAL,int submode = CACHE_NORMAL); + JQuadPtr RetrieveCardToken(MTGCard * card, int style = RETRIEVE_NORMAL,int submode = CACHE_NORMAL, int tId = 0); JSample * RetrieveSample(const string& filename, int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL); JTexture * RetrieveTexture(const string& filename, int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL); JQuadPtr RetrieveQuad(const string& filename, float offX=0.0f, float offY=0.0f, float width=0.0f, float height=0.0f, string resname="", int style = RETRIEVE_LOCK, int submode = CACHE_NORMAL, int id = 0); diff --git a/projects/mtg/src/ActionStack.cpp b/projects/mtg/src/ActionStack.cpp index 6bb329cd9..a702295a6 100644 --- a/projects/mtg/src/ActionStack.cpp +++ b/projects/mtg/src/ActionStack.cpp @@ -132,7 +132,8 @@ void Interruptible::Render(MTGCardInstance * source, JQuad * targetQuad, string { Pos pos = Pos(CardGui::BigWidth / 2, CardGui::BigHeight / 2 - 10, 0.80f, 0.0, 220); pos.actY = 142;//adjust y a little bit - CardGui::DrawCard(source, pos, observer->getCardSelector()->GetDrawMode()); + bool ingame = observer?true:false; + CardGui::DrawCard(source, pos, observer->getCardSelector()->GetDrawMode(),false,false,false,ingame); } if (targetQuad) diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 386d77396..2cf3abab5 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -1453,6 +1453,7 @@ AACopier::AACopier(GameObserver* observer, int _id, MTGCardInstance * _source, M ActivatedAbility(observer, _id, _source, _cost, 0) { target = _target; + andAbility = NULL; } int AACopier::resolve() @@ -1463,15 +1464,30 @@ int AACopier::resolve() { MTGCard* clone ; if(_target->isToken || (_target->isACopier && _target->hasCopiedToken)) - { + {//fix crash when copying token clone = _target; tokencopied = true; } else clone = MTGCollection()->getCardById(_target->copiedID); - MTGCardInstance * myClone = NEW MTGCardInstance(clone, source->controller()->game); - source->copy(myClone); - SAFE_DELETE(myClone); + + if(tokencopied) + { + MTGCardInstance * myClone = NEW MTGCardInstance(clone, source->controller()->game); + source->copy(myClone); + SAFE_DELETE(myClone); + } + else + {/********************************************* + * instead of using source->copy(myClone) use * + * AAFlip with forcedcopy to true * + *********************************************/ + AAFlip * af = NEW AAFlip(game, game->mLayers->actionLayer()->getMaxId(), source, source, clone->data->name, false, true); + af->oneShot = 1; + af->canBeInterrupted = false; + af->resolve(); + SAFE_DELETE(af); + } source->isACopier = true; source->hasCopiedToken = tokencopied; source->copiedID = _target->copiedID; @@ -1488,6 +1504,34 @@ int AACopier::resolve() source->basicAbilities.reset(); source->getManaCost()->resetCosts(); } + if(_target->TokenAndAbility) + {//the source copied a token with andAbility + MTGAbility * TokenandAbilityClone = _target->TokenAndAbility->clone(); + TokenandAbilityClone->target = source; + if(_target->TokenAndAbility->oneShot) + { + TokenandAbilityClone->resolve(); + SAFE_DELETE(TokenandAbilityClone); + } + else + { + TokenandAbilityClone->addToGame(); + } + } + if(andAbility) + { + MTGAbility * andAbilityClone = andAbility->clone(); + andAbilityClone->target = source; + if(andAbility->oneShot) + { + andAbilityClone->resolve(); + SAFE_DELETE(andAbilityClone); + } + else + { + andAbilityClone->addToGame(); + } + } return 1; } return 0; @@ -1609,6 +1653,11 @@ AACounter::AACounter(GameObserver* observer, int id, MTGCardInstance * source, M if (target) { MTGCardInstance * _target = (MTGCardInstance *) target; + if(_target->isFlipped && _target->hasType(Subtypes::TYPE_PLANESWALKER))//is flipping pw + { + this->forceDestroy = 1; + return 0; + } AbilityFactory af(game); if(counterstring.size()) { @@ -3155,8 +3204,8 @@ AAMeld * AAMeld::clone() const } // flip a card -AAFlip::AAFlip(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target,string flipStats, bool isflipcard) : -InstantAbility(observer, id, card, _target),flipStats(flipStats),isflipcard(isflipcard) +AAFlip::AAFlip(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target,string flipStats, bool isflipcard, bool forcedcopy) : +InstantAbility(observer, id, card, _target),flipStats(flipStats),isflipcard(isflipcard),forcedcopy(forcedcopy) { target = _target; } @@ -3179,7 +3228,7 @@ int AAFlip::resolve() MTGCardInstance * _target = (MTGCardInstance *) target; if (_target) { - if((_target->isACopier||_target->isToken) && !isflipcard) + if((_target->isACopier||_target->isToken||_target->has(Constants::CANTTRANSFORM)) && !isflipcard && !forcedcopy) { game->removeObserver(this); return 0; @@ -3196,6 +3245,9 @@ int AAFlip::resolve() MTGCard * fcard = MTGCollection()->getCardByName(flipStats); if(!fcard) return 0; MTGCardInstance * myFlip = NEW MTGCardInstance(fcard, _target->controller()->game); + MTGCardInstance * myParent = NULL; + if(_target->target) + myParent = _target->target; _target->name = myFlip->name; _target->setName(myFlip->name); if(!isflipcard)//transform card @@ -3208,9 +3260,15 @@ int AAFlip::resolve() _target->types = myFlip->types; _target->text = myFlip->text; _target->formattedText = myFlip->formattedText; - _target->basicAbilities = myFlip->basicAbilities; + _target->basicAbilities = myFlip->model->data->basicAbilities; + _target->modbasicAbilities = myFlip->modbasicAbilities; cdaDamage = _target->damageCount; _target->copiedID = myFlip->getMTGId();//for copier + if(forcedcopy && _target->owner->playMode != Player::MODE_TEST_SUITE) + { + _target->setMTGId(myFlip->getMTGId()); + _target->setId = myFlip->setId; + } for(unsigned int i = 0;i < _target->cardsAbilities.size();i++) { MTGAbility * a = dynamic_cast(_target->cardsAbilities[i]); @@ -3278,8 +3336,18 @@ int AAFlip::resolve() {//pbonus & tbonus are already computed except damage taken... _target->life -= cdaDamage; } + if(_target->hasSubtype(Subtypes::TYPE_EQUIPMENT)) + { + if(myParent) + _target->target = myParent; + } SAFE_DELETE(myFlip); _target->mPropertiesChangedSinceLastUpdate = true; + if(!isflipcard) + { + WEvent * e = NEW WEventCardTransforms(_target); + game->receiveEvent(e); + } } currentAbilities.clear(); @@ -3923,10 +3991,10 @@ int AACloner::resolve() } } list::iterator it; - for (it = awith.begin(); it != awith.end(); it++) + /*for (it = awith.begin(); it != awith.end(); it++) {//there must be a layer of temporary abilities and original abilities spell->source->basicAbilities[*it] = 1; - } + }*/ for (it = colors.begin(); it != colors.end(); it++) { spell->source->setColor(*it); @@ -3935,13 +4003,25 @@ int AACloner::resolve() { spell->source->addType(*it); } - spell->source->modifiedbAbi = _target->modifiedbAbi; - //spell->source->basicAbilities = _target->origbasicAbilities; for(int k = 0; k < Constants::NB_BASIC_ABILITIES; k++) { if(_target->model->data->basicAbilities[k]) spell->source->basicAbilities[k] = _target->model->data->basicAbilities[k]; } + if(_target->TokenAndAbility) + {//the source copied a token with andAbility + MTGAbility * andAbilityClone = _target->TokenAndAbility->clone(); + andAbilityClone->target = spell->source; + if(_target->TokenAndAbility->oneShot) + { + andAbilityClone->resolve(); + SAFE_DELETE(andAbilityClone); + } + else + { + andAbilityClone->addToGame(); + } + } delete spell; } return 1; @@ -4112,8 +4192,11 @@ int AAMover::resolve() //inplay is a special zone ! for (int i = 0; i < 2; i++) { - if (!_target->hasSubtype(Subtypes::TYPE_AURA) && destZone == game->players[i]->game->inPlay && fromZone != game->players[i]->game->inPlay && fromZone - != game->players[i]->opponent()->game->inPlay) + if (!_target->isSorceryorInstant() && + !_target->hasSubtype(Subtypes::TYPE_AURA) && + destZone == game->players[i]->game->inPlay && + fromZone != game->players[i]->game->inPlay && + fromZone != game->players[i]->opponent()->game->inPlay) { MTGCardInstance * copy = game->players[i]->game->putInZone(_target, fromZone, game->players[i]->game->temp); Spell * spell = NEW Spell(game, copy); @@ -4172,6 +4255,16 @@ int AAMover::resolve() } else { + if(_target->isSorceryorInstant() && (destZone == game->players[0]->game->inPlay || destZone == game->players[1]->game->inPlay)) + { + if(andAbility) + { + if(!dynamic_cast(andAbility)) + return 0; + } + else + return 0; + } p->game->putInZone(_target, fromZone, destZone); while(_target->next) _target = _target->next; @@ -5634,7 +5727,6 @@ for (it = types.begin(); it != types.end(); it++) for (it = abilities.begin(); it != abilities.end(); it++) { _target->basicAbilities.set(*it); - _target->modifiedbAbi += 1; } if(newAbilityFound) @@ -5783,7 +5875,6 @@ int ATransformer::destroy() for (it = abilities.begin(); it != abilities.end(); it++) { _target->basicAbilities.reset(*it); - _target->modifiedbAbi -= 1; } for (it = oldcolors.begin(); it != oldcolors.end(); it++) @@ -7077,7 +7168,7 @@ void ABlink::resolveBlink() void ABlink::returnCardIntoPlay(MTGCardInstance* _target) { MTGCardInstance * Blinker = NULL; - if(!_target->blinked) + if(!_target->blinked || _target->hasSubtype(Subtypes::TYPE_INSTANT) || _target->hasSubtype(Subtypes::TYPE_SORCERY)) { this->forceDestroy = 1; return; @@ -7640,12 +7731,24 @@ int AACastCard::resolveSpell() if (game->targetChooser) { game->targetChooser->Owner = source->controller(); - spell = game->mLayers->stackLayer()->addSpell(copy, game->targetChooser, NULL, 1, 0); + if(putinplay) + { + spell = NEW Spell(game, 0,copy,game->targetChooser,NULL, 1); + spell->resolve(); + } + else + spell = game->mLayers->stackLayer()->addSpell(copy, game->targetChooser, NULL, 1, 0); game->targetChooser = NULL; } else { - spell = game->mLayers->stackLayer()->addSpell(copy, NULL, NULL, 1, 0); + if(putinplay) + { + spell = NEW Spell(game, 0,copy,NULL,NULL, 1); + spell->resolve(); + } + else + spell = game->mLayers->stackLayer()->addSpell(copy, NULL, NULL, 1, 0); } if (copy->has(Constants::STORM)) diff --git a/projects/mtg/src/CardDisplay.cpp b/projects/mtg/src/CardDisplay.cpp index 6e6fff9f4..eef02f78b 100644 --- a/projects/mtg/src/CardDisplay.cpp +++ b/projects/mtg/src/CardDisplay.cpp @@ -271,8 +271,8 @@ void CardDisplay::Render() if (x < (CardGui::BigWidth / 2)) pos.actX = SCREEN_WIDTH - 10 - CardGui::BigWidth / 2; drawMode = observer->getCardSelector()->GetDrawMode(); } - - cardg->DrawCard(pos, drawMode); + bool ingame = observer?true:false; + cardg->DrawCard(pos, drawMode, false, false, false,ingame); } } diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index d82d0b533..e842988f0 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -111,20 +111,20 @@ void CardGui::Update(float dt) PlayGuiObject::Update(dt); } -void CardGui::DrawCard(const Pos& inPosition, int inMode, bool thumb, bool noborder, bool smallerscale) +void CardGui::DrawCard(const Pos& inPosition, int inMode, bool thumb, bool noborder, bool smallerscale, bool ingame) { - DrawCard(card, inPosition, inMode, thumb, noborder, smallerscale); + DrawCard(card, inPosition, inMode, thumb, noborder, smallerscale, ingame); } -void CardGui::DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode, bool thumb, bool noborder, bool smallerscale) +void CardGui::DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode, bool thumb, bool noborder, bool smallerscale, bool ingame) { switch (inMode) { case DrawMode::kNormal: - RenderBig(inCard, inPosition, thumb, noborder, smallerscale); + RenderBig(inCard, inPosition, thumb, noborder, smallerscale, ingame); break; case DrawMode::kText: - AlternateRender(inCard, inPosition); + AlternateRender(inCard, inPosition, noborder, smallerscale); break; default: break; @@ -137,6 +137,10 @@ void CardGui::Render() WFont * mFont = game?game->getResourceManager()->GetWFont(Fonts::MAIN_FONT):WResourceManager::Instance()->GetWFont(Fonts::MAIN_FONT); JRenderer * renderer = JRenderer::GetInstance(); TargetChooser * tc = NULL; + //fake border and mask... + JQuadPtr fakeborder = game? game->getResourceManager()->GetQuad("white"):WResourceManager::Instance()->GetQuad("white"); + JQuadPtr highlightborder = game? game->getResourceManager()->GetQuad("white"):WResourceManager::Instance()->GetQuad("white"); + JQuadPtr fakemask = game? game->getResourceManager()->GetQuad("white"):WResourceManager::Instance()->GetQuad("white"); if (game) tc = game->getCurrentTargetChooser(); @@ -148,6 +152,11 @@ void CardGui::Render() MTGCard * fcard = MTGCollection()->getCardByName(card->name); quad = game->getResourceManager()->RetrieveCard(fcard, CACHE_THUMB); } + if (card->hasCopiedToken && !quad.get()) + { + MTGCard * tcard = MTGCollection()->getCardById(abs(card->copiedID)); + quad = game->getResourceManager()->RetrieveCardToken(tcard, CACHE_THUMB, 1, abs(card->copiedID)); + } if (quad.get()) alternate = false; else @@ -247,18 +256,15 @@ void CardGui::Render() if (quad) { quad->SetColor(ARGB(static_cast(actA),255,255,255)); - //fake border... - JQuadPtr fakeborder; - JQuadPtr highlightborder; - fakeborder = game? game->getResourceManager()->GetQuad("white"):WResourceManager::Instance()->GetQuad("white"); - highlightborder = game? game->getResourceManager()->GetQuad("white"):WResourceManager::Instance()->GetQuad("white"); if(fakeborder) { + int rgb = isBlackBorder(setlist[card->setId].c_str())?15:240; if(card->has(Constants::CANPLAYFROMGRAVEYARD)||card->has(Constants::CANPLAYFROMEXILE)||card->has(Constants::PAYZERO)) fakeborder->SetColor(ARGB((int)(actA),7,235,7));//green border else - fakeborder->SetColor(ARGB((int)(actA),15,15,15)); + fakeborder->SetColor(ARGB((int)(actA),rgb,rgb,rgb)); renderer->RenderQuad(fakeborder.get(), actX, (actY-yy), actT, (28 * (actZ*zz) + 1) / 16, 40 * (actZ*zz) / 16); + //renderer->DrawRect(actX, (actY-yy),((28 * (actZ*zz) + 1) / 16),(40 * (actZ*zz) / 16),ARGB((int)(actA),240,240,240)); } //draw border for highlighting if (game) @@ -438,7 +444,7 @@ void CardGui::Render() else if(card->chooseacolor == 5) buff += "\n-White"; } - if(!alternate && buff != "" && game->gameType() == GAME_TYPE_CLASSIC)//it seems that other game modes makes cards as tokens!!! hmmm... + if(buff != "")//enable indicator at all modes { mFont->SetScale(DEFAULT_MAIN_FONT_SCALE); char buffer[200]; @@ -477,7 +483,7 @@ void CardGui::Render() if (shadow) { shadow->SetColor(ARGB(200,255,255,255)); - renderer->RenderQuad(shadow.get(), actX, (actY-yy), actT, (25 * (actZ*zz) + 1) / 16, 37 * (actZ*zz) / 16); + renderer->RenderQuad(shadow.get(), actX, (actY-yy), actT, (28 * (actZ*zz) + 1) / 16, 40 * (actZ*zz) / 16); } } @@ -487,28 +493,18 @@ void CardGui::Render() if ((tc && tc->alreadyHasTarget(card)) || (game && card == game->mLayers->actionLayer()->currentActionCard))//paint targets red. { - float xy = yy>0.0f?2.0f:1.0f; - float modx = mHasFocus?xy:0.0f; - if (card->isTapped()) + if(fakemask) { - renderer->FillRect(actX - (scale * quad->mWidth / 2)-(7+modx),(actY-yy) - (scale * quad->mHeight / 2)+(7+modx),scale* quad->mHeight,scale * quad->mWidth, ARGB(128,255,0,0)); - } - else - { - renderer->FillRect(actX - (scale * quad->mWidth / 2),(actY-yy) - (scale * quad->mHeight / 2), scale * quad->mWidth, scale* quad->mHeight, ARGB(128,255,0,0)); + fakemask->SetColor(ARGB(150,255,0,0)); + renderer->RenderQuad(fakemask.get(), actX, (actY-yy), actT, (26 * (actZ*zz) + 1) / 16, 38 * (actZ*zz) / 16); } } - if(tc && tc->source && tc->source->view && tc->source->view->actY >= 1.3 && card == tc->source)//paint the source green while infocus. + if(tc && tc->source && tc->source->view && tc->source->view->actZ >= 1.3 && card == tc->source)//paint the source green while infocus. { - float xy = yy>0.0f?2.0f:1.0f; - float modx = mHasFocus?xy:0.0f; - if (tc->source->isTapped()) + if(fakemask) { - renderer->FillRect(actX - (scale * quad->mWidth / 2)-(7+modx),(actY-yy) - (scale * quad->mHeight / 2)+(7+modx),scale* quad->mHeight,scale * quad->mWidth, ARGB(128,0,255,0)); - } - else - { - renderer->FillRect(tc->source->view->actX - (scale * quad->mWidth / 2),(tc->source->view->actY-yy) - (scale * quad->mHeight / 2), scale*quad->mWidth, scale*quad->mHeight, ARGB(128,0,255,0)); + fakemask->SetColor(ARGB(150,0,255,0)); + renderer->RenderQuad(fakemask.get(), actX, (actY-yy), actT, (26 * (actZ*zz) + 1) / 16, 38 * (actZ*zz) / 16); } } @@ -538,12 +534,13 @@ JQuadPtr CardGui::AlternateThumbQuad(MTGCard * card) return q; } -void CardGui::AlternateRender(MTGCard * card, const Pos& pos) +void CardGui::AlternateRender(MTGCard * card, const Pos& pos, bool noborder, bool smallerscale) { // Draw the "unknown" card model JRenderer * renderer = JRenderer::GetInstance(); JQuadPtr q; - + //set id + string cardsetname = setlist[card->setId].c_str(); float x = pos.actX; vectoritems = gModRules.cardgui.background; @@ -567,6 +564,10 @@ void CardGui::AlternateRender(MTGCard * card, const Pos& pos) float scale = pos.actZ * 250 / q->mHeight; q->SetColor(ARGB((int)pos.actA,255,255,255)); + + //Draw border + DrawBorder(cardsetname, pos, x, noborder, smallerscale); + //render alternate renderer->RenderQuad(q.get(), x, pos.actY, pos.actT, scale, scale); } @@ -1128,7 +1129,7 @@ void CardGui::TinyCropRender(MTGCard * card, const Pos& pos, JQuad * quad) } //Renders a big card on screen. Defaults to the "alternate" rendering if no image is found -void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder, bool smallerscale) +void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder, bool smallerscale, bool ingame) { JRenderer * renderer = JRenderer::GetInstance(); //GameObserver * game = GameObserver::GetInstance(); @@ -1146,6 +1147,15 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder MTGCard * fcard = MTGCollection()->getCardByName(kcard->name); quad = WResourceManager::Instance()->RetrieveCard(fcard); } + if(ingame) + { + if (kcard->hasCopiedToken && kcard->getObserver() && !quad.get()) + { + MTGCard * tcard = MTGCollection()->getCardById(abs(kcard->copiedID)); + quad = thumb ? WResourceManager::Instance()->RetrieveCardToken(tcard, RETRIEVE_THUMB, 1, abs(kcard->copiedID)) + : WResourceManager::Instance()->RetrieveCardToken(tcard, RETRIEVE_NORMAL, 1, abs(kcard->copiedID)); + } + } if (quad.get()) { if (quad->mHeight < quad->mWidth) @@ -1158,11 +1168,19 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder DrawBorder(cardsetname, pos, x, noborder, smallerscale); //force smaller scale on alpha beta smallerscale = cardsetname=="LEA"||cardsetname=="LEB"?true:smallerscale; + float modxscale = (cardsetname =="UNH")?0.02f:0.008f; + float modyscale = (cardsetname =="UNH")?0.015f:0.0075f; + bool unh = (cardsetname =="UNH")?true:false; //Draw card - if(smallerscale) - renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale-0.01f, scale-0.01f); + if(smallerscale && !unh) + renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale-0.001f, scale-0.001f); else - renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale, scale); + { + if(ingame) + renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale+modxscale, scale+modyscale); + else + renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale+0.002f, scale+0.0015f); + } RenderCountersBig(card, pos); return; } @@ -1170,7 +1188,7 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder //DebugTrace("Unable to fetch image: " << card->getImageName()); // If we come here, we do not have the picture. - AlternateRender(card, pos); + AlternateRender(card, pos, noborder, smallerscale); } void CardGui::DrawBorder(string cardsetname, const Pos& pos, float x, bool noborder, bool smallerscale) @@ -1190,8 +1208,8 @@ void CardGui::DrawBorder(string cardsetname, const Pos& pos, float x, bool nobor if(cardsetname == "LEA") {//BETA HAS REGULAR BORDER //Draw more rounder black border - renderer->FillRoundRect((pos.actX - (pos.actZ * 84.f))-10.5f,(pos.actY - (pos.actZ * 119.7f))-11.5f,pos.actZ * 168.f + 0.5f,pos.actZ * 239.4f + 4.f,10.f,ARGB(255,5,5,5)); - renderer->DrawRoundRect((pos.actX - (pos.actZ * 84.f))-10.5f,(pos.actY - (pos.actZ * 119.7f))-11.5f,pos.actZ * 168.f + 0.5f,pos.actZ * 239.4f + 4.f,10.f,ARGB(50,240,240,240)); + renderer->FillRoundRect((pos.actX - (pos.actZ * 84.f))-10.f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f - 0.5f,pos.actZ * 239.4f + 8.f,10.f,ARGB(255,5,5,5)); + renderer->DrawRoundRect((pos.actX - (pos.actZ * 84.f))-10.f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f - 0.5f,pos.actZ * 239.4f + 8.f,10.f,ARGB(50,240,240,240)); } else {//draw black border @@ -1206,13 +1224,29 @@ void CardGui::DrawBorder(string cardsetname, const Pos& pos, float x, bool nobor if(alphabeta.get()) { alphabeta->SetHotSpot(static_cast (alphabeta->mWidth / 2), static_cast (alphabeta->mHeight / 2)); - float myscale = pos.actZ * 250 / alphabeta->mHeight; + float myscale = pos.actZ * 254 / alphabeta->mHeight; alphabeta->SetColor(ARGB((int)pos.actA,255,255,255)); - renderer->RenderQuad(alphabeta.get(), x, pos.actY, pos.actT, myscale, myscale); + renderer->RenderQuad(alphabeta.get(), x, pos.actY+0.2f, pos.actT, myscale, myscale); } } } +bool CardGui::isBlackBorder(string cardsetname) +{ + if(cardsetname == "2ED"|| + cardsetname == "RV"|| + cardsetname == "4ED"|| + cardsetname == "5ED"|| + cardsetname == "6ED"|| + cardsetname == "7ED"|| + cardsetname == "8ED"|| + cardsetname == "9ED"|| + cardsetname == "CHR"|| + cardsetname == "DM") + return false; + return true; +} + string CardGui::FormattedData(string data, string replace, string value) { size_t found = data.find(replace.c_str()); diff --git a/projects/mtg/src/CardPrimitive.cpp b/projects/mtg/src/CardPrimitive.cpp index 30c5c2e5f..b1c1df544 100644 --- a/projects/mtg/src/CardPrimitive.cpp +++ b/projects/mtg/src/CardPrimitive.cpp @@ -41,7 +41,10 @@ CardPrimitive::CardPrimitive(CardPrimitive * source) if(!source) return; basicAbilities = source->basicAbilities; - origbasicAbilities = source->basicAbilities; + for(int k=0; k < Constants::NB_BASIC_ABILITIES; k++) + { + modbasicAbilities.push_back(source->basicAbilities[k]); + } LKIbasicAbilities = source->basicAbilities; for (size_t i = 0; i < source->types.size(); ++i) @@ -79,7 +82,7 @@ CardPrimitive::~CardPrimitive() int CardPrimitive::init() { basicAbilities.reset(); - origbasicAbilities.reset(); + modbasicAbilities.clear(); types.clear(); @@ -110,6 +113,18 @@ bool CardPrimitive::isSpell() return (!isCreature() && !isLand()); } +bool CardPrimitive::isPermanent() +{ + return (!isSorceryorInstant()); +} + +bool CardPrimitive::isSorceryorInstant() +{ + if(hasSubtype(Subtypes::TYPE_SORCERY)||hasSubtype(Subtypes::TYPE_INSTANT)) + return true; + return false; +} + int CardPrimitive::dredge() { return dredgeAmount; diff --git a/projects/mtg/src/CardSelector.cpp b/projects/mtg/src/CardSelector.cpp index 84c847c7d..0065f3e77 100644 --- a/projects/mtg/src/CardSelector.cpp +++ b/projects/mtg/src/CardSelector.cpp @@ -344,7 +344,8 @@ void CardSelector::Render() float modx = 14.f; Pos npos = Pos(bigpos.x+modx,bigpos.y-4.f,bigpos.zoom-(bigpos.zoom/5),bigpos.t,bigpos.alpha); //render card - card->DrawCard(npos, mDrawMode); + bool ingame = observer?true:false; + card->DrawCard(npos, mDrawMode, false, false, false,ingame); } } } diff --git a/projects/mtg/src/Damage.cpp b/projects/mtg/src/Damage.cpp index 17bd6b9bd..5536711bd 100644 --- a/projects/mtg/src/Damage.cpp +++ b/projects/mtg/src/Damage.cpp @@ -184,6 +184,8 @@ int Damage::resolve() if(!_target->inPlay()->hasAbility(Constants::POISONSHROUD)) _target->poisonCount += damage;//this will be changed to poison counters. _target->damageCount += damage; + if(typeOfDamage == 2) + target->nonCombatDamage += damage; if ( typeOfDamage == 1 && target == source->controller()->opponent() )//add vector prowledtypes. { vector values = MTGAllCards::getCreatureValuesById(); @@ -202,6 +204,8 @@ int Damage::resolve() if(!_target->inPlay()->hasAbility(Constants::CANTCHANGELIFE)) a = target->dealDamage(damage); target->damageCount += damage; + if(typeOfDamage == 2) + target->nonCombatDamage += damage; if ( typeOfDamage == 1 && target == source->controller()->opponent() )//add vector prowledtypes. { vector values = MTGAllCards::getCreatureValuesById(); @@ -237,6 +241,8 @@ int Damage::resolve() else a = target->dealDamage(damage); target->damageCount += damage;//the amount must be the actual damage so i changed this from 1 to damage, this fixes pdcount and odcount + if(typeOfDamage == 2) + target->nonCombatDamage += damage; if (target->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE){ ((MTGCardInstance*)target)->wasDealtDamage = true; ((MTGCardInstance*)source)->damageToCreature = true; diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index 35990bb8e..c37427ea1 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -211,11 +211,13 @@ void GameObserver::nextGamePhase() { cleanupPhase(); currentPlayer->damageCount = 0; + currentPlayer->nonCombatDamage = 0; currentPlayer->drawCounter = 0; currentPlayer->raidcount = 0; currentPlayer->opponent()->raidcount = 0; currentPlayer->prowledTypes.clear(); currentPlayer->opponent()->damageCount = 0; //added to clear odcount + currentPlayer->opponent()->nonCombatDamage = 0; currentPlayer->preventable = 0; mLayers->actionLayer()->cleanGarbage(); //clean abilities history for this turn; mLayers->stackLayer()->garbageCollect(); //clean stack history for this turn; @@ -954,12 +956,8 @@ void GameObserver::gameStateBasedEffects() p->game->putInExile(c); } - }/* - if(c->modifiedbAbi > 0) - { - c->modifiedbAbi = 0; - c->basicAbilities = c->origbasicAbilities; - }*///disabled this failed logic I introduce... when copying/cloning a card copy orig basic abilities... + } + if(nbcards > z->nb_cards) { t = 0; @@ -1186,56 +1184,56 @@ void GameObserver::Affinity() //kicker is an addon to normal cost, suspend is not casting. add cost as needed EXACTLY as seen below. card->getManaCost()->resetCosts(); ManaCost *newCost = NEW ManaCost(); - newCost->copy(card->computeNewCost(card, card->getManaCost(), card->model->data->getManaCost())); + newCost->changeCostTo(card->computeNewCost(card, card->getManaCost(), card->model->data->getManaCost())); - card->getManaCost()->copy(newCost); + card->getManaCost()->changeCostTo(newCost); SAFE_DELETE(newCost); if (card->getManaCost()->getAlternative()) { card->getManaCost()->getAlternative()->resetCosts(); ManaCost * newCost = NEW ManaCost(); - newCost->copy(card->computeNewCost(card, card->getManaCost()->getAlternative(), card->model->data->getManaCost()->getAlternative())); - card->getManaCost()->getAlternative()->copy(newCost); + newCost->changeCostTo(card->computeNewCost(card, card->getManaCost()->getAlternative(), card->model->data->getManaCost()->getAlternative())); + card->getManaCost()->getAlternative()->changeCostTo(newCost); SAFE_DELETE(newCost); } if (card->getManaCost()->getBestow()) { card->getManaCost()->getBestow()->resetCosts(); ManaCost * newCost = NEW ManaCost(); - newCost->copy(card->computeNewCost(card, card->getManaCost()->getBestow(), card->model->data->getManaCost()->getBestow())); - card->getManaCost()->getBestow()->copy(newCost); + newCost->changeCostTo(card->computeNewCost(card, card->getManaCost()->getBestow(), card->model->data->getManaCost()->getBestow())); + card->getManaCost()->getBestow()->changeCostTo(newCost); SAFE_DELETE(newCost); } if (card->getManaCost()->getRetrace()) { card->getManaCost()->getRetrace()->resetCosts(); ManaCost * newCost = NEW ManaCost(); - newCost->copy(card->computeNewCost(card, card->getManaCost()->getRetrace(), card->model->data->getManaCost()->getRetrace())); - card->getManaCost()->getRetrace()->copy(newCost); + newCost->changeCostTo(card->computeNewCost(card, card->getManaCost()->getRetrace(), card->model->data->getManaCost()->getRetrace())); + card->getManaCost()->getRetrace()->changeCostTo(newCost); SAFE_DELETE(newCost); } if (card->getManaCost()->getBuyback()) { card->getManaCost()->getBuyback()->resetCosts(); ManaCost * newCost = NEW ManaCost(); - newCost->copy(card->computeNewCost(card, card->getManaCost()->getBuyback(), card->model->data->getManaCost()->getBuyback())); - card->getManaCost()->getBuyback()->copy(newCost); + newCost->changeCostTo(card->computeNewCost(card, card->getManaCost()->getBuyback(), card->model->data->getManaCost()->getBuyback())); + card->getManaCost()->getBuyback()->changeCostTo(newCost); SAFE_DELETE(newCost); } if (card->getManaCost()->getFlashback()) { card->getManaCost()->getFlashback()->resetCosts(); ManaCost * newCost = NEW ManaCost(); - newCost->copy(card->computeNewCost(card, card->getManaCost()->getFlashback(), card->model->data->getManaCost()->getFlashback())); - card->getManaCost()->getFlashback()->copy(newCost); + newCost->changeCostTo(card->computeNewCost(card, card->getManaCost()->getFlashback(), card->model->data->getManaCost()->getFlashback())); + card->getManaCost()->getFlashback()->changeCostTo(newCost); SAFE_DELETE(newCost); } if (card->getManaCost()->getMorph()) { card->getManaCost()->getMorph()->resetCosts(); ManaCost * newCost = NEW ManaCost(); - newCost->copy(card->computeNewCost(card, card->getManaCost()->getMorph(), card->model->data->getManaCost()->getMorph())); - card->getManaCost()->getMorph()->copy(newCost); + newCost->changeCostTo(card->computeNewCost(card, card->getManaCost()->getMorph(), card->model->data->getManaCost()->getMorph())); + card->getManaCost()->getMorph()->changeCostTo(newCost); SAFE_DELETE(newCost); } diff --git a/projects/mtg/src/GuiAvatars.cpp b/projects/mtg/src/GuiAvatars.cpp index b12d2a8fd..4d2af134b 100644 --- a/projects/mtg/src/GuiAvatars.cpp +++ b/projects/mtg/src/GuiAvatars.cpp @@ -20,16 +20,16 @@ GuiAvatars::GuiAvatars(DuelLayers* duelLayers) : Add(opponent = NEW GuiAvatar(0, 0, false, mpDuelLayers->getRenderedPlayerOpponent(), GuiAvatar::TOP_LEFT, this)); opponent->zoom = 0.9f; //opponentExile - Add(opponentExile = NEW GuiExile(-30 + GuiAvatar::Width * 1.2 - GuiGameZone::Width / 2, 35 + GuiGameZone::Height - 10, + Add(opponentExile = NEW GuiExile(-30 + GuiAvatar::Width * 1.2f - GuiGameZone::Width / 2, 35 + GuiGameZone::Height - 10, false, mpDuelLayers->getRenderedPlayerOpponent(), this)); //opponentGraveyard - Add(opponentGraveyard = NEW GuiGraveyard(5 + GuiAvatar::Width * 1.4 - GuiGameZone::Width / 2, 5, false, + Add(opponentGraveyard = NEW GuiGraveyard(5 + GuiAvatar::Width * 1.4f - GuiGameZone::Width / 2, 5, false, mpDuelLayers->getRenderedPlayerOpponent(), this)); //opponentHand - Add(opponentHand = NEW GuiOpponentHand(-15 + GuiAvatar::Width * 1.4 - GuiGameZone::Width / 2, 35 + GuiGameZone::Height - 10, false, + Add(opponentHand = NEW GuiOpponentHand(-15 + GuiAvatar::Width * 1.4f - GuiGameZone::Width / 2, 35 + GuiGameZone::Height - 10, false, mpDuelLayers->getRenderedPlayerOpponent(), this)); //opponentLibrary - Add(opponentLibrary = NEW GuiLibrary(5 + GuiAvatar::Width * 1.4 - GuiGameZone::Width / 2, 5 + GuiGameZone::Height + 5, false, + Add(opponentLibrary = NEW GuiLibrary(5 + GuiAvatar::Width * 1.4f - GuiGameZone::Width / 2, 5 + GuiGameZone::Height + 5, false, mpDuelLayers->getRenderedPlayerOpponent(), this)); observer->getCardSelector()->Add(self); @@ -145,12 +145,12 @@ void GuiAvatars::Update(float dt) void GuiAvatars::Render() { JRenderer * r = JRenderer::GetInstance(); - float w = 54; - float h = 54; + float w = 52; + float h = 52; if (opponent == active) { - r->FillRect(opponent->actX, opponent->actY, 40 * opponent->actZ, h+20 * opponent->actZ, ARGB(200,0,0,0)); - r->FillRect(opponent->actX, opponent->actY, w * opponent->actZ, h * opponent->actZ, ARGB(200,0,0,0)); + r->FillRect(opponent->actX, opponent->actY, 34 * opponent->actZ, h+22 * opponent->actZ, ARGB(200,0,0,0)); + r->FillRect(opponent->actX, opponent->actY, (w * opponent->actZ)-1, (h * opponent->actZ)+2, ARGB(200,0,0,0)); } else if (self == active) { diff --git a/projects/mtg/src/GuiHand.cpp b/projects/mtg/src/GuiHand.cpp index 950585dd9..22daf0612 100644 --- a/projects/mtg/src/GuiHand.cpp +++ b/projects/mtg/src/GuiHand.cpp @@ -122,9 +122,9 @@ void GuiHandSelf::Repos() { float dist = 180.0f / cards.size(); if (dist > 20) - dist = 20.0; + dist = 18.0;//20.0 else - y = 40.0; + y = 35.0;//40.0 for (vector::iterator it = cards.begin(); it != cards.end(); ++it) { (*it)->x = ClosedRowX; diff --git a/projects/mtg/src/GuiPlay.cpp b/projects/mtg/src/GuiPlay.cpp index f0d14aa46..6e0ed09ff 100644 --- a/projects/mtg/src/GuiPlay.cpp +++ b/projects/mtg/src/GuiPlay.cpp @@ -62,12 +62,20 @@ void GuiPlay::HorzStack::Enstack(CardView* card) { card->x = x + baseX; card->y = y + baseY; - if (total < 8) + /*if (total < 8) x += CARD_WIDTH; else if (total < 16) x += (SCREEN_WIDTH - 200 - baseX) / total; else - x += (SCREEN_WIDTH - 50 - baseX) / total; + x += (SCREEN_WIDTH - 50 - baseX) / total;*/ + + // new adjustment + if (total < 8) + x += CARD_WIDTH; + else if (total < 24) + x += (SCREEN_WIDTH - 200 - baseX) / total; + else + x += (SCREEN_WIDTH - 70 - baseX) / total; } void GuiPlay::VertStack::Enstack(CardView* card) @@ -83,9 +91,10 @@ void GuiPlay::VertStack::Enstack(CardView* card) card->x = x + baseX; card->y = y + baseY; - y += 12; - if (++count == total - 1 && y == 12) - y += 12; + y += 9; + if (++count == total - 1 && y == 9) + y += 9; + //last value += 12... } void GuiPlay::VertStack::Render(CardView* card, iterator begin, iterator end) @@ -124,13 +133,13 @@ void GuiPlay::BattleField::reset(float x, float y) void GuiPlay::BattleField::EnstackAttacker(CardView* card) { //card->x = CARD_WIDTH + 20 + (currentAttacker * (HORZWIDTH) / (attackers+1)); - card->x = x + baseX; - if (total < 8) + card->x = x-4 + baseX; + if (attackers+1 < 8) x += CARD_WIDTH; - else if (total < 16) - x += (SCREEN_WIDTH - 200 - baseX) / total; + else if (attackers+1 < 24) + x += (SCREEN_WIDTH - 200 - baseX) / attackers+1; else - x += (SCREEN_WIDTH - 50 - baseX) / total; + x += (HORZWIDTH - baseX) / attackers+1; card->y = baseY + (card->card->getObserver()->getView()->getRenderedPlayer() == card->card->controller() ? 20 + y : -20 - y); ++currentAttacker; @@ -424,6 +433,8 @@ int GuiPlay::receiveEventPlus(WEvent * e) Replace(); else if (dynamic_cast (e)) Replace(); + else if (dynamic_cast (e)) + Replace(); Replace(); return 0; } diff --git a/projects/mtg/src/GuiStatic.cpp b/projects/mtg/src/GuiStatic.cpp index baa30379a..d41002585 100644 --- a/projects/mtg/src/GuiStatic.cpp +++ b/projects/mtg/src/GuiStatic.cpp @@ -88,11 +88,11 @@ void GuiAvatar::Render() } if (player->getObserver()->currentPlayer == player) - r->DrawRect(x0 - 1, y0 - 1, 36 * actZ, 51 * actZ, ARGB((int)actA, 0, 255, 0)); + r->DrawRect(x0 - 1, y0 - 1, (Width+1) * actZ, (Height+1) * actZ, ARGB((int)actA, 0, 255, 0)); else if (player->getObserver()->currentActionPlayer == player) - r->DrawRect(x0, y0, 34 * actZ, 49 * actZ, ARGB((int)actA, 0, 0, 255)); + r->DrawRect(x0, y0, (Width-1) * actZ, (Height-1) * actZ, ARGB((int)actA, 0, 0, 255)); if (player->getObserver()->isInterrupting == player) - r->DrawRect(x0, y0, 34 * actZ, 49 * actZ, ARGB((int)actA, 255, 0, 0)); + r->DrawRect(x0, y0, (Width-1) * actZ, (Height-1) * actZ, ARGB((int)actA, 255, 0, 0)); //Life char buffer[10]; diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 99fa8f123..b3055061e 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -371,6 +371,24 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe return 0; } + check = restriction[i].find("notdelirum"); + if (check != string::npos) + { + Player * checkCurrent = card->controller(); + MTGGameZone * grave = checkCurrent->game->graveyard; + + int checkTypesAmount = 0; + if(grave->hasType("creature")) checkTypesAmount++; + if (grave->hasType("enchantment")) checkTypesAmount++; + if (grave->hasType("sorcery")) checkTypesAmount++; + if (grave->hasType("instant")) checkTypesAmount++; + if (grave->hasType("land")) checkTypesAmount++; + if (grave->hasType("artifact")) checkTypesAmount++; + if (grave->hasType("planeswalker")) checkTypesAmount++; + if (checkTypesAmount > 3) + return 0; + } + check = restriction[i].find("miracle"); if(check != string::npos) { @@ -824,7 +842,7 @@ TriggeredAbility * AbilityFactory::parseTrigger(string s, string, int id, Spell fromTc->targetter = NULL; //avoid protection from } TriggeredAbility * mover = NEW TrCardAddedToZone(observer, id, card, (TargetZoneChooser *) toTc, - toTcCard, (TargetZoneChooser *) fromTc, fromTcCard, once, sourceUntapped, isSuspended); + toTcCard, (TargetZoneChooser *) fromTc, fromTcCard, once, sourceUntapped, isSuspended, limitOnceATurn); if(neverRemove) { mover->forcedAlive = 1; @@ -845,6 +863,10 @@ TriggeredAbility * AbilityFactory::parseTrigger(string s, string, int id, Spell if (TargetChooser *tc = parseSimpleTC(s,"tappedformana", card)) return NEW TrCardTappedformana(observer, id, card, tc, true,once); + //Card Transforms + if (TargetChooser *tc = parseSimpleTC(s,"transformed", card)) + return NEW TrCardTransformed(observer, id, card, tc,once); + //CombatTrigger //Card card attacked and is blocked found = s.find("combat("); @@ -2381,13 +2403,20 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG ATokenCreator * tok = NEW ATokenCreator(observer, id, card,target, NULL, tokenId, starfound, multiplier, who); tok->oneShot = 1; + //andability + if(storedAndAbility.size()) + { + string stored = storedAndAbility; + storedAndAbility.clear(); + ((ATokenCreator*)tok)->andAbility = parseMagicLine(stored, id, spell, card); + } return tok; } string tokenDesc = splitToken[1]; vector tokenParameters = split(tokenDesc, ','); //lets try finding a token by card name. - if (splitToken[1].size() && tokenParameters.size() ==1) + if (splitToken[1].size() && tokenParameters.size() <3) { string cardName = splitToken[1]; MTGCard * safetycard = MTGCollection()->getCardByName(cardName); @@ -2395,6 +2424,13 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG { ATokenCreator * tok = NEW ATokenCreator(observer, id, card, target, NULL, cardName, starfound, multiplier, who); tok->oneShot = 1; + //andability + if(storedAndAbility.size()) + { + string stored = storedAndAbility; + storedAndAbility.clear(); + ((ATokenCreator*)tok)->andAbility = parseMagicLine(stored, id, spell, card); + } return tok; } } @@ -2406,7 +2442,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG string sname = tokenParameters[0]; string stypes = tokenParameters[1]; string spt = tokenParameters[2]; - + string cID = ""; //reconstructing string abilities from the split version, // then we re-split it again in the token constructor, // this needs to be improved @@ -2416,6 +2452,12 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG sabilities.append(","); sabilities.append(tokenParameters[i]); } + if(sabilities.find(",tnum:") != string::npos) + { + size_t begins = sabilities.find(",tnum:"); + cID = sabilities.substr(begins+6); + sabilities = cReplaceString(sabilities,",tnum:"+cID,""); + } int value = 0; if (spt.find("xx/xx") != string::npos) value = card->X / 2; @@ -2427,10 +2469,17 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG ATokenCreator * tok = NEW ATokenCreator( observer, id, card,target, NULL, sname, stypes, power + value, toughness + value, - sabilities, starfound, multiplier, who, aLivingWeapon, spt); + sabilities, starfound, multiplier, who, aLivingWeapon, spt, cID); tok->oneShot = 1; if(aLivingWeapon) tok->forceDestroy = 1; + //andability + if(storedAndAbility.size()) + { + string stored = storedAndAbility; + storedAndAbility.clear(); + ((ATokenCreator*)tok)->andAbility = parseMagicLine(stored, id, spell, card); + } return tok; } @@ -2497,6 +2546,14 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG { MTGAbility * a = NEW AACopier(observer, id, card, target); a->oneShot = 1; + a->canBeInterrupted = false; + //andability + if(storedAndAbility.size()) + { + string stored = storedAndAbility; + storedAndAbility.clear(); + ((AACopier*)a)->andAbility = parseMagicLine(stored, id, spell, card); + } return a; } diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index 1c24782e9..cf5d094cc 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -64,7 +64,6 @@ MTGCardInstance::MTGCardInstance(MTGCard * card, MTGPlayerCards * arg_belongs_to bypassTC = false; discarded = false; copiedID = getId(); - modifiedbAbi = 0; LKIpower = power; LKItoughness = toughness; cardistargetted = 0; @@ -99,16 +98,8 @@ void MTGCardInstance::copy(MTGCardInstance * card) { MTGCard * source = card->model; CardPrimitive * data = source->data; - - //basicAbilities = card->origbasicAbilities; - for(int k = 0; k < Constants::NB_BASIC_ABILITIES; k++) - { - if(card->model->data->basicAbilities[k]) - basicAbilities[k] = card->model->data->basicAbilities[k]; - } - - origbasicAbilities = card->origbasicAbilities; - modifiedbAbi = card->modifiedbAbi; + basicAbilities = card->model->data->basicAbilities; + modbasicAbilities = card->modbasicAbilities; for (size_t i = 0; i < data->types.size(); i++) { types.push_back(data->types[i]); @@ -145,14 +136,15 @@ void MTGCardInstance::copy(MTGCardInstance * card) mtgid = backupid; // there must be a way to get the token id... else { - mtgid = card->getMTGId(); /////////////////////////////////////////////////// - setId = card->setId; // Copier/Cloner cards produces the same token...// - rarity = card->getRarity(); /////////////////////////////////////////////////// + mtgid = card->getMTGId(); /////////////////////////////////////////////////// + setId = card->setId; // Copier/Cloner cards produces the same token...// + //rarity = card->getRarity(); /////////////////////////////////////////////////// } castMethod = castMethodBackUP; backupTargets = this->backupTargets; storedCard = oldStored; miracle = false; + mPropertiesChangedSinceLastUpdate = true; } MTGCardInstance::~MTGCardInstance() @@ -269,6 +261,7 @@ void MTGCardInstance::initMTGCI() previousZone = NULL; previous = NULL; next = NULL; + TokenAndAbility = NULL; lastController = NULL; regenerateTokens = 0; blocked = false; @@ -615,7 +608,7 @@ int MTGCardInstance::hasSummoningSickness() { if (!summoningSickness) return 0; - if (basicAbilities[(int)Constants::HASTE]) + if (has(Constants::HASTE)) return 0; if (!isCreature()) return 0; diff --git a/projects/mtg/src/MTGDefinitions.cpp b/projects/mtg/src/MTGDefinitions.cpp index 9a3e29f1d..7474192c1 100644 --- a/projects/mtg/src/MTGDefinitions.cpp +++ b/projects/mtg/src/MTGDefinitions.cpp @@ -168,7 +168,9 @@ const char* Constants::MTGBasicAbilities[] = { "shackler", "flyersonly", "tempflashback", - "legendruleremove" + "legendruleremove", + "canttransform", + "asflash" }; map Constants::MTGBasicAbilitiesMap; diff --git a/projects/mtg/src/MTGRules.cpp b/projects/mtg/src/MTGRules.cpp index 04cc78dbf..d7c8acb38 100644 --- a/projects/mtg/src/MTGRules.cpp +++ b/projects/mtg/src/MTGRules.cpp @@ -334,7 +334,7 @@ int MTGPutInPlayRule::isReactingToClick(MTGCardInstance * card, ManaCost *) else return 0; } - else if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || (card->StackIsEmptyandSorcerySpeed())) + else if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || card->has(Constants::ASFLASH) || (card->StackIsEmptyandSorcerySpeed())) { if(card->controller()->epic) return 0; @@ -559,7 +559,7 @@ int MTGKickerRule::isReactingToClick(MTGCardInstance * card, ManaCost *) if(!card->getManaCost()->getKicker()) return 0; - if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || (card->StackIsEmptyandSorcerySpeed())) + if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || card->has(Constants::ASFLASH) || (card->StackIsEmptyandSorcerySpeed())) { if(card->controller()->epic) return 0; @@ -748,7 +748,7 @@ int MTGAlternativeCostRule::isReactingToClick(MTGCardInstance * card, ManaCost * else return 0; } - else if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || card->has(Constants::SPELLMASTERY) || card->has(Constants::OFFERING) || (card->StackIsEmptyandSorcerySpeed())) + else if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || card->has(Constants::ASFLASH) || card->has(Constants::SPELLMASTERY) || card->has(Constants::OFFERING) || (card->StackIsEmptyandSorcerySpeed())) { if(card->controller()->epic) return 0; @@ -1313,7 +1313,7 @@ int MTGMorphCostRule::isReactingToClick(MTGCardInstance * card, ManaCost *) if(card->controller()->epic)//zoetic cavern... morph is casted for a cost... return 0; //note lands can morph too, this is different from other cost types. - if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || (card->StackIsEmptyandSorcerySpeed())) + if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || card->has(Constants::ASFLASH) || (card->StackIsEmptyandSorcerySpeed())) { if (card->controller()->game->playRestrictions->canPutIntoZone(card, card->controller()->game->stack) == PlayRestriction::CANT_PLAY) return 0; @@ -1661,8 +1661,7 @@ int MTGAttackCostRule::reactToClick(MTGCardInstance * card) Player * player = game->currentlyActing(); ManaCost * attackcost = NEW ManaCost(ManaCost::parseManaCost("{0}",NULL,NULL)); attackcost->add(0,card->attackCostBackup); - ManaCost * playerMana = player->getManaPool(); - playerMana->pay(attackcost);//I think you can't pay partial cost to attack cost so you pay full (508.1i) + player->getManaPool()->pay(attackcost);//I think you can't pay partial cost to attack cost so you pay full (508.1i) card->attackCost = 0; card->attackPlaneswalkerCost = 0; SAFE_DELETE(attackcost); @@ -1737,8 +1736,7 @@ int MTGBlockCostRule::reactToClick(MTGCardInstance * card) Player * player = game->currentlyActing(); ManaCost * blockcost = NEW ManaCost(ManaCost::parseManaCost("{0}",NULL,NULL)); blockcost->add(0,card->blockCostBackup); - ManaCost * playerMana = player->getManaPool(); - playerMana->pay(blockcost);//I think you can't pay partial cost to block cost so you pay full (509.1f) + player->getManaPool()->pay(blockcost);//I think you can't pay partial cost to block cost so you pay full (509.1f) card->blockCost = 0; SAFE_DELETE(blockcost); return 1; @@ -1836,6 +1834,8 @@ int MTGAttackRule::receiveEvent(WEvent *e) card->setAttacker(0); if (card->isAttacker() && !card->has(Constants::VIGILANCE)) card->tap(); + if (card->isAttacker() && card->has(Constants::CANTATTACK)) + card->toggleAttacker();//if a card has cantattack, then you cant } return 1; } diff --git a/projects/mtg/src/ManaCost.cpp b/projects/mtg/src/ManaCost.cpp index c33f1cf17..77f67eb65 100644 --- a/projects/mtg/src/ManaCost.cpp +++ b/projects/mtg/src/ManaCost.cpp @@ -666,6 +666,30 @@ void ManaCost::copy(ManaCost * _manaCost) xColor = _manaCost->xColor; } +void ManaCost::changeCostTo(ManaCost * _manaCost) +{ + if (!_manaCost) + return; + + cost.erase(cost.begin() ,cost.end()); + + for (int i = 0; i <= Constants::NB_Colors; i++) + { + cost.push_back(_manaCost->getCost(i)); + } + + hybrids = _manaCost->hybrids; + + SAFE_DELETE(extraCosts); + + if (_manaCost->extraCosts) + { + extraCosts = _manaCost->extraCosts->clone(); + } + + xColor = _manaCost->xColor; +} + int ManaCost::getCost(int color) { if (cost.size() <= (size_t)color) diff --git a/projects/mtg/src/Player.cpp b/projects/mtg/src/Player.cpp index 7623e32e0..6fcb9b0fd 100644 --- a/projects/mtg/src/Player.cpp +++ b/projects/mtg/src/Player.cpp @@ -26,6 +26,7 @@ Player::Player(GameObserver *observer, string file, string fileSmall, MTGDeck * nomaxhandsize = false; poisonCount = 0; damageCount = 0; + nonCombatDamage = 0; preventable = 0; mAvatarTex = NULL; type_as_damageable = DAMAGEABLE_PLAYER; diff --git a/projects/mtg/src/WEvent.cpp b/projects/mtg/src/WEvent.cpp index 3aa726596..f1aef1574 100644 --- a/projects/mtg/src/WEvent.cpp +++ b/projects/mtg/src/WEvent.cpp @@ -231,6 +231,11 @@ WEventCardControllerChange::WEventCardControllerChange(MTGCardInstance * card) : { } +WEventCardTransforms::WEventCardTransforms(MTGCardInstance * card) : + WEventCardUpdate(card) +{ +} + WEventCombatStepChange::WEventCombatStepChange(CombatStep step) : WEvent(), step(step) { @@ -397,6 +402,12 @@ Targetable * WEventCardControllerChange::getTarget(int target) return NULL; } +Targetable * WEventCardTransforms::getTarget(int target) +{ + if (target) return card; + return NULL; +} + std::ostream& WEvent::toString(std::ostream& out) const { return out << "EVENT"; diff --git a/projects/mtg/src/WResourceManager.cpp b/projects/mtg/src/WResourceManager.cpp index 46c51df68..3557e0dec 100644 --- a/projects/mtg/src/WResourceManager.cpp +++ b/projects/mtg/src/WResourceManager.cpp @@ -263,6 +263,46 @@ JQuadPtr ResourceManagerImpl::RetrieveCard(MTGCard * card, int style, int submod return JQuadPtr(); } +JQuadPtr ResourceManagerImpl::RetrieveCardToken(MTGCard * card, int style, int submode, int tId) +{ + //Cards are never, ever resource managed, so just check cache. + if (!card || options[Options::DISABLECARDS].number) return JQuadPtr(); + + submode = submode | TEXTURE_SUB_CARD; + + //static std::ostringstream filename; + //filename.str(""); + string filename; + filename.reserve(4096); + //filename << setlist[card->setId] << "/" << card->getImageName(); + filename.append(setlist[card->setId]); + filename.append("/"); + int id = -card->getMTGId(); + if(tId) + id = -tId; + ostringstream imagename; + imagename << "-" << id << "t.jpg"; + filename.append(imagename.str()); + + //Aliases. + if (style == RETRIEVE_THUMB) + { + submode = submode | TEXTURE_SUB_THUMB; + style = RETRIEVE_NORMAL; + } + + JQuadPtr jq = RetrieveQuad(filename, 0, 0, 0, 0, "", style, submode | TEXTURE_SUB_5551, id); + + lastError = textureWCache.mError; + if (jq) + { + jq->SetHotSpot(static_cast (jq->mTex->mWidth / 2), static_cast (jq->mTex->mHeight / 2)); + return jq; + } + + return JQuadPtr(); +} + int ResourceManagerImpl::AddQuadToManaged(const WManagedQuad& inQuad) { int id = mIDLookupMap.size();