diff --git a/.travis.yml b/.travis.yml index a34e11b85..9b360a1ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ before_install: export ANDROID="android-sdk-linux/tools/android" && if [ `uname -m` = x86_64 ]; then sudo apt-get install -qq --force-yes libgd2-xpm ia32-libs ia32-libs-multiarch jq; fi && wget http://dl.google.com/android/ndk/android-ndk-r9-linux-x86_64.tar.bz2 -nv && - wget http://dl.google.com/android/android-sdk_r24.0.2-linux.tgz -nv; + wget http://dl.google.com/android/android-sdk_r24.3.4-linux.tgz -nv; fi # Building for Qt here - if [ "$BUILD_Qt" == "YES" ]; then @@ -37,9 +37,9 @@ install: fi - if [ "$BUILD_ANDROID" == "YES" ]; then tar --absolute-names -jxf android-ndk-r9-linux-x86_64.tar.bz2 && - tar -zxf android-sdk_r24.0.2-linux.tgz && + tar -zxf android-sdk_r24.3.4-linux.tgz && $ANDROID list sdk --extended -a && - echo yes | $ANDROID update sdk --filter tools,platform-tools,build-tools-21.1.2,android-10 --no-ui --force --no-https; + echo yes | $ANDROID update sdk -a -t tools,platform-tools,build-tools-23.0.1,android-10 --no-ui --force --no-https; fi - sudo pip install pyjavaproperties - sudo pip install github3.py diff --git a/JGE/include/JLBFont.h b/JGE/include/JLBFont.h index 3c911a9ce..79031f3e5 100644 --- a/JGE/include/JLBFont.h +++ b/JGE/include/JLBFont.h @@ -178,8 +178,6 @@ private: float mSpacing; PIXEL_TYPE mColor; - int mBlend; - int mBase; }; diff --git a/JGE/include/JRenderer.h b/JGE/include/JRenderer.h index 0a7b264e3..452ac4955 100644 --- a/JGE/include/JRenderer.h +++ b/JGE/include/JRenderer.h @@ -598,8 +598,6 @@ private: GLint prog2_positionLoc; GLint prog2_texCoordLoc; GLint prog2_colorLoc; - // MVP matrix - ESMatrix prog2_mvpMatrix; // Uniform locations GLint prog2_mvpLoc; @@ -612,13 +610,11 @@ private: int mCurrentTextureFormat; #endif +#ifdef PSP bool mVsync; - + int mTexCounter; +#endif int mSwizzle; - int mTexCounter; - - - int mCurrentTextureFilter; int mCurrTexBlendSrc; diff --git a/JGE/include/JSoundSystem.h b/JGE/include/JSoundSystem.h index 130935813..50771a646 100644 --- a/JGE/include/JSoundSystem.h +++ b/JGE/include/JSoundSystem.h @@ -258,7 +258,9 @@ private: #endif int mVolume; +#ifndef IOS int mMusicVolume; +#endif int mSampleVolume; diff --git a/JGE/include/JSpline.h b/JGE/include/JSpline.h index e5b6f28e2..ca0c57eee 100644 --- a/JGE/include/JSpline.h +++ b/JGE/include/JSpline.h @@ -18,12 +18,11 @@ using namespace std; #define MID_POINT_THRESHOLD 1.0f - ////////////////////////////////////////////////////////////////////////// /// Position of a single dot on screen. /// ////////////////////////////////////////////////////////////////////////// -class Point +class JPoint { public: @@ -34,13 +33,13 @@ public: /// @param _y - Y position. /// ////////////////////////////////////////////////////////////////////////// - Point(float _x, float _y) { x = _x; y = _y; } + JPoint(float _x, float _y) { x = _x; y = _y; } ////////////////////////////////////////////////////////////////////////// /// Constructor, set position to default (0.0f, 0.0f) /// ////////////////////////////////////////////////////////////////////////// - Point() { x = 0.0f; y = 0.0f; } + JPoint() { x = 0.0f; y = 0.0f; } float x; ///< X position. float y; ///< Y position. @@ -95,7 +94,7 @@ public: /// @param pt - Control point. /// ////////////////////////////////////////////////////////////////////////// - void AddControlPoint(const Point &pt); + void AddControlPoint(const JPoint &pt); ////////////////////////////////////////////////////////////////////////// /// Get a control point of the spline. @@ -105,7 +104,7 @@ public: /// @return Control point. /// ////////////////////////////////////////////////////////////////////////// - void GetControlPoint(Point &point, int index); + void GetControlPoint(JPoint &point, int index); ////////////////////////////////////////////////////////////////////////// /// Work out all pixels of the spline. @@ -128,7 +127,7 @@ public: /// @return Position of the desire point. /// ////////////////////////////////////////////////////////////////////////// - void PointOnCurve(Point &out, float t, const Point &p0, const Point &p1, const Point &p2, const Point &p3); + void PointOnCurve(JPoint &out, float t, const JPoint &p0, const JPoint &p1, const JPoint &p2, const JPoint &p3); ////////////////////////////////////////////////////////////////////////// /// Get a number of pixels for this spline. @@ -146,7 +145,7 @@ public: /// @return Position of the desire point. /// ////////////////////////////////////////////////////////////////////////// - void GetPixel(Point &point, int index); + void GetPixel(JPoint &point, int index); ////////////////////////////////////////////////////////////////////////// /// Render the spline to screen. @@ -156,8 +155,8 @@ public: private: - vector mMidPoints; - vector mPixels; + vector mMidPoints; + vector mPixels; int mCount; }; diff --git a/JGE/include/Threading.h b/JGE/include/Threading.h index 73036a27d..adfe4084e 100644 --- a/JGE/include/Threading.h +++ b/JGE/include/Threading.h @@ -311,9 +311,7 @@ namespace boost #include #include - -#include -#include +#include #include "../include/JLogger.h" @@ -420,23 +418,25 @@ namespace boost virtual void run() = 0; }; - typedef boost::shared_ptr thread_data_ptr; - template + typedef QSharedPointer thread_data_ptr; + + template class thread_data : public detail::thread_data_base { public: - thread_data(F f_) : f(f_) + thread_data(F f_, A1 a1_) : f(f_), a1(a1_) { } void run() { - f(); + f(a1); } private: F f; + A1 a1; void operator=(thread_data&); thread_data(thread_data&); @@ -493,7 +493,7 @@ namespace boost } template - thread(F f, A1 a1) : mThreadInfo(make_thread_info(boost::bind(boost::type(), f, a1))) + thread(F f, A1 a1) : mThreadInfo(make_thread_info(f, a1)) { mpThread = new threadImpl(mThreadInfo); LOG("Calling start func"); @@ -510,10 +510,10 @@ namespace boost } private: - template - static inline detail::thread_data_ptr make_thread_info(F f) + template + static inline detail::thread_data_ptr make_thread_info(F f, A1 a1) { - return detail::thread_data_ptr(new detail::thread_data(f)); + return detail::thread_data_ptr(new detail::thread_data(f, a1)); } detail::thread_data_ptr mThreadInfo; diff --git a/JGE/src/JFileSystem.cpp b/JGE/src/JFileSystem.cpp index 7d190c562..4eeff8f4f 100644 --- a/JGE/src/JFileSystem.cpp +++ b/JGE/src/JFileSystem.cpp @@ -38,6 +38,12 @@ The content that users should not be touching. #include #endif +/* +#ifdef IOS +#include +#endif +*/ + JFileSystem* JFileSystem::mInstance = NULL; JZipCache::JZipCache() @@ -248,7 +254,7 @@ void JFileSystem::clearZipCache() bool JFileSystem::AttachZipFile(const string &zipfile, char *password /* = NULL */) { - if (mZipAvailable && mZipFile != NULL) + if (mZipAvailable && mZipFile.is_open()) { if (mZipFileName != zipfile) DetachZipFile(); // close the previous zip file diff --git a/JGE/src/JSpline.cpp b/JGE/src/JSpline.cpp index 05d17958e..2131fb02c 100644 --- a/JGE/src/JSpline.cpp +++ b/JGE/src/JSpline.cpp @@ -71,7 +71,7 @@ bool JSpline::Load(const char *filename, float xscale, float yscale) element->QueryFloatAttribute("x", &xx); element->QueryFloatAttribute("y", &yy); - Point pt(xx*xscale, yy*yscale); + JPoint pt(xx*xscale, yy*yscale); AddControlPoint(pt); } @@ -84,7 +84,7 @@ bool JSpline::Load(const char *filename, float xscale, float yscale) -void JSpline::PointOnCurve(Point &out, float t, const Point &p0, const Point &p1, const Point &p2, const Point &p3) +void JSpline::PointOnCurve(JPoint &out, float t, const JPoint &p0, const JPoint &p1, const JPoint &p2, const JPoint &p3) { float t2 = t * t; float t3 = t2 * t; @@ -113,8 +113,8 @@ void JSpline::GeneratePixels() x = mMidPoints[1].x; y = mMidPoints[1].y; - Point newPt(x, y); - Point extraPt; + JPoint newPt(x, y); + JPoint extraPt; mPixels.push_back(newPt); @@ -151,13 +151,13 @@ void JSpline::GeneratePixels() } -void JSpline::AddControlPoint(const Point &pt) +void JSpline::AddControlPoint(const JPoint &pt) { mMidPoints.push_back(pt); } -void JSpline::GetControlPoint(Point &point, int index) +void JSpline::GetControlPoint(JPoint &point, int index) { if (index < (int)mMidPoints.size()) { @@ -167,7 +167,7 @@ void JSpline::GetControlPoint(Point &point, int index) } -void JSpline::GetPixel(Point &point, int index) +void JSpline::GetPixel(JPoint &point, int index) { if (index < (int)mPixels.size()) { diff --git a/JGE/src/iOS/EAGLViewController.h b/JGE/src/iOS/EAGLViewController.h index 3cc59827e..743644c10 100755 --- a/JGE/src/iOS/EAGLViewController.h +++ b/JGE/src/iOS/EAGLViewController.h @@ -10,5 +10,6 @@ void resumeGame(); @property (nonatomic, retain) id eaglView; @property (nonatomic, retain) UITextField *inputField; @property (nonatomic, assign) BOOL bannerIsVisible; +- (void)toggleKeyboardWithState: (NSString *) initialText; @end diff --git a/JGE/src/iOS/EAGLViewController.m b/JGE/src/iOS/EAGLViewController.m index 4ad3950b1..d0f93b9c3 100755 --- a/JGE/src/iOS/EAGLViewController.m +++ b/JGE/src/iOS/EAGLViewController.m @@ -53,28 +53,28 @@ - (void)viewWillAppear:(BOOL)animated { NSLog(@"EAGL ViewController - view Will Appear"); - [self.view resumeGame]; + [(id)self.view resumeGame]; } - (void)viewWillDisappear:(BOOL)animated { - [self.view pauseGame]; + [(id)self.view pauseGame]; } - (void)pauseGame { - [self.view pauseGame]; + [(id)self.view pauseGame]; } - (void)resumeGame { - [self.view resumeGame]; + [(id)self.view resumeGame]; } - (void)endGame { - [self.view endGame]; + [(id)self.view endGame]; } - (void)viewDidAppear:(BOOL)animated { diff --git a/JGE/src/iOS/wagicAppDelegate.m b/JGE/src/iOS/wagicAppDelegate.m index 909c639dc..607b05afa 100755 --- a/JGE/src/iOS/wagicAppDelegate.m +++ b/JGE/src/iOS/wagicAppDelegate.m @@ -337,7 +337,7 @@ - (void)applicationWillTerminate:(UIApplication *)application { - [self.glViewController.view destroyGame]; + [(id)self.glViewController.view destroyGame]; } - (void)initializeKeyboard: (id) initialState diff --git a/JGE/src/pc/JSocket.cpp b/JGE/src/pc/JSocket.cpp index 49eb7165a..f04d36913 100644 --- a/JGE/src/pc/JSocket.cpp +++ b/JGE/src/pc/JSocket.cpp @@ -7,6 +7,7 @@ #include #include #elif LINUX +#include #include #include #include diff --git a/JGE/src/unzip/crypt.h b/JGE/src/unzip/crypt.h index 622f4bc2e..91e13f2ed 100644 --- a/JGE/src/unzip/crypt.h +++ b/JGE/src/unzip/crypt.h @@ -87,13 +87,13 @@ static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned lon # define ZCR_SEED2 3141592654UL /* use PI as default pattern */ # endif -static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting) - const char *passwd; /* password string */ - unsigned char *buf; /* where to write header */ - int bufSize; - unsigned long* pkeys; - const unsigned long* pcrc_32_tab; - unsigned long crcForCrypting; +static int crypthead( + const char *passwd, /* password string */ + unsigned char *buf, /* where to write header */ + int bufSize, + unsigned long* pkeys, + const unsigned long* pcrc_32_tab, + unsigned long crcForCrypting) { int n; /* index in random header */ int t; /* temporary */ diff --git a/JGE/src/unzip/ioapi.c b/JGE/src/unzip/ioapi.c index f1bee23e6..160119939 100644 --- a/JGE/src/unzip/ioapi.c +++ b/JGE/src/unzip/ioapi.c @@ -65,10 +65,10 @@ int ZCALLBACK ferror_file_func OF(( voidpf stream)); -voidpf ZCALLBACK fopen_file_func (opaque, filename, mode) - voidpf opaque; - const char* filename; - int mode; +voidpf ZCALLBACK fopen_file_func ( + voidpf opaque, + const char* filename, + int mode) { FILE* file = NULL; const char* mode_fopen = NULL; @@ -87,11 +87,11 @@ voidpf ZCALLBACK fopen_file_func (opaque, filename, mode) } -uLong ZCALLBACK fread_file_func (opaque, stream, buf, size) - voidpf opaque; - voidpf stream; - void* buf; - uLong size; +uLong ZCALLBACK fread_file_func ( + voidpf opaque, + voidpf stream, + void* buf, + uLong size) { uLong ret; ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream); @@ -99,31 +99,31 @@ uLong ZCALLBACK fread_file_func (opaque, stream, buf, size) } -uLong ZCALLBACK fwrite_file_func (opaque, stream, buf, size) - voidpf opaque; - voidpf stream; - const void* buf; - uLong size; +uLong ZCALLBACK fwrite_file_func ( + voidpf opaque, + voidpf stream, + const void* buf, + uLong size) { uLong ret; ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream); return ret; } -long ZCALLBACK ftell_file_func (opaque, stream) - voidpf opaque; - voidpf stream; +long ZCALLBACK ftell_file_func ( + voidpf opaque, + voidpf stream) { long ret; ret = ftell((FILE *)stream); return ret; } -long ZCALLBACK fseek_file_func (opaque, stream, offset, origin) - voidpf opaque; - voidpf stream; - uLong offset; - int origin; +long ZCALLBACK fseek_file_func ( + voidpf opaque, + voidpf stream, + uLong offset, + int origin) { int fseek_origin=0; long ret; @@ -145,26 +145,26 @@ long ZCALLBACK fseek_file_func (opaque, stream, offset, origin) return ret; } -int ZCALLBACK fclose_file_func (opaque, stream) - voidpf opaque; - voidpf stream; +int ZCALLBACK fclose_file_func ( + voidpf opaque, + voidpf stream) { int ret; ret = fclose((FILE *)stream); return ret; } -int ZCALLBACK ferror_file_func (opaque, stream) - voidpf opaque; - voidpf stream; +int ZCALLBACK ferror_file_func ( + voidpf opaque, + voidpf stream) { int ret; ret = ferror((FILE *)stream); return ret; } -void fill_fopen_filefunc (pzlib_filefunc_def) - zlib_filefunc_def* pzlib_filefunc_def; +void fill_fopen_filefunc ( + zlib_filefunc_def* pzlib_filefunc_def) { pzlib_filefunc_def->zopen_file = fopen_file_func; pzlib_filefunc_def->zread_file = fread_file_func; diff --git a/JGE/src/unzip/unzip.c b/JGE/src/unzip/unzip.c index 0b122e4fe..79e77181d 100644 --- a/JGE/src/unzip/unzip.c +++ b/JGE/src/unzip/unzip.c @@ -168,10 +168,7 @@ local int unzlocal_getByte OF(( voidpf filestream, int *pi)); -local int unzlocal_getByte(pzlib_filefunc_def,filestream,pi) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; - int *pi; +local int unzlocal_getByte(const zlib_filefunc_def* pzlib_filefunc_def,voidpf filestream,int *pi) { unsigned char c; int err = (int)ZREAD(*pzlib_filefunc_def,filestream,&c,1); @@ -198,10 +195,7 @@ local int unzlocal_getShort OF(( voidpf filestream, uLong *pX)); -local int unzlocal_getShort (pzlib_filefunc_def,filestream,pX) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; - uLong *pX; +local int unzlocal_getShort (const zlib_filefunc_def* pzlib_filefunc_def,voidpf filestream,uLong *pX) { uLong x ; int i; @@ -226,10 +220,7 @@ local int unzlocal_getLong OF(( voidpf filestream, uLong *pX)); -local int unzlocal_getLong (pzlib_filefunc_def,filestream,pX) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; - uLong *pX; +local int unzlocal_getLong (const zlib_filefunc_def* pzlib_filefunc_def,voidpf filestream,uLong *pX) { uLong x ; int i; @@ -259,9 +250,7 @@ local int unzlocal_getLong (pzlib_filefunc_def,filestream,pX) /* My own strcmpi / strcasecmp */ -local int strcmpcasenosensitive_internal (fileName1,fileName2) - const char* fileName1; - const char* fileName2; +local int strcmpcasenosensitive_internal (const char* fileName1,const char* fileName2) { for (;;) { @@ -302,10 +291,7 @@ local int strcmpcasenosensitive_internal (fileName1,fileName2) (like 1 on Unix, 2 on Windows) */ -extern int ZEXPORT unzStringFileNameCompare (fileName1,fileName2,iCaseSensitivity) - const char* fileName1; - const char* fileName2; - int iCaseSensitivity; +extern int ZEXPORT unzStringFileNameCompare (const char* fileName1,const char* fileName2,int iCaseSensitivity) { if (iCaseSensitivity==0) iCaseSensitivity=CASESENSITIVITYDEFAULTVALUE; @@ -328,9 +314,7 @@ local uLong unzlocal_SearchCentralDir OF(( const zlib_filefunc_def* pzlib_filefunc_def, voidpf filestream)); -local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; +local uLong unzlocal_SearchCentralDir(const zlib_filefunc_def* pzlib_filefunc_def,voidpf filestream) { unsigned char* buf; uLong uSizeFile; @@ -394,9 +378,7 @@ local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream) Else, the return value is a unzFile Handle, usable with other function of this unzip package. */ -extern unzFile ZEXPORT unzOpen2 (path, pzlib_filefunc_def) - const char *path; - zlib_filefunc_def* pzlib_filefunc_def; +extern unzFile ZEXPORT unzOpen2 (const char *path, zlib_filefunc_def* pzlib_filefunc_def) { unz_s us; unz_s *s; @@ -497,8 +479,7 @@ extern unzFile ZEXPORT unzOpen2 (path, pzlib_filefunc_def) } -extern unzFile ZEXPORT unzOpen (path) - const char *path; +extern unzFile ZEXPORT unzOpen (const char *path) { return unzOpen2(path, NULL); } @@ -508,8 +489,7 @@ extern unzFile ZEXPORT unzOpen (path) If there is files inside the .Zip opened with unzipOpenCurrentFile (see later), these files MUST be closed with unzipCloseCurrentFile before call unzipClose. return UNZ_OK if there is no problem. */ -extern int ZEXPORT unzClose (file) - unzFile file; +extern int ZEXPORT unzClose (unzFile file) { unz_s* s; if (file==NULL) @@ -529,9 +509,7 @@ extern int ZEXPORT unzClose (file) Write info about the ZipFile in the *pglobal_info structure. No preparation of the structure is needed return UNZ_OK if there is no problem. */ -extern int ZEXPORT unzGetGlobalInfo (file,pglobal_info) - unzFile file; - unz_global_info *pglobal_info; +extern int ZEXPORT unzGetGlobalInfo (unzFile file,unz_global_info *pglobal_info) { unz_s* s; if (file==NULL) @@ -545,9 +523,7 @@ extern int ZEXPORT unzGetGlobalInfo (file,pglobal_info) /* Translate date/time from Dos format to tm_unz (readable more easilty) */ -local void unzlocal_DosDateToTmuDate (ulDosDate, ptm) - uLong ulDosDate; - tm_unz* ptm; +local void unzlocal_DosDateToTmuDate (uLong ulDosDate, tm_unz* ptm) { uLong uDate; uDate = (uLong)(ulDosDate>>16); @@ -574,21 +550,16 @@ local int unzlocal_GetCurrentFileInfoInternal OF((unzFile file, char *szComment, uLong commentBufferSize)); -local int unzlocal_GetCurrentFileInfoInternal (file, - pfile_info, - pfile_info_internal, - szFileName, fileNameBufferSize, - extraField, extraFieldBufferSize, - szComment, commentBufferSize) - unzFile file; - unz_file_info *pfile_info; - unz_file_info_internal *pfile_info_internal; - char *szFileName; - uLong fileNameBufferSize; - void *extraField; - uLong extraFieldBufferSize; - char *szComment; - uLong commentBufferSize; +local int unzlocal_GetCurrentFileInfoInternal ( + unzFile file, + unz_file_info *pfile_info, + unz_file_info_internal *pfile_info_internal, + char *szFileName, + uLong fileNameBufferSize, + void *extraField, + uLong extraFieldBufferSize, + char *szComment, + uLong commentBufferSize) { unz_s* s; unz_file_info file_info; @@ -746,19 +717,15 @@ local int unzlocal_GetCurrentFileInfoInternal (file, No preparation of the structure is needed return UNZ_OK if there is no problem. */ -extern int ZEXPORT unzGetCurrentFileInfo (file, - pfile_info, - szFileName, fileNameBufferSize, - extraField, extraFieldBufferSize, - szComment, commentBufferSize) - unzFile file; - unz_file_info *pfile_info; - char *szFileName; - uLong fileNameBufferSize; - void *extraField; - uLong extraFieldBufferSize; - char *szComment; - uLong commentBufferSize; +extern int ZEXPORT unzGetCurrentFileInfo ( + unzFile file, + unz_file_info *pfile_info, + char *szFileName, + uLong fileNameBufferSize, + void *extraField, + uLong extraFieldBufferSize, + char *szComment, + uLong commentBufferSize) { return unzlocal_GetCurrentFileInfoInternal(file,pfile_info,NULL, szFileName,fileNameBufferSize, @@ -770,8 +737,7 @@ extern int ZEXPORT unzGetCurrentFileInfo (file, Set the current file of the zipfile to the first file. return UNZ_OK if there is no problem */ -extern int ZEXPORT unzGoToFirstFile (file) - unzFile file; +extern int ZEXPORT unzGoToFirstFile (unzFile file) { int err=UNZ_OK; unz_s* s; @@ -792,8 +758,7 @@ extern int ZEXPORT unzGoToFirstFile (file) return UNZ_OK if there is no problem return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. */ -extern int ZEXPORT unzGoToNextFile (file) - unzFile file; +extern int ZEXPORT unzGoToNextFile (unzFile file) { unz_s* s; int err; @@ -826,10 +791,7 @@ extern int ZEXPORT unzGoToNextFile (file) UNZ_OK if the file is found. It becomes the current file. UNZ_END_OF_LIST_OF_FILE if the file is not found */ -extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity) - unzFile file; - const char *szFileName; - int iCaseSensitivity; +extern int ZEXPORT unzLocateFile (unzFile file, const char *szFileName, int iCaseSensitivity) { unz_s* s; int err; @@ -905,9 +867,7 @@ typedef struct unz_file_pos_s } unz_file_pos; */ -extern int ZEXPORT unzGetFilePos(file, file_pos) - unzFile file; - unz_file_pos* file_pos; +extern int ZEXPORT unzGetFilePos(unzFile file, unz_file_pos* file_pos) { unz_s* s; @@ -923,9 +883,7 @@ extern int ZEXPORT unzGetFilePos(file, file_pos) return UNZ_OK; } -extern int ZEXPORT unzGoToFilePos(file, file_pos) - unzFile file; - unz_file_pos* file_pos; +extern int ZEXPORT unzGoToFilePos(unzFile file, unz_file_pos*file_pos) { unz_s* s; int err; @@ -959,13 +917,11 @@ extern int ZEXPORT unzGoToFilePos(file, file_pos) store in *piSizeVar the size of extra info in local header (filename and size of extra field data) */ -local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar, - poffset_local_extrafield, - psize_local_extrafield) - unz_s* s; - uInt* piSizeVar; - uLong *poffset_local_extrafield; - uInt *psize_local_extrafield; +local int unzlocal_CheckCurrentFileCoherencyHeader ( + unz_s* s, + uInt* piSizeVar, + uLong *poffset_local_extrafield, + uInt *psize_local_extrafield) { uLong uMagic,uData,uFlags; uLong size_filename; @@ -1050,12 +1006,12 @@ local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar, Open for reading data the current file in the zipfile. If there is no error and the file is opened, the return value is UNZ_OK. */ -extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password) - unzFile file; - int* method; - int* level; - int raw; - const char* password; +extern int ZEXPORT unzOpenCurrentFile3 ( + unzFile file, + int* method, + int* level, + int raw, + const char* password) { int err=UNZ_OK; uInt iSizeVar; @@ -1136,7 +1092,7 @@ extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password) pfile_in_zip_read_info->stream.zalloc = (alloc_func)0; pfile_in_zip_read_info->stream.zfree = (free_func)0; pfile_in_zip_read_info->stream.opaque = (voidpf)0; - pfile_in_zip_read_info->stream.next_in = (voidpf)0; + pfile_in_zip_read_info->stream.next_in = (Bytef*)0; pfile_in_zip_read_info->stream.avail_in = 0; err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS); @@ -1195,24 +1151,21 @@ extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password) return UNZ_OK; } -extern int ZEXPORT unzOpenCurrentFile (file) - unzFile file; +extern int ZEXPORT unzOpenCurrentFile (unzFile file) { return unzOpenCurrentFile3(file, NULL, NULL, 0, NULL); } -extern int ZEXPORT unzOpenCurrentFilePassword (file, password) - unzFile file; - const char* password; +extern int ZEXPORT unzOpenCurrentFilePassword (unzFile file, const char* password) { return unzOpenCurrentFile3(file, NULL, NULL, 0, password); } -extern int ZEXPORT unzOpenCurrentFile2 (file,method,level,raw) - unzFile file; - int* method; - int* level; - int raw; +extern int ZEXPORT unzOpenCurrentFile2 ( + unzFile file, + int* method, + int* level, + int raw) { return unzOpenCurrentFile3(file, method, level, raw, NULL); } @@ -1227,10 +1180,10 @@ extern int ZEXPORT unzOpenCurrentFile2 (file,method,level,raw) return <0 with error code if there is an error (UNZ_ERRNO for IO error, or zLib error for uncompress error) */ -extern int ZEXPORT unzReadCurrentFile (file, buf, len) - unzFile file; - voidp buf; - unsigned len; +extern int ZEXPORT unzReadCurrentFile( + unzFile file, + voidp buf, + unsigned len) { int err=UNZ_OK; uInt iRead = 0; @@ -1388,8 +1341,7 @@ extern int ZEXPORT unzReadCurrentFile (file, buf, len) /* Give the current position in uncompressed data */ -extern z_off_t ZEXPORT unztell (file) - unzFile file; +extern z_off_t ZEXPORT unztell (unzFile file) { unz_s* s; file_in_zip_read_info_s* pfile_in_zip_read_info; @@ -1408,8 +1360,7 @@ extern z_off_t ZEXPORT unztell (file) /* return 1 if the end of file was reached, 0 elsewhere */ -extern int ZEXPORT unzeof (file) - unzFile file; +extern int ZEXPORT unzeof (unzFile file) { unz_s* s; file_in_zip_read_info_s* pfile_in_zip_read_info; @@ -1441,10 +1392,10 @@ extern int ZEXPORT unzeof (file) the return value is the number of bytes copied in buf, or (if <0) the error code */ -extern int ZEXPORT unzGetLocalExtrafield (file,buf,len) - unzFile file; - voidp buf; - unsigned len; +extern int ZEXPORT unzGetLocalExtrafield ( + unzFile file, + voidp buf, + unsigned len) { unz_s* s; file_in_zip_read_info_s* pfile_in_zip_read_info; @@ -1492,8 +1443,7 @@ extern int ZEXPORT unzGetLocalExtrafield (file,buf,len) Close the file in zip opened with unzipOpenCurrentFile Return UNZ_CRCERROR if all the file was read but the CRC is not good */ -extern int ZEXPORT unzCloseCurrentFile (file) - unzFile file; +extern int ZEXPORT unzCloseCurrentFile (unzFile file) { int err=UNZ_OK; @@ -1535,12 +1485,11 @@ extern int ZEXPORT unzCloseCurrentFile (file) uSizeBuf is the size of the szComment buffer. return the number of byte copied or an error code <0 */ -extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf) - unzFile file; - char *szComment; - uLong uSizeBuf; +extern int ZEXPORT unzGetGlobalComment ( + unzFile file, + char *szComment, + uLong uSizeBuf) { - int err=UNZ_OK; unz_s* s; uLong uReadThis ; if (file==NULL) @@ -1567,8 +1516,7 @@ extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf) } /* Additions by RX '2004 */ -extern uLong ZEXPORT unzGetOffset (file) - unzFile file; +extern uLong ZEXPORT unzGetOffset (unzFile file) { unz_s* s; @@ -1583,9 +1531,9 @@ extern uLong ZEXPORT unzGetOffset (file) return s->pos_in_central_dir; } -extern int ZEXPORT unzSetOffset (file, pos) - unzFile file; - uLong pos; +extern int ZEXPORT unzSetOffset ( + unzFile file, + uLong pos) { unz_s* s; int err; diff --git a/JGE/src/unzip/zip.c b/JGE/src/unzip/zip.c index 7fbe00274..ec5abeba4 100644 --- a/JGE/src/unzip/zip.c +++ b/JGE/src/unzip/zip.c @@ -172,8 +172,7 @@ local linkedlist_datablock_internal* allocate_new_datablock() return ldi; } -local void free_datablock(ldi) - linkedlist_datablock_internal* ldi; +local void free_datablock(linkedlist_datablock_internal* ldi) { while (ldi!=NULL) { @@ -183,24 +182,24 @@ local void free_datablock(ldi) } } -local void init_linkedlist(ll) - linkedlist_data* ll; +local void init_linkedlist( + linkedlist_data* ll) { ll->first_block = ll->last_block = NULL; } -local void free_linkedlist(ll) - linkedlist_data* ll; +local void free_linkedlist( + linkedlist_data* ll) { free_datablock(ll->first_block); ll->first_block = ll->last_block = NULL; } -local int add_data_in_datablock(ll,buf,len) - linkedlist_data* ll; - const void* buf; - uLong len; +local int add_data_in_datablock( + linkedlist_data* ll, + const void* buf, + uLong len) { linkedlist_datablock_internal* ldi; const unsigned char* from_copy; @@ -263,11 +262,11 @@ local int add_data_in_datablock(ll,buf,len) local int ziplocal_putValue OF((const zlib_filefunc_def* pzlib_filefunc_def, voidpf filestream, uLong x, int nbByte)); -local int ziplocal_putValue (pzlib_filefunc_def, filestream, x, nbByte) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; - uLong x; - int nbByte; +local int ziplocal_putValue ( + const zlib_filefunc_def* pzlib_filefunc_def, + voidpf filestream, + uLong x, + int nbByte) { unsigned char buf[4]; int n; @@ -291,10 +290,10 @@ local int ziplocal_putValue (pzlib_filefunc_def, filestream, x, nbByte) } local void ziplocal_putValue_inmemory OF((void* dest, uLong x, int nbByte)); -local void ziplocal_putValue_inmemory (dest, x, nbByte) - void* dest; - uLong x; - int nbByte; +local void ziplocal_putValue_inmemory ( + void* dest, + uLong x, + int nbByte) { unsigned char* buf=(unsigned char*)dest; int n; @@ -315,9 +314,9 @@ local void ziplocal_putValue_inmemory (dest, x, nbByte) /****************************************************************************/ -local uLong ziplocal_TmzDateToDosDate(ptm,dosDate) - const tm_zip* ptm; - uLong dosDate; +local uLong ziplocal_TmzDateToDosDate( + const tm_zip* ptm, + uLong dosDate) { uLong year = (uLong)ptm->tm_year; if (year>1980) @@ -337,10 +336,10 @@ local int ziplocal_getByte OF(( voidpf filestream, int *pi)); -local int ziplocal_getByte(pzlib_filefunc_def,filestream,pi) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; - int *pi; +local int ziplocal_getByte( + const zlib_filefunc_def* pzlib_filefunc_def, + voidpf filestream, + int *pi) { unsigned char c; int err = (int)ZREAD(*pzlib_filefunc_def,filestream,&c,1); @@ -367,10 +366,10 @@ local int ziplocal_getShort OF(( voidpf filestream, uLong *pX)); -local int ziplocal_getShort (pzlib_filefunc_def,filestream,pX) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; - uLong *pX; +local int ziplocal_getShort ( + const zlib_filefunc_def* pzlib_filefunc_def, + voidpf filestream, + uLong *pX) { uLong x ; int i; @@ -395,10 +394,10 @@ local int ziplocal_getLong OF(( voidpf filestream, uLong *pX)); -local int ziplocal_getLong (pzlib_filefunc_def,filestream,pX) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; - uLong *pX; +local int ziplocal_getLong ( + const zlib_filefunc_def* pzlib_filefunc_def, + voidpf filestream, + uLong *pX) { uLong x ; int i; @@ -437,9 +436,9 @@ local uLong ziplocal_SearchCentralDir OF(( const zlib_filefunc_def* pzlib_filefunc_def, voidpf filestream)); -local uLong ziplocal_SearchCentralDir(pzlib_filefunc_def,filestream) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; +local uLong ziplocal_SearchCentralDir( + const zlib_filefunc_def* pzlib_filefunc_def, + voidpf filestream) { unsigned char* buf; uLong uSizeFile; @@ -496,11 +495,11 @@ local uLong ziplocal_SearchCentralDir(pzlib_filefunc_def,filestream) #endif /* !NO_ADDFILEINEXISTINGZIP*/ /************************************************************/ -extern zipFile ZEXPORT zipOpen2 (pathname, append, globalcomment, pzlib_filefunc_def) - const char *pathname; - int append; - zipcharpc* globalcomment; - zlib_filefunc_def* pzlib_filefunc_def; +extern zipFile ZEXPORT zipOpen2 ( + const char *pathname, + int append, + zipcharpc* globalcomment, + zlib_filefunc_def* pzlib_filefunc_def) { zip_internal ziinit; zip_internal* zi; @@ -615,7 +614,7 @@ extern zipFile ZEXPORT zipOpen2 (pathname, append, globalcomment, pzlib_filefunc if (size_comment>0) { - ziinit.globalcomment = ALLOC(size_comment+1); + ziinit.globalcomment = (char*)ALLOC(size_comment+1); if (ziinit.globalcomment) { size_comment = ZREAD(ziinit.z_filefunc, ziinit.filestream,ziinit.globalcomment,size_comment); @@ -680,35 +679,30 @@ extern zipFile ZEXPORT zipOpen2 (pathname, append, globalcomment, pzlib_filefunc } } -extern zipFile ZEXPORT zipOpen (pathname, append) - const char *pathname; - int append; +extern zipFile ZEXPORT zipOpen ( + const char *pathname, + int append) { return zipOpen2(pathname,append,NULL,NULL); } -extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level, raw, - windowBits, memLevel, strategy, - password, crcForCrypting) - zipFile file; - const char* filename; - const zip_fileinfo* zipfi; - const void* extrafield_local; - uInt size_extrafield_local; - const void* extrafield_global; - uInt size_extrafield_global; - const char* comment; - int method; - int level; - int raw; - int windowBits; - int memLevel; - int strategy; - const char* password; - uLong crcForCrypting; +extern int ZEXPORT zipOpenNewFileInZip3 ( + zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int windowBits, + int memLevel, + int strategy, + const char* password, + uLong crcForCrypting) { zip_internal* zi; uInt size_filename; @@ -896,21 +890,18 @@ extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi, return err; } -extern int ZEXPORT zipOpenNewFileInZip2(file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level, raw) - zipFile file; - const char* filename; - const zip_fileinfo* zipfi; - const void* extrafield_local; - uInt size_extrafield_local; - const void* extrafield_global; - uInt size_extrafield_global; - const char* comment; - int method; - int level; - int raw; +extern int ZEXPORT zipOpenNewFileInZip2( + zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw) { return zipOpenNewFileInZip3 (file, filename, zipfi, extrafield_local, size_extrafield_local, @@ -920,20 +911,17 @@ extern int ZEXPORT zipOpenNewFileInZip2(file, filename, zipfi, NULL, 0); } -extern int ZEXPORT zipOpenNewFileInZip (file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level) - zipFile file; - const char* filename; - const zip_fileinfo* zipfi; - const void* extrafield_local; - uInt size_extrafield_local; - const void* extrafield_global; - uInt size_extrafield_global; - const char* comment; - int method; - int level; +extern int ZEXPORT zipOpenNewFileInZip ( + zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level) { return zipOpenNewFileInZip2 (file, filename, zipfi, extrafield_local, size_extrafield_local, @@ -941,8 +929,8 @@ extern int ZEXPORT zipOpenNewFileInZip (file, filename, zipfi, comment, method, level, 0); } -local int zipFlushWriteBuffer(zi) - zip_internal* zi; +local int zipFlushWriteBuffer( + zip_internal* zi) { int err=ZIP_OK; @@ -963,10 +951,10 @@ local int zipFlushWriteBuffer(zi) return err; } -extern int ZEXPORT zipWriteInFileInZip (file, buf, len) - zipFile file; - const void* buf; - unsigned len; +extern int ZEXPORT zipWriteInFileInZip ( + zipFile file, + const void* buf, + unsigned len) { zip_internal* zi; int err=ZIP_OK; @@ -978,9 +966,9 @@ extern int ZEXPORT zipWriteInFileInZip (file, buf, len) if (zi->in_opened_file_inzip == 0) return ZIP_PARAMERROR; - zi->ci.stream.next_in = (void*)buf; + zi->ci.stream.next_in = (Bytef*)buf; zi->ci.stream.avail_in = len; - zi->ci.crc32 = crc32(zi->ci.crc32,buf,len); + zi->ci.crc32 = crc32(zi->ci.crc32,(const Bytef*)buf,len); while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0)) { @@ -1028,10 +1016,10 @@ extern int ZEXPORT zipWriteInFileInZip (file, buf, len) return err; } -extern int ZEXPORT zipCloseFileInZipRaw (file, uncompressed_size, crc32) - zipFile file; - uLong uncompressed_size; - uLong crc32; +extern int ZEXPORT zipCloseFileInZipRaw ( + zipFile file, + uLong uncompressed_size, + uLong crc32) { zip_internal* zi; uLong compressed_size; @@ -1124,15 +1112,15 @@ extern int ZEXPORT zipCloseFileInZipRaw (file, uncompressed_size, crc32) return err; } -extern int ZEXPORT zipCloseFileInZip (file) - zipFile file; +extern int ZEXPORT zipCloseFileInZip ( + zipFile file) { return zipCloseFileInZipRaw (file,0,0); } -extern int ZEXPORT zipClose (file, global_comment) - zipFile file; - const char* global_comment; +extern int ZEXPORT zipClose ( + zipFile file, + const char* global_comment) { zip_internal* zi; int err = 0; diff --git a/JGE/src/zipFS/zfsystem.cpp b/JGE/src/zipFS/zfsystem.cpp index 34699d080..7611b60cf 100644 --- a/JGE/src/zipFS/zfsystem.cpp +++ b/JGE/src/zipFS/zfsystem.cpp @@ -42,7 +42,6 @@ filesystem * filesystem::pCurrentFS = NULL; std::vector filesystem::m_Buffers; static const int STORED = 0; -static const int DEFLATED = 8; ////////////////////////////////////////////////////////////////////// // Construction/Destruction diff --git a/appveyor.yml b/appveyor.yml index 41490b4c9..b0a86032a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,6 +4,14 @@ # - All section names are case-sensitive. # - Section names should be unique on each level. +# branches to build +branches: + # blacklist + except: + - travis_mac_osx +# Do not build on tags (GitHub only) +skip_tags: true + #---------------------------------# # environment configuration # #---------------------------------# diff --git a/projects/mtg/bin/Res/graphics/backdrop.jpg b/projects/mtg/bin/Res/graphics/backdrop.jpg index c421d570d..ac5fbf9c3 100644 Binary files a/projects/mtg/bin/Res/graphics/backdrop.jpg and b/projects/mtg/bin/Res/graphics/backdrop.jpg differ diff --git a/projects/mtg/bin/Res/graphics/miconslarge.png b/projects/mtg/bin/Res/graphics/miconslarge.png new file mode 100644 index 000000000..0bc690c76 Binary files /dev/null and b/projects/mtg/bin/Res/graphics/miconslarge.png differ diff --git a/projects/mtg/bin/Res/rules/Blitzkrieg.txt b/projects/mtg/bin/Res/rules/Blitzkrieg.txt index 7e534542e..38ac460df 100644 --- a/projects/mtg/bin/Res/rules/Blitzkrieg.txt +++ b/projects/mtg/bin/Res/rules/Blitzkrieg.txt @@ -13,6 +13,8 @@ auto=flashbackrule auto=retracerule auto=suspendrule auto=morphrule +auto=payzerorule +auto=overloadrule auto=attackrule auto=blockrule auto=combattriggerrule diff --git a/projects/mtg/bin/Res/rules/hermit.txt b/projects/mtg/bin/Res/rules/hermit.txt index ab454866d..6bd9d460a 100644 --- a/projects/mtg/bin/Res/rules/hermit.txt +++ b/projects/mtg/bin/Res/rules/hermit.txt @@ -12,6 +12,8 @@ auto=flashbackrule auto=retracerule auto=suspendrule auto=morphrule +auto=payzerorule +auto=overloadrule auto=attackrule auto=blockrule auto=combattriggerrule diff --git a/projects/mtg/bin/Res/rules/mtg.txt b/projects/mtg/bin/Res/rules/mtg.txt index 38f2f9b84..eec78cfb1 100644 --- a/projects/mtg/bin/Res/rules/mtg.txt +++ b/projects/mtg/bin/Res/rules/mtg.txt @@ -16,7 +16,8 @@ auto=flashbackrule auto=retracerule auto=suspendrule auto=morphrule -auto=playfromgraveyardrule +auto=payzerorule +auto=overloadrule auto=attackrule auto=blockrule auto=combattriggerrule diff --git a/projects/mtg/bin/Res/sets/DTK/_cards.dat b/projects/mtg/bin/Res/sets/DTK/_cards.dat new file mode 100644 index 000000000..518a7d56a --- /dev/null +++ b/projects/mtg/bin/Res/sets/DTK/_cards.dat @@ -0,0 +1,1324 @@ +[meta] +author=Wagic Team +year=2015 +[/meta] +[card] +primitive=Acid-Spewer Dragon +id=394485 +rarity=U +[/card] +[card] +primitive=Aerie Bowmasters +id=394486 +rarity=C +[/card] +[card] +primitive=Ainok Artillerist +id=394487 +rarity=C +[/card] +[card] +primitive=Ainok Survivalist +id=394488 +rarity=U +[/card] +[card] +primitive=Ambuscade Shaman +id=394489 +rarity=U +[/card] +[card] +primitive=Anafenza, Kin-Tree Spirit +id=394490 +rarity=R +[/card] +[card] +primitive=Ancestral Statue +id=394491 +rarity=C +[/card] +[card] +primitive=Ancient Carp +id=394492 +rarity=C +[/card] +[card] +primitive=Anticipate +id=394493 +rarity=C +[/card] +[card] +primitive=Arashin Foremost +id=394494 +rarity=R +[/card] +[card] +primitive=Arashin Sovereign +id=394495 +rarity=R +[/card] +[card] +primitive=Artful Maneuver +id=394496 +rarity=C +[/card] +[card] +primitive=Assault Formation +id=394497 +rarity=R +[/card] +[card] +primitive=Atarka Beastbreaker +id=394498 +rarity=C +[/card] +[card] +primitive=Atarka Efreet +id=394499 +rarity=C +[/card] +[card] +primitive=Atarka Monument +id=394500 +rarity=U +[/card] +[card] +primitive=Atarka Pummeler +id=394501 +rarity=U +[/card] +[card] +primitive=Atarka's Command +id=394502 +rarity=R +[/card] +[card] +primitive=Avatar of the Resolute +id=394503 +rarity=R +[/card] +[card] +primitive=Aven Sunstriker +id=394504 +rarity=U +[/card] +[card] +primitive=Aven Tactician +id=394505 +rarity=C +[/card] +[card] +primitive=Battle Mastery +id=394506 +rarity=U +[/card] +[card] +primitive=Belltoll Dragon +id=394507 +rarity=U +[/card] +[card] +primitive=Berserkers' Onslaught +id=394508 +rarity=R +[/card] +[card] +primitive=Blessed Reincarnation +id=394509 +rarity=R +[/card] +[card] +primitive=Blood-Chin Fanatic +id=394510 +rarity=R +[/card] +[card] +primitive=Blood-Chin Rager +id=394511 +rarity=U +[/card] +[card] +primitive=Boltwing Marauder +id=394512 +rarity=R +[/card] +[card] +primitive=Butcher's Glee +id=394513 +rarity=C +[/card] +[card] +primitive=Center Soul +id=394514 +rarity=C +[/card] +[card] +primitive=Champion of Arashin +id=394515 +rarity=C +[/card] +[card] +primitive=Circle of Elders +id=394516 +rarity=U +[/card] +[card] +primitive=Clone Legion +id=394517 +rarity=M +[/card] +[card] +primitive=Coat with Venom +id=394518 +rarity=C +[/card] +[card] +primitive=Collected Company +id=394519 +rarity=R +[/card] +[card] +primitive=Colossodon Yearling +id=394520 +rarity=C +[/card] +[card] +primitive=Commune with Lava +id=394521 +rarity=R +[/card] +[card] +primitive=Conifer Strider +id=394522 +rarity=C +[/card] +[card] +primitive=Contradict +id=394523 +rarity=C +[/card] +[card] +primitive=Corpseweft +id=394524 +rarity=R +[/card] +[card] +primitive=Crater Elemental +id=394525 +rarity=R +[/card] +[card] +primitive=Cunning Breezedancer +id=394526 +rarity=U +[/card] +[card] +primitive=Custodian of the Trove +id=394527 +rarity=C +[/card] +[card] +primitive=Damnable Pact +id=394528 +rarity=R +[/card] +[card] +primitive=Dance of the Skywise +id=394529 +rarity=U +[/card] +[card] +primitive=Deadly Wanderings +id=394530 +rarity=U +[/card] +[card] +primitive=Death Wind +id=394531 +rarity=U +[/card] +[card] +primitive=Deathbringer Regent +id=394532 +rarity=R +[/card] +[card] +primitive=Deathmist Raptor +id=394533 +rarity=M +[/card] +[card] +primitive=Defeat +id=394534 +rarity=C +[/card] +[card] +primitive=Den Protector +id=394535 +rarity=R +[/card] +[card] +primitive=Descent of the Dragons +id=394536 +rarity=M +[/card] +[card] +primitive=Dirgur Nemesis +id=394537 +rarity=C +[/card] +[card] +primitive=Display of Dominance +id=394538 +rarity=U +[/card] +[card] +primitive=Draconic Roar +id=394539 +rarity=U +[/card] +[card] +primitive=Dragon Fodder +id=394540 +rarity=C +[/card] +[card] +primitive=Dragon Hunter +id=394541 +rarity=U +[/card] +[card] +primitive=Dragon Tempest +id=394542 +rarity=R +[/card] +[card] +primitive=Dragon Whisperer +id=394543 +rarity=M +[/card] +[card] +primitive=Dragonloft Idol +id=394545 +rarity=U +[/card] +[card] +primitive=Dragonlord Atarka +id=394546 +rarity=M +[/card] +[card] +primitive=Dragonlord Dromoka +id=394547 +rarity=M +[/card] +[card] +primitive=Dragonlord Kolaghan +id=394548 +rarity=M +[/card] +[card] +primitive=Dragonlord Ojutai +id=394549 +rarity=M +[/card] +[card] +primitive=Dragonlord Silumgar +id=394550 +rarity=M +[/card] +[card] +primitive=Dragonlord's Prerogative +id=394551 +rarity=R +[/card] +[card] +primitive=Dragonlord's Servant +id=394552 +rarity=U +[/card] +[card] +primitive=Dragon's Eye Sentry +id=394544 +rarity=C +[/card] +[card] +primitive=Dragon-Scarred Bear +id=394553 +rarity=C +[/card] +[card] +primitive=Dromoka Captain +id=394554 +rarity=U +[/card] +[card] +primitive=Dromoka Dunecaster +id=394555 +rarity=C +[/card] +[card] +primitive=Dromoka Monument +id=394556 +rarity=U +[/card] +[card] +primitive=Dromoka Warrior +id=394557 +rarity=C +[/card] +[card] +primitive=Dromoka's Command +id=394558 +rarity=R +[/card] +[card] +primitive=Dromoka's Gift +id=394559 +rarity=U +[/card] +[card] +primitive=Duress +id=394560 +rarity=C +[/card] +[card] +primitive=Dutiful Attendant +id=394561 +rarity=C +[/card] +[card] +primitive=Echoes of the Kin Tree +id=394562 +rarity=U +[/card] +[card] +primitive=Elusive Spellfist +id=394563 +rarity=C +[/card] +[card] +primitive=Encase in Ice +id=394564 +rarity=U +[/card] +[card] +primitive=Enduring Scalelord +id=394565 +rarity=U +[/card] +[card] +primitive=Enduring Victory +id=394566 +rarity=C +[/card] +[card] +primitive=Epic Confrontation +id=394567 +rarity=C +[/card] +[card] +primitive=Evolving Wilds +id=394568 +rarity=C +[/card] +[card] +primitive=Explosive Vegetation +id=394569 +rarity=U +[/card] +[card] +primitive=Fate Forgotten +id=394570 +rarity=C +[/card] +[card] +primitive=Flatten +id=394571 +rarity=C +[/card] +[card] +primitive=Foe-Razer Regent +id=394572 +rarity=R +[/card] +[card] +primitive=Forest +id=394575 +rarity=C +[/card] +[card] +primitive=Foul Renewal +id=394576 +rarity=R +[/card] +[card] +primitive=Foul-Tongue Invocation +id=394577 +rarity=U +[/card] +[card] +primitive=Foul-Tongue Shriek +id=394578 +rarity=C +[/card] +[card] +primitive=Gate Smasher +id=394579 +rarity=U +[/card] +[card] +primitive=Glade Watcher +id=394580 +rarity=C +[/card] +[card] +primitive=Glaring Aegis +id=394581 +rarity=C +[/card] +[card] +primitive=Gleam of Authority +id=394582 +rarity=R +[/card] +[card] +primitive=Glint +id=394583 +rarity=C +[/card] +[card] +primitive=Graceblade Artisan +id=394584 +rarity=U +[/card] +[card] +primitive=Gravepurge +id=394585 +rarity=C +[/card] +[card] +primitive=Great Teacher's Decree +id=394586 +rarity=U +[/card] +[card] +primitive=Guardian Shield-Bearer +id=394587 +rarity=C +[/card] +[card] +primitive=Gudul Lurker +id=394588 +rarity=U +[/card] +[card] +primitive=Gurmag Drowner +id=394589 +rarity=C +[/card] +[card] +primitive=Hand of Silumgar +id=394590 +rarity=C +[/card] +[card] +primitive=Harbinger of the Hunt +id=394591 +rarity=R +[/card] +[card] +primitive=Hardened Berserker +id=394592 +rarity=C +[/card] +[card] +primitive=Haven of the Spirit Dragon +id=394593 +rarity=R +[/card] +[card] +primitive=Hedonist's Trove +id=394594 +rarity=R +[/card] +[card] +primitive=Herald of Dromoka +id=394595 +rarity=C +[/card] +[card] +primitive=Herdchaser Dragon +id=394596 +rarity=U +[/card] +[card] +primitive=Hidden Dragonslayer +id=394597 +rarity=R +[/card] +[card] +primitive=Icefall Regent +id=394598 +rarity=R +[/card] +[card] +primitive=Illusory Gains +id=394599 +rarity=R +[/card] +[card] +primitive=Impact Tremors +id=394600 +rarity=C +[/card] +[card] +primitive=Inspiring Call +id=394601 +rarity=U +[/card] +[card] +primitive=Ire Shaman +id=394602 +rarity=R +[/card] +[card] +primitive=Island +id=394605 +rarity=C +[/card] +[card] +primitive=Keeper of the Lens +id=394606 +rarity=C +[/card] +[card] +primitive=Kindled Fury +id=394607 +rarity=C +[/card] +[card] +primitive=Kolaghan Aspirant +id=394608 +rarity=C +[/card] +[card] +primitive=Kolaghan Forerunners +id=394609 +rarity=U +[/card] +[card] +primitive=Kolaghan Monument +id=394610 +rarity=U +[/card] +[card] +primitive=Kolaghan Skirmisher +id=394611 +rarity=C +[/card] +[card] +primitive=Kolaghan Stormsinger +id=394612 +rarity=C +[/card] +[card] +primitive=Kolaghan's Command +id=394613 +rarity=R +[/card] +[card] +primitive=Learn from the Past +id=394614 +rarity=U +[/card] +[card] +primitive=Lightning Berserker +id=394615 +rarity=U +[/card] +[card] +primitive=Lightwalker +id=394616 +rarity=C +[/card] +[card] +primitive=Living Lore +id=394617 +rarity=R +[/card] +[card] +primitive=Lose Calm +id=394618 +rarity=C +[/card] +[card] +primitive=Lurking Arynx +id=394619 +rarity=U +[/card] +[card] +primitive=Magmatic Chasm +id=394620 +rarity=C +[/card] +[card] +primitive=Marang River Skeleton +id=394621 +rarity=U +[/card] +[card] +primitive=Marsh Hulk +id=394622 +rarity=C +[/card] +[card] +primitive=Mind Rot +id=394623 +rarity=C +[/card] +[card] +primitive=Minister of Pain +id=394624 +rarity=U +[/card] +[card] +primitive=Mirror Mockery +id=394625 +rarity=R +[/card] +[card] +primitive=Misthoof Kirin +id=394626 +rarity=C +[/card] +[card] +primitive=Monastery Loremaster +id=394627 +rarity=C +[/card] +[card] +primitive=Mountain +id=394628 +rarity=C +[/card] +[card] +primitive=Mystic Meditation +id=394631 +rarity=C +[/card] +[card] +primitive=Myth Realized +id=394632 +rarity=R +[/card] +[card] +primitive=Narset Transcendent +id=394633 +rarity=M +[/card] +[card] +primitive=Naturalize +id=394634 +rarity=C +[/card] +[card] +primitive=Necromaster Dragon +id=394635 +rarity=R +[/card] +[card] +primitive=Negate +id=394636 +rarity=C +[/card] +[card] +primitive=Obscuring Ęther +id=394637 +rarity=R +[/card] +[card] +primitive=Ojutai Exemplars +id=394638 +rarity=M +[/card] +[card] +primitive=Ojutai Interceptor +id=394639 +rarity=C +[/card] +[card] +primitive=Ojutai Monument +id=394640 +rarity=U +[/card] +[card] +primitive=Ojutai's Breath +id=394641 +rarity=C +[/card] +[card] +primitive=Ojutai's Command +id=394642 +rarity=R +[/card] +[card] +primitive=Ojutai's Summons +id=394643 +rarity=C +[/card] +[card] +primitive=Orator of Ojutai +id=394644 +rarity=U +[/card] +[card] +primitive=Pacifism +id=394645 +rarity=C +[/card] +[card] +primitive=Palace Familiar +id=394646 +rarity=C +[/card] +[card] +primitive=Pinion Feast +id=394647 +rarity=C +[/card] +[card] +primitive=Pitiless Horde +id=394648 +rarity=R +[/card] +[card] +primitive=Plains +id=394649 +rarity=C +[/card] +[card] +primitive=Press the Advantage +id=394652 +rarity=U +[/card] +[card] +primitive=Pristine Skywise +id=394653 +rarity=R +[/card] +[card] +primitive=Profaner of the Dead +id=394654 +rarity=R +[/card] +[card] +primitive=Profound Journey +id=394655 +rarity=R +[/card] +[card] +primitive=Qal Sisma Behemoth +id=394656 +rarity=U +[/card] +[card] +primitive=Qarsi Deceiver +id=394657 +rarity=U +[/card] +[card] +primitive=Qarsi Sadist +id=394658 +rarity=C +[/card] +[card] +primitive=Radiant Purge +id=394659 +rarity=R +[/card] +[card] +primitive=Rakshasa Gravecaller +id=394660 +rarity=U +[/card] +[card] +primitive=Reckless Imp +id=394661 +rarity=C +[/card] +[card] +primitive=Reduce in Stature +id=394662 +rarity=C +[/card] +[card] +primitive=Rending Volley +id=394663 +rarity=U +[/card] +[card] +primitive=Resupply +id=394664 +rarity=C +[/card] +[card] +primitive=Revealing Wind +id=394665 +rarity=C +[/card] +[card] +primitive=Risen Executioner +id=394666 +rarity=M +[/card] +[card] +primitive=Roast +id=394667 +rarity=U +[/card] +[card] +primitive=Ruthless Deathfang +id=394668 +rarity=U +[/card] +[card] +primitive=Sabertooth Outrider +id=394669 +rarity=C +[/card] +[card] +primitive=Salt Road Ambushers +id=394670 +rarity=U +[/card] +[card] +primitive=Salt Road Quartermasters +id=394671 +rarity=U +[/card] +[card] +primitive=Sandcrafter Mage +id=394672 +rarity=C +[/card] +[card] +primitive=Sandsteppe Scavenger +id=394673 +rarity=C +[/card] +[card] +primitive=Sandstorm Charger +id=394674 +rarity=C +[/card] +[card] +primitive=Sarkhan Unbroken +id=394675 +rarity=M +[/card] +[card] +primitive=Sarkhan's Rage +id=394676 +rarity=C +[/card] +[card] +primitive=Sarkhan's Triumph +id=394677 +rarity=U +[/card] +[card] +primitive=Savage Ventmaw +id=394678 +rarity=U +[/card] +[card] +primitive=Scale Blessing +id=394679 +rarity=U +[/card] +[card] +primitive=Scaleguard Sentinels +id=394680 +rarity=U +[/card] +[card] +primitive=Scion of Ugin +id=394681 +rarity=U +[/card] +[card] +primitive=Screamreach Brawler +id=394682 +rarity=C +[/card] +[card] +primitive=Secure the Wastes +id=394683 +rarity=R +[/card] +[card] +primitive=Segmented Krotiq +id=394684 +rarity=C +[/card] +[card] +primitive=Seismic Rupture +id=394685 +rarity=U +[/card] +[card] +primitive=Self-Inflicted Wound +id=394686 +rarity=U +[/card] +[card] +primitive=Servant of the Scale +id=394687 +rarity=C +[/card] +[card] +primitive=Shaman of Forgotten Ways +id=394688 +rarity=M +[/card] +[card] +primitive=Shambling Goblin +id=394689 +rarity=C +[/card] +[card] +primitive=Shape the Sands +id=394690 +rarity=C +[/card] +[card] +primitive=Sheltered Aerie +id=394691 +rarity=C +[/card] +[card] +primitive=Shieldhide Dragon +id=394692 +rarity=U +[/card] +[card] +primitive=Shorecrasher Elemental +id=394693 +rarity=M +[/card] +[card] +primitive=Sibsig Icebreakers +id=394694 +rarity=C +[/card] +[card] +primitive=Sidisi, Undead Vizier +id=394695 +rarity=R +[/card] +[card] +primitive=Sidisi's Faithful +id=394696 +rarity=C +[/card] +[card] +primitive=Sight Beyond Sight +id=394697 +rarity=U +[/card] +[card] +primitive=Sight of the Scalelords +id=394698 +rarity=U +[/card] +[card] +primitive=Silkwrap +id=394699 +rarity=U +[/card] +[card] +primitive=Silumgar Assassin +id=394700 +rarity=R +[/card] +[card] +primitive=Silumgar Butcher +id=394701 +rarity=C +[/card] +[card] +primitive=Silumgar Monument +id=394702 +rarity=U +[/card] +[card] +primitive=Silumgar Sorcerer +id=394703 +rarity=U +[/card] +[card] +primitive=Silumgar Spell-Eater +id=394704 +rarity=U +[/card] +[card] +primitive=Silumgar's Command +id=394705 +rarity=R +[/card] +[card] +primitive=Silumgar's Scorn +id=394706 +rarity=U +[/card] +[card] +primitive=Skywise Teachings +id=394707 +rarity=U +[/card] +[card] +primitive=Spidersilk Net +id=394708 +rarity=C +[/card] +[card] +primitive=Sprinting Warbrute +id=394709 +rarity=C +[/card] +[card] +primitive=Stampeding Elk Herd +id=394710 +rarity=C +[/card] +[card] +primitive=Stormcrag Elemental +id=394711 +rarity=U +[/card] +[card] +primitive=Stormrider Rig +id=394712 +rarity=U +[/card] +[card] +primitive=Stormwing Dragon +id=394713 +rarity=U +[/card] +[card] +primitive=Stratus Dancer +id=394714 +rarity=R +[/card] +[card] +primitive=Strongarm Monk +id=394715 +rarity=U +[/card] +[card] +primitive=Student of Ojutai +id=394716 +rarity=C +[/card] +[card] +primitive=Summit Prowler +id=394717 +rarity=C +[/card] +[card] +primitive=Sunbringer's Touch +id=394718 +rarity=R +[/card] +[card] +primitive=Sunscorch Regent +id=394719 +rarity=R +[/card] +[card] +primitive=Surge of Righteousness +id=394720 +rarity=U +[/card] +[card] +primitive=Surrak, the Hunt Caller +id=394721 +rarity=R +[/card] +[card] +primitive=Swamp +id=394722 +rarity=C +[/card] +[card] +primitive=Swift Warkite +id=394725 +rarity=U +[/card] +[card] +primitive=Taigam's Strike +id=394726 +rarity=C +[/card] +[card] +primitive=Tail Slash +id=394727 +rarity=C +[/card] +[card] +primitive=Tapestry of the Ages +id=394728 +rarity=U +[/card] +[card] +primitive=Territorial Roc +id=394729 +rarity=C +[/card] +[card] +primitive=Thunderbreak Regent +id=394730 +rarity=R +[/card] +[card] +primitive=Tormenting Voice +id=394731 +rarity=C +[/card] +[card] +primitive=Tread Upon +id=394732 +rarity=C +[/card] +[card] +primitive=Twin Bolt +id=394733 +rarity=C +[/card] +[card] +primitive=Ukud Cobra +id=394734 +rarity=U +[/card] +[card] +primitive=Ultimate Price +id=394735 +rarity=U +[/card] +[card] +primitive=Updraft Elemental +id=394736 +rarity=C +[/card] +[card] +primitive=Vandalize +id=394737 +rarity=C +[/card] +[card] +primitive=Vial of Dragonfire +id=394738 +rarity=C +[/card] +[card] +primitive=Virulent Plague +id=394739 +rarity=U +[/card] +[card] +primitive=Void Squall +id=394740 +rarity=U +[/card] +[card] +primitive=Volcanic Rush +id=394741 +rarity=C +[/card] +[card] +primitive=Volcanic Vision +id=394742 +rarity=R +[/card] +[card] +primitive=Vulturous Aven +id=394743 +rarity=C +[/card] +[card] +primitive=Wandering Tombshell +id=394744 +rarity=C +[/card] +[card] +primitive=Warbringer +id=394745 +rarity=U +[/card] +[card] +primitive=Youthful Scholar +id=394746 +rarity=U +[/card] +[card] +primitive=Zephyr Scribe +id=394747 +rarity=C +[/card] +[card] +primitive=Zurgo Bellstriker +id=394748 +rarity=R +[/card] +[card] +primitive=Forest +id=394573 +rarity=C +[/card] +[card] +primitive=Forest +id=394574 +rarity=C +[/card] +[card] +primitive=Island +id=394603 +rarity=C +[/card] +[card] +primitive=Island +id=394604 +rarity=C +[/card] +[card] +primitive=Mountain +id=394629 +rarity=C +[/card] +[card] +primitive=Mountain +id=394630 +rarity=C +[/card] +[card] +primitive=Plains +id=394650 +rarity=C +[/card] +[card] +primitive=Plains +id=394651 +rarity=C +[/card] +[card] +primitive=Swamp +id=394723 +rarity=C +[/card] +[card] +primitive=Swamp +id=394724 +rarity=C +[/card] diff --git a/projects/mtg/bin/Res/sets/DTK/booster.txt b/projects/mtg/bin/Res/sets/DTK/booster.txt new file mode 100644 index 000000000..4ac4c617f --- /dev/null +++ b/projects/mtg/bin/Res/sets/DTK/booster.txt @@ -0,0 +1,21 @@ + + + rarity:mythic; + rarity:rare; + rarity:rare; + rarity:rare; + rarity:rare; + rarity:rare; + rarity:rare; + rarity:rare; + + + rarity:uncommon; + + + rarity:special; + + + rarity:common; + + \ No newline at end of file diff --git a/projects/mtg/bin/Res/sets/FRF/_cards.dat b/projects/mtg/bin/Res/sets/FRF/_cards.dat new file mode 100644 index 000000000..f70d7dfe8 --- /dev/null +++ b/projects/mtg/bin/Res/sets/FRF/_cards.dat @@ -0,0 +1,934 @@ +[meta] +author=Wagic Team +year=2015 +[/meta] +[card] +primitive=Abzan Advantage +id=391781 +rarity=C +[/card] +[card] +primitive=Abzan Beastmaster +id=391782 +rarity=U +[/card] +[card] +primitive=Abzan Kin-Guard +id=391783 +rarity=U +[/card] +[card] +primitive=Abzan Runemark +id=391784 +rarity=C +[/card] +[card] +primitive=Abzan Skycaptain +id=391785 +rarity=C +[/card] +[card] +primitive=Ainok Guide +id=391786 +rarity=C +[/card] +[card] +primitive=Alesha, Who Smiles at Death +id=391787 +rarity=R +[/card] +[card] +primitive=Alesha's Vanguard +id=391788 +rarity=C +[/card] +[card] +primitive=Ambush Krotiq +id=391789 +rarity=C +[/card] +[card] +primitive=Ancestral Vengeance +id=391790 +rarity=C +[/card] +[card] +primitive=Arashin Cleric +id=391791 +rarity=C +[/card] +[card] +primitive=Arashin War Beast +id=391792 +rarity=U +[/card] +[card] +primitive=Arcbond +id=391793 +rarity=R +[/card] +[card] +primitive=Archers of Qarsi +id=391794 +rarity=C +[/card] +[card] +primitive=Archfiend of Depravity +id=391795 +rarity=R +[/card] +[card] +primitive=Atarka, World Render +id=391796 +rarity=R +[/card] +[card] +primitive=Aven Skirmisher +id=391797 +rarity=C +[/card] +[card] +primitive=Aven Surveyor +id=391798 +rarity=C +[/card] +[card] +primitive=Bathe in Dragonfire +id=391799 +rarity=C +[/card] +[card] +primitive=Battle Brawler +id=391800 +rarity=U +[/card] +[card] +primitive=Battlefront Krushok +id=391801 +rarity=U +[/card] +[card] +primitive=Bloodfell Caves +id=391802 +rarity=C +[/card] +[card] +primitive=Bloodfire Enforcers +id=391803 +rarity=U +[/card] +[card] +primitive=Blossoming Sands +id=391804 +rarity=C +[/card] +[card] +primitive=Break Through the Line +id=391805 +rarity=U +[/card] +[card] +primitive=Brutal Hordechief +id=391806 +rarity=M +[/card] +[card] +primitive=Cached Defenses +id=391807 +rarity=U +[/card] +[card] +primitive=Channel Harm +id=391808 +rarity=U +[/card] +[card] +primitive=Citadel Siege +id=391809 +rarity=R +[/card] +[card] +primitive=Cloudform +id=391810 +rarity=U +[/card] +[card] +primitive=Collateral Damage +id=391811 +rarity=C +[/card] +[card] +primitive=Crucible of the Spirit Dragon +id=391812 +rarity=R +[/card] +[card] +primitive=Crux of Fate +id=391813 +rarity=R +[/card] +[card] +primitive=Cunning Strike +id=391814 +rarity=C +[/card] +[card] +primitive=Daghatar the Adamant +id=391815 +rarity=R +[/card] +[card] +primitive=Dark Deal +id=391816 +rarity=U +[/card] +[card] +primitive=Defiant Ogre +id=391817 +rarity=C +[/card] +[card] +primitive=Destructor Dragon +id=391818 +rarity=U +[/card] +[card] +primitive=Diplomacy of the Wastes +id=391819 +rarity=U +[/card] +[card] +primitive=Dismal Backwater +id=391820 +rarity=C +[/card] +[card] +primitive=Douse in Gloom +id=391821 +rarity=C +[/card] +[card] +primitive=Dragon Bell Monk +id=391822 +rarity=C +[/card] +[card] +primitive=Dragonrage +id=391823 +rarity=U +[/card] +[card] +primitive=Dragonscale General +id=391824 +rarity=R +[/card] +[card] +primitive=Dromoka, the Eternal +id=391825 +rarity=R +[/card] +[card] +primitive=Elite Scaleguard +id=391826 +rarity=U +[/card] +[card] +primitive=Enhanced Awareness +id=391827 +rarity=C +[/card] +[card] +primitive=Ethereal Ambush +id=391828 +rarity=C +[/card] +[card] +primitive=Fascination +id=391829 +rarity=U +[/card] +[card] +primitive=Fearsome Awakening +id=391830 +rarity=U +[/card] +[card] +primitive=Feral Krushok +id=391831 +rarity=C +[/card] +[card] +primitive=Fierce Invocation +id=391832 +rarity=C +[/card] +[card] +primitive=Flamerush Rider +id=391833 +rarity=R +[/card] +[card] +primitive=Flamewake Phoenix +id=391834 +rarity=R +[/card] +[card] +primitive=Forest +id=391836 +rarity=C +[/card] +[card] +primitive=Formless Nurturing +id=391837 +rarity=C +[/card] +[card] +primitive=Friendly Fire +id=391838 +rarity=U +[/card] +[card] +primitive=Frontier Mastodon +id=391839 +rarity=C +[/card] +[card] +primitive=Frontier Siege +id=391840 +rarity=R +[/card] +[card] +primitive=Frost Walker +id=391841 +rarity=U +[/card] +[card] +primitive=Fruit of the First Tree +id=391842 +rarity=U +[/card] +[card] +primitive=Ghastly Conscription +id=391843 +rarity=M +[/card] +[card] +primitive=Goblin Boom Keg +id=391844 +rarity=U +[/card] +[card] +primitive=Goblin Heelcutter +id=391845 +rarity=C +[/card] +[card] +primitive=Gore Swine +id=391846 +rarity=C +[/card] +[card] +primitive=Grave Strength +id=391847 +rarity=U +[/card] +[card] +primitive=Great-Horn Krushok +id=391848 +rarity=C +[/card] +[card] +primitive=Grim Contest +id=391849 +rarity=C +[/card] +[card] +primitive=Gurmag Angler +id=391850 +rarity=C +[/card] +[card] +primitive=Harsh Sustenance +id=391851 +rarity=C +[/card] +[card] +primitive=Hero's Blade +id=391852 +rarity=U +[/card] +[card] +primitive=Hewed Stone Retainers +id=391853 +rarity=U +[/card] +[card] +primitive=Honor's Reward +id=391854 +rarity=U +[/card] +[card] +primitive=Hooded Assassin +id=391855 +rarity=C +[/card] +[card] +primitive=Humble Defector +id=391856 +rarity=U +[/card] +[card] +primitive=Hungering Yeti +id=391857 +rarity=U +[/card] +[card] +primitive=Hunt the Weak +id=391858 +rarity=C +[/card] +[card] +primitive=Island +id=391859 +rarity=C +[/card] +[card] +primitive=Jeskai Barricade +id=391861 +rarity=U +[/card] +[card] +primitive=Jeskai Infiltrator +id=391862 +rarity=R +[/card] +[card] +primitive=Jeskai Runemark +id=391863 +rarity=C +[/card] +[card] +primitive=Jeskai Sage +id=391864 +rarity=C +[/card] +[card] +primitive=Jungle Hollow +id=391865 +rarity=C +[/card] +[card] +primitive=Kolaghan, the Storm's Fury +id=391866 +rarity=R +[/card] +[card] +primitive=Lightform +id=391867 +rarity=U +[/card] +[card] +primitive=Lightning Shrieker +id=391868 +rarity=C +[/card] +[card] +primitive=Lotus Path Djinn +id=391869 +rarity=C +[/card] +[card] +primitive=Lotus-Eye Mystics +id=391870 +rarity=U +[/card] +[card] +primitive=Map the Wastes +id=391871 +rarity=C +[/card] +[card] +primitive=Marang River Prowler +id=391872 +rarity=U +[/card] +[card] +primitive=Mardu Runemark +id=391873 +rarity=C +[/card] +[card] +primitive=Mardu Scout +id=391874 +rarity=C +[/card] +[card] +primitive=Mardu Shadowspear +id=391875 +rarity=U +[/card] +[card] +primitive=Mardu Strike Leader +id=391876 +rarity=R +[/card] +[card] +primitive=Mardu Woe-Reaper +id=391877 +rarity=U +[/card] +[card] +primitive=Mastery of the Unseen +id=391878 +rarity=R +[/card] +[card] +primitive=Merciless Executioner +id=391879 +rarity=U +[/card] +[card] +primitive=Mindscour Dragon +id=391880 +rarity=U +[/card] +[card] +primitive=Mistfire Adept +id=391881 +rarity=U +[/card] +[card] +primitive=Mob Rule +id=391882 +rarity=R +[/card] +[card] +primitive=Monastery Mentor +id=391883 +rarity=M +[/card] +[card] +primitive=Monk Token +id=-391883 +rarity=T +[/card] +[card] +primitive=Monastery Siege +id=391884 +rarity=R +[/card] +[card] +primitive=Mountain +id=391885 +rarity=C +[/card] +[card] +primitive=Neutralizing Blast +id=391887 +rarity=U +[/card] +[card] +primitive=Noxious Dragon +id=391888 +rarity=U +[/card] +[card] +primitive=Ojutai, Soul of Winter +id=391889 +rarity=R +[/card] +[card] +primitive=Orc Sureshot +id=391890 +rarity=U +[/card] +[card] +primitive=Outpost Siege +id=391891 +rarity=R +[/card] +[card] +primitive=Palace Siege +id=391892 +rarity=R +[/card] +[card] +primitive=Pilgrim of the Fires +id=391893 +rarity=U +[/card] +[card] +primitive=Plains +id=391895 +rarity=C +[/card] +[card] +primitive=Pressure Point +id=391896 +rarity=C +[/card] +[card] +primitive=Pyrotechnics +id=391897 +rarity=U +[/card] +[card] +primitive=Qarsi High Priest +id=391898 +rarity=U +[/card] +[card] +primitive=Rageform +id=391899 +rarity=U +[/card] +[card] +primitive=Rakshasa's Disdain +id=391900 +rarity=C +[/card] +[card] +primitive=Rally the Ancestors +id=391901 +rarity=R +[/card] +[card] +primitive=Reach of Shadows +id=391902 +rarity=C +[/card] +[card] +primitive=Reality Shift +id=391903 +rarity=U +[/card] +[card] +primitive=Refocus +id=391904 +rarity=C +[/card] +[card] +primitive=Renowned Weaponsmith +id=391905 +rarity=U +[/card] +[card] +primitive=Return to the Earth +id=391906 +rarity=C +[/card] +[card] +primitive=Rite of Undoing +id=391907 +rarity=U +[/card] +[card] +primitive=Rugged Highlands +id=391908 +rarity=C +[/card] +[card] +primitive=Ruthless Instincts +id=391909 +rarity=U +[/card] +[card] +primitive=Sage-Eye Avengers +id=391911 +rarity=R +[/card] +[card] +primitive=Sage's Reverie +id=391910 +rarity=U +[/card] +[card] +primitive=Sandblast +id=391912 +rarity=C +[/card] +[card] +primitive=Sandsteppe Mastodon +id=391913 +rarity=R +[/card] +[card] +primitive=Sandsteppe Outcast +id=391914 +rarity=C +[/card] +[card] +primitive=Scoured Barrens +id=391915 +rarity=C +[/card] +[card] +primitive=Scroll of the Masters +id=391916 +rarity=R +[/card] +[card] +primitive=Shaman of the Great Hunt +id=391917 +rarity=M +[/card] +[card] +primitive=Shamanic Revelation +id=391918 +rarity=R +[/card] +[card] +primitive=Shifting Loyalties +id=391919 +rarity=U +[/card] +[card] +primitive=Shockmaw Dragon +id=391920 +rarity=U +[/card] +[card] +primitive=Shu Yun, the Silent Tempest +id=391921 +rarity=R +[/card] +[card] +primitive=Sibsig Host +id=391922 +rarity=C +[/card] +[card] +primitive=Sibsig Muckdraggers +id=391923 +rarity=U +[/card] +[card] +primitive=Silumgar, the Drifting Death +id=391924 +rarity=R +[/card] +[card] +primitive=Smoldering Efreet +id=391925 +rarity=C +[/card] +[card] +primitive=Soul Summons +id=391926 +rarity=C +[/card] +[card] +primitive=Soulfire Grand Master +id=391927 +rarity=M +[/card] +[card] +primitive=Soulflayer +id=391928 +rarity=R +[/card] +[card] +primitive=Sudden Reclamation +id=391929 +rarity=U +[/card] +[card] +primitive=Sultai Emissary +id=391930 +rarity=C +[/card] +[card] +primitive=Sultai Runemark +id=391931 +rarity=C +[/card] +[card] +primitive=Sultai Skullkeeper +id=391932 +rarity=C +[/card] +[card] +primitive=Supplant Form +id=391933 +rarity=R +[/card] +[card] +primitive=Swamp +id=391934 +rarity=C +[/card] +[card] +primitive=Swiftwater Cliffs +id=391936 +rarity=C +[/card] +[card] +primitive=Tasigur, the Golden Fang +id=391937 +rarity=R +[/card] +[card] +primitive=Tasigur's Cruelty +id=391938 +rarity=C +[/card] +[card] +primitive=Temporal Trespass +id=391939 +rarity=M +[/card] +[card] +primitive=Temur Battle Rage +id=391940 +rarity=C +[/card] +[card] +primitive=Temur Runemark +id=391941 +rarity=C +[/card] +[card] +primitive=Temur Sabertooth +id=391942 +rarity=U +[/card] +[card] +primitive=Temur War Shaman +id=391943 +rarity=R +[/card] +[card] +primitive=Thornwood Falls +id=391944 +rarity=C +[/card] +[card] +primitive=Torrent Elemental +id=391945 +rarity=M +[/card] +[card] +primitive=Tranquil Cove +id=391946 +rarity=C +[/card] +[card] +primitive=Typhoid Rats +id=391947 +rarity=C +[/card] +[card] +primitive=Ugin, the Spirit Dragon +id=391948 +rarity=M +[/card] +[card] +primitive=Ugin's Construct +id=391949 +rarity=U +[/card] +[card] +primitive=Valorous Stance +id=391950 +rarity=U +[/card] +[card] +primitive=Vaultbreaker +id=391951 +rarity=U +[/card] +[card] +primitive=Wandering Champion +id=391952 +rarity=U +[/card] +[card] +primitive=War Flare +id=391953 +rarity=C +[/card] +[card] +primitive=Warden of the First Tree +id=391954 +rarity=M +[/card] +[card] +primitive=Wardscale Dragon +id=391955 +rarity=U +[/card] +[card] +primitive=Whisk Away +id=391956 +rarity=C +[/card] +[card] +primitive=Whisperer of the Wilds +id=391957 +rarity=C +[/card] +[card] +primitive=Whisperwood Elemental +id=391958 +rarity=M +[/card] +[card] +primitive=Wild Slash +id=391959 +rarity=U +[/card] +[card] +primitive=Wildcall +id=391960 +rarity=R +[/card] +[card] +primitive=Will of the Naga +id=391961 +rarity=C +[/card] +[card] +primitive=Winds of Qal Sisma +id=391962 +rarity=U +[/card] +[card] +primitive=Wind-Scarred Crag +id=391963 +rarity=C +[/card] +[card] +primitive=Write into Being +id=391964 +rarity=C +[/card] +[card] +primitive=Yasova Dragonclaw +id=391965 +rarity=R +[/card] +[card] +primitive=Forest +id=391835 +rarity=C +[/card] +[card] +primitive=Island +id=391860 +rarity=C +[/card] +[card] +primitive=Mountain +id=391886 +rarity=C +[/card] +[card] +primitive=Plains +id=391894 +rarity=C +[/card] +[card] +primitive=Swamp +id=391935 +rarity=C +[/card] diff --git a/projects/mtg/bin/Res/sets/FRF/booster.txt b/projects/mtg/bin/Res/sets/FRF/booster.txt new file mode 100644 index 000000000..1ff88b4f1 --- /dev/null +++ b/projects/mtg/bin/Res/sets/FRF/booster.txt @@ -0,0 +1,21 @@ + + + rarity:mythic; + rarity:rare; + rarity:rare; + rarity:rare; + rarity:rare; + rarity:rare; + rarity:rare; + rarity:rare; + + + rarity:uncommon; + + + rarity:special; + + + rarity:common; + + \ No newline at end of file diff --git a/projects/mtg/bin/Res/sets/JOU/_cards.dat b/projects/mtg/bin/Res/sets/JOU/_cards.dat new file mode 100644 index 000000000..097a564c1 --- /dev/null +++ b/projects/mtg/bin/Res/sets/JOU/_cards.dat @@ -0,0 +1,830 @@ +[meta] +author=Wagic Team +year=2014 +block=Theros +[/meta] +[card] +primitive=Aegis of the Gods +id=380364 +rarity=R +[/card] +[card] +primitive=Aerial Formation +id=380365 +rarity=C +[/card] +[card] +primitive=Agent of Erebos +id=380366 +rarity=U +[/card] +[card] +primitive=Ajani, Mentor of Heroes +id=380367 +rarity=M +[/card] +[card] +primitive=Ajani's Presence +id=380368 +rarity=C +[/card] +[card] +primitive=Akroan Line Breaker +id=380369 +rarity=U +[/card] +[card] +primitive=Akroan Mastiff +id=380370 +rarity=C +[/card] +[card] +primitive=Armament of Nyx +id=380371 +rarity=C +[/card] +[card] +primitive=Armory of Iroas +id=380372 +rarity=U +[/card] +[card] +primitive=Aspect of Gorgon +id=380373 +rarity=C +[/card] +[card] +primitive=Athreos, God of Passage +id=380374 +rarity=M +[/card] +[card] +primitive=Banishing Light +id=380375 +rarity=U +[/card] +[card] +primitive=Bassara Tower Archer +id=380376 +rarity=U +[/card] +[card] +primitive=Battlefield Thaumaturge +id=380377 +rarity=R +[/card] +[card] +primitive=Bearer of the Heavens +id=380378 +rarity=R +[/card] +[card] +primitive=Bladetusk Boar +id=380379 +rarity=C +[/card] +[card] +primitive=Blinding Flare +id=380380 +rarity=U +[/card] +[card] +primitive=Bloodcrazed Hoplite +id=380381 +rarity=C +[/card] +[card] +primitive=Brain Maggot +id=380382 +rarity=U +[/card] +[card] +primitive=Cast into Darkness +id=380383 +rarity=C +[/card] +[card] +primitive=Chariot of Victory +id=380384 +rarity=U +[/card] +[card] +primitive=Cloaked Siren +id=380385 +rarity=C +[/card] +[card] +primitive=Colossal Heroics +id=380386 +rarity=U +[/card] +[card] +primitive=Consign to Dust +id=380387 +rarity=U +[/card] +[card] +primitive=Countermand +id=380388 +rarity=C +[/card] +[card] +primitive=Cruel Feeding +id=380389 +rarity=C +[/card] +[card] +primitive=Crystalline Nautilus +id=380390 +rarity=U +[/card] +[card] +primitive=Cyclops of Eternal Fury +id=380391 +rarity=U +[/card] +[card] +primitive=Dakra Mystic +id=380392 +rarity=U +[/card] +[card] +primitive=Daring Thief +id=380393 +rarity=R +[/card] +[card] +primitive=Dawnbringer Charioteers +id=380394 +rarity=R +[/card] +[card] +primitive=Deicide +id=380395 +rarity=R +[/card] +[card] +primitive=Desecration Plague +id=380396 +rarity=C +[/card] +[card] +primitive=Deserter's Quarters +id=380397 +rarity=U +[/card] +[card] +primitive=Desperate Stand +id=380398 +rarity=U +[/card] +[card] +primitive=Dictate of Erebos +id=380399 +rarity=R +[/card] +[card] +primitive=Dictate of Heliod +id=380400 +rarity=R +[/card] +[card] +primitive=Dictate of Karametra +id=380401 +rarity=R +[/card] +[card] +primitive=Dictate of Kruphix +id=380402 +rarity=R +[/card] +[card] +primitive=Dictate of the Twin Gods +id=380403 +rarity=R +[/card] +[card] +primitive=Disciple of Deceit +id=380404 +rarity=U +[/card] +[card] +primitive=Doomwake Giant +id=380405 +rarity=R +[/card] +[card] +primitive=Dreadbringer Lampads +id=380406 +rarity=C +[/card] +[card] +primitive=Eagle of the Watch +id=380407 +rarity=C +[/card] +[card] +primitive=Eidolon of Blossoms +id=380408 +rarity=R +[/card] +[card] +primitive=Eidolon of Rhetoric +id=380409 +rarity=U +[/card] +[card] +primitive=Eidolon of the Great Revel +id=380410 +rarity=R +[/card] +[card] +primitive=Extinguish All Hope +id=380411 +rarity=R +[/card] +[card] +primitive=Feast of Dreams +id=380412 +rarity=C +[/card] +[card] +primitive=Felhide Petrifier +id=380413 +rarity=U +[/card] +[card] +primitive=Flamespeaker's Will +id=380414 +rarity=C +[/card] +[card] +primitive=Fleetfeather Cockatrice +id=380415 +rarity=U +[/card] +[card] +primitive=Flurry of Horns +id=380416 +rarity=C +[/card] +[card] +primitive=Font of Fertility +id=380417 +rarity=C +[/card] +[card] +primitive=Font of Fortunes +id=380418 +rarity=C +[/card] +[card] +primitive=Font of Ire +id=380419 +rarity=C +[/card] +[card] +primitive=Font of Return +id=380420 +rarity=C +[/card] +[card] +primitive=Font of Vigor +id=380421 +rarity=C +[/card] +[card] +primitive=Forgeborn Oreads +id=380422 +rarity=U +[/card] +[card] +primitive=Gluttonous Cyclops +id=380423 +rarity=C +[/card] +[card] +primitive=Gnarled Scarhide +id=380424 +rarity=U +[/card] +[card] +primitive=Godhunter Octopus +id=380425 +rarity=C +[/card] +[card] +primitive=Godsend +id=380426 +rarity=M +[/card] +[card] +primitive=Golden Hind +id=380427 +rarity=C +[/card] +[card] +primitive=Goldenhide Ox +id=380428 +rarity=U +[/card] +[card] +primitive=Gold-Forged Sentinel +id=380429 +rarity=U +[/card] +[card] +primitive=Grim Guardian +id=380430 +rarity=C +[/card] +[card] +primitive=Hall of Triumph +id=380431 +rarity=R +[/card] +[card] +primitive=Harness by Force +id=380432 +rarity=R +[/card] +[card] +primitive=Harvestguard Alseids +id=380433 +rarity=C +[/card] +[card] +primitive=Heroes' Bane +id=380434 +rarity=R +[/card] +[card] +primitive=Hour of Need +id=380435 +rarity=U +[/card] +[card] +primitive=Hubris +id=380436 +rarity=C +[/card] +[card] +primitive=Humbler of Mortals +id=380437 +rarity=C +[/card] +[card] +primitive=Hydra Broodmaster +id=380438 +rarity=R +[/card] +[card] +primitive=Hypnotic Siren +id=380439 +rarity=R +[/card] +[card] +primitive=Interpret the Signs +id=380440 +rarity=U +[/card] +[card] +primitive=Iroas, God of Victory +id=380441 +rarity=M +[/card] +[card] +primitive=Keranos, God of Storms +id=380442 +rarity=M +[/card] +[card] +primitive=King Macar, the Gold-Cursed +id=380443 +rarity=R +[/card] +[card] +primitive=Kiora's Dismissal +id=380444 +rarity=U +[/card] +[card] +primitive=Knowledge and Power +id=380445 +rarity=U +[/card] +[card] +primitive=Kruphix, God of Horizons +id=380446 +rarity=M +[/card] +[card] +primitive=Kruphix's Insight +id=380447 +rarity=C +[/card] +[card] +primitive=Lagonna-Band Trailblazer +id=380448 +rarity=C +[/card] +[card] +primitive=Launch the Fleet +id=380449 +rarity=R +[/card] +[card] +primitive=Leonin Iconoclast +id=380450 +rarity=U +[/card] +[card] +primitive=Lightning Diadem +id=380451 +rarity=C +[/card] +[card] +primitive=Magma Spray +id=380452 +rarity=C +[/card] +[card] +primitive=Mana Confluence +id=380453 +rarity=R +[/card] +[card] +primitive=Market Festival +id=380454 +rarity=C +[/card] +[card] +primitive=Master of the Feast +id=380455 +rarity=R +[/card] +[card] +primitive=Mogis's Warhound +id=380456 +rarity=U +[/card] +[card] +primitive=Mortal Obstinacy +id=380457 +rarity=C +[/card] +[card] +primitive=Nature's Panoply +id=380458 +rarity=C +[/card] +[card] +primitive=Nessian Game Warden +id=380459 +rarity=U +[/card] +[card] +primitive=Nightmarish End +id=380460 +rarity=U +[/card] +[card] +primitive=Nyx Infusion +id=380461 +rarity=C +[/card] +[card] +primitive=Nyx Weaver +id=380462 +rarity=U +[/card] +[card] +primitive=Nyx-Fleece Ram +id=380463 +rarity=U +[/card] +[card] +primitive=Oakheart Dryads +id=380464 +rarity=C +[/card] +[card] +primitive=Oppressive Rays +id=380465 +rarity=C +[/card] +[card] +primitive=Oreskos Swiftclaw +id=380466 +rarity=C +[/card] +[card] +primitive=Pensive Minotaur +id=380467 +rarity=C +[/card] +[card] +primitive=Phalanx Formation +id=380468 +rarity=U +[/card] +[card] +primitive=Pharika, God of Affliction +id=380469 +rarity=M +[/card] +[card] +primitive=Pharika's Chosen +id=380470 +rarity=C +[/card] +[card] +primitive=Pheres-Band Thunderhoof +id=380471 +rarity=C +[/card] +[card] +primitive=Pheres-Band Warchief +id=380472 +rarity=R +[/card] +[card] +primitive=Pin to the Earth +id=380473 +rarity=C +[/card] +[card] +primitive=Polymorphous Rush +id=380474 +rarity=R +[/card] +[card] +primitive=Prophetic Flamespeaker +id=380475 +rarity=M +[/card] +[card] +primitive=Pull from the Deep +id=380476 +rarity=U +[/card] +[card] +primitive=Quarry Colossus +id=380477 +rarity=U +[/card] +[card] +primitive=Ravenous Leucrocota +id=380478 +rarity=C +[/card] +[card] +primitive=Renowned Weaver +id=380479 +rarity=C +[/card] +[card] +primitive=Reprisal +id=380480 +rarity=U +[/card] +[card] +primitive=Returned Reveler +id=380481 +rarity=C +[/card] +[card] +primitive=Revel of the Fallen God +id=380482 +rarity=R +[/card] +[card] +primitive=Reviving Melody +id=380483 +rarity=U +[/card] +[card] +primitive=Riddle of Lightning +id=380484 +rarity=U +[/card] +[card] +primitive=Riptide Chimera +id=380485 +rarity=U +[/card] +[card] +primitive=Rise of Eagles +id=380486 +rarity=C +[/card] +[card] +primitive=Ritual of the Returned +id=380487 +rarity=U +[/card] +[card] +primitive=Rollick of Abandon +id=380488 +rarity=U +[/card] +[card] +primitive=Rotted Hulk +id=380489 +rarity=C +[/card] +[card] +primitive=Rouse the Mob +id=380490 +rarity=C +[/card] +[card] +primitive=Sage of Hours +id=380491 +rarity=M +[/card] +[card] +primitive=Satyr Grovedancer +id=380492 +rarity=C +[/card] +[card] +primitive=Satyr Hoplite +id=380493 +rarity=C +[/card] +[card] +primitive=Scourge of Fleets +id=380494 +rarity=R +[/card] +[card] +primitive=Setessan Tactics +id=380495 +rarity=R +[/card] +[card] +primitive=Sightless Brawler +id=380496 +rarity=U +[/card] +[card] +primitive=Sigiled Skink +id=380497 +rarity=C +[/card] +[card] +primitive=Sigiled Starfish +id=380498 +rarity=C +[/card] +[card] +primitive=Silence the Believers +id=380499 +rarity=R +[/card] +[card] +primitive=Skybind +id=380500 +rarity=R +[/card] +[card] +primitive=Skyspear Cavalry +id=380501 +rarity=U +[/card] +[card] +primitive=Solidarity of Heroes +id=380502 +rarity=U +[/card] +[card] +primitive=Spawn of Thraxes +id=380503 +rarity=R +[/card] +[card] +primitive=Spirespine +id=380504 +rarity=U +[/card] +[card] +primitive=Spite of Mogis +id=380505 +rarity=U +[/card] +[card] +primitive=Spiteful Blow +id=380506 +rarity=U +[/card] +[card] +primitive=Squelching Leeches +id=380507 +rarity=U +[/card] +[card] +primitive=Starfall +id=380508 +rarity=C +[/card] +[card] +primitive=Stonewise Fortifier +id=380509 +rarity=C +[/card] +[card] +primitive=Stormchaser Chimera +id=380510 +rarity=U +[/card] +[card] +primitive=Strength from the Fallen +id=380511 +rarity=U +[/card] +[card] +primitive=Supply-Line Cranes +id=380512 +rarity=C +[/card] +[card] +primitive=Swarmborn Giant +id=380513 +rarity=U +[/card] +[card] +primitive=Temple of Epiphany +id=380514 +rarity=R +[/card] +[card] +primitive=Temple of Malady +id=380515 +rarity=R +[/card] +[card] +primitive=Tethmos High Priest +id=380516 +rarity=U +[/card] +[card] +primitive=Thassa's Devourer +id=380517 +rarity=C +[/card] +[card] +primitive=Thassa's Ire +id=380518 +rarity=U +[/card] +[card] +primitive=Thoughtrender Lamia +id=380519 +rarity=U +[/card] +[card] +primitive=Tormented Thoughts +id=380520 +rarity=U +[/card] +[card] +primitive=Triton Cavalry +id=380521 +rarity=U +[/card] +[card] +primitive=Triton Shorestalker +id=380522 +rarity=C +[/card] +[card] +primitive=Twinflame +id=380523 +rarity=R +[/card] +[card] +primitive=Underworld Coinsmith +id=380524 +rarity=U +[/card] +[card] +primitive=War-Wing Siren +id=380525 +rarity=C +[/card] +[card] +primitive=Whitewater Naiads +id=380526 +rarity=U +[/card] +[card] +primitive=Wildfire Cerberus +id=380527 +rarity=U +[/card] +[card] +primitive=Worst Fears +id=380528 +rarity=M +[/card] diff --git a/projects/mtg/bin/Res/sets/JOU/booster.txt b/projects/mtg/bin/Res/sets/JOU/booster.txt new file mode 100644 index 000000000..11cead8ee --- /dev/null +++ b/projects/mtg/bin/Res/sets/JOU/booster.txt @@ -0,0 +1,21 @@ + + + rarity:mythic; + rarity:rare; + rarity:rare; + rarity:rare; + rarity:rare; + rarity:rare; + rarity:rare; + rarity:rare; + + + rarity:uncommon; + + + rarity:special; + + + rarity:common; + + \ No newline at end of file diff --git a/projects/mtg/bin/Res/sets/KTK/_cards.dat b/projects/mtg/bin/Res/sets/KTK/_cards.dat new file mode 100644 index 000000000..4528127e5 --- /dev/null +++ b/projects/mtg/bin/Res/sets/KTK/_cards.dat @@ -0,0 +1,1354 @@ +[meta] +author=Wagic Team +year=2014 +[/meta] +[card] +primitive=Abomination of Gudul +id=386463 +rarity=C +[/card] +[card] +primitive=Abzan Ascendancy +id=386464 +rarity=R +[/card] +[card] +primitive=Abzan Banner +id=386465 +rarity=C +[/card] +[card] +primitive=Abzan Battle Priest +id=386466 +rarity=U +[/card] +[card] +primitive=Abzan Charm +id=386467 +rarity=U +[/card] +[card] +primitive=Abzan Falconer +id=386468 +rarity=U +[/card] +[card] +primitive=Abzan Guide +id=386469 +rarity=C +[/card] +[card] +primitive=Act of Treason +id=386470 +rarity=C +[/card] +[card] +primitive=Ainok Bond-Kin +id=386471 +rarity=C +[/card] +[card] +primitive=Ainok Tracker +id=386472 +rarity=C +[/card] +[card] +primitive=Alabaster Kirin +id=386473 +rarity=C +[/card] +[card] +primitive=Alpine Grizzly +id=386474 +rarity=C +[/card] +[card] +primitive=Altar of the Brood +id=386475 +rarity=R +[/card] +[card] +primitive=Anafenza, the Foremost +id=386476 +rarity=M +[/card] +[card] +primitive=Ankle Shanker +id=386477 +rarity=R +[/card] +[card] +primitive=Arc Lightning +id=386478 +rarity=U +[/card] +[card] +primitive=Archers' Parapet +id=386479 +rarity=C +[/card] +[card] +primitive=Armament Corps +id=386480 +rarity=U +[/card] +[card] +primitive=Arrow Storm +id=386481 +rarity=C +[/card] +[card] +primitive=Ashcloud Phoenix +id=386482 +rarity=M +[/card] +[card] +primitive=Avalanche Tusker +id=386483 +rarity=R +[/card] +[card] +primitive=Awaken the Bear +id=386484 +rarity=C +[/card] +[card] +primitive=Barrage of Boulders +id=386485 +rarity=C +[/card] +[card] +primitive=Bear's Companion +id=386486 +rarity=U +[/card] +[card] +primitive=Become Immense +id=386487 +rarity=U +[/card] +[card] +primitive=Bellowing Saddlebrute +id=386488 +rarity=U +[/card] +[card] +primitive=Bitter Revelation +id=386489 +rarity=C +[/card] +[card] +primitive=Blinding Spray +id=386490 +rarity=U +[/card] +[card] +primitive=Bloodfell Caves +id=386491 +rarity=C +[/card] +[card] +primitive=Bloodfire Expert +id=386492 +rarity=C +[/card] +[card] +primitive=Bloodfire Mentor +id=386493 +rarity=C +[/card] +[card] +primitive=Bloodsoaked Champion +id=386494 +rarity=R +[/card] +[card] +primitive=Bloodstained Mire +id=386495 +rarity=R +[/card] +[card] +primitive=Blossoming Sands +id=386496 +rarity=C +[/card] +[card] +primitive=Brave the Sands +id=386497 +rarity=U +[/card] +[card] +primitive=Briber's Purse +id=386498 +rarity=U +[/card] +[card] +primitive=Bring Low +id=386499 +rarity=C +[/card] +[card] +primitive=Burn Away +id=386500 +rarity=U +[/card] +[card] +primitive=Butcher of the Horde +id=386501 +rarity=R +[/card] +[card] +primitive=Cancel +id=386502 +rarity=C +[/card] +[card] +primitive=Canyon Lurkers +id=386503 +rarity=C +[/card] +[card] +primitive=Chief of the Edge +id=386504 +rarity=U +[/card] +[card] +primitive=Chief of the Scale +id=386505 +rarity=U +[/card] +[card] +primitive=Clever Impersonator +id=386506 +rarity=M +[/card] +[card] +primitive=Crackling Doom +id=386507 +rarity=R +[/card] +[card] +primitive=Cranial Archive +id=386508 +rarity=U +[/card] +[card] +primitive=Crater's Claws +id=386509 +rarity=R +[/card] +[card] +primitive=Crippling Chill +id=386510 +rarity=C +[/card] +[card] +primitive=Dazzling Ramparts +id=386511 +rarity=U +[/card] +[card] +primitive=Dead Drop +id=386512 +rarity=U +[/card] +[card] +primitive=Death Frenzy +id=386513 +rarity=U +[/card] +[card] +primitive=Debilitating Injury +id=386514 +rarity=C +[/card] +[card] +primitive=Defiant Strike +id=386515 +rarity=C +[/card] +[card] +primitive=Deflecting Palm +id=386516 +rarity=R +[/card] +[card] +primitive=Despise +id=386517 +rarity=U +[/card] +[card] +primitive=Dig Through Time +id=386518 +rarity=R +[/card] +[card] +primitive=Disdainful Stroke +id=386519 +rarity=C +[/card] +[card] +primitive=Dismal Backwater +id=386520 +rarity=C +[/card] +[card] +primitive=Disowned Ancestor +id=386521 +rarity=C +[/card] +[card] +primitive=Dragon Grip +id=386522 +rarity=U +[/card] +[card] +primitive=Dragon Throne of Tarkir +id=386523 +rarity=R +[/card] +[card] +primitive=Dragon's Eye Savants +id=386524 +rarity=U +[/card] +[card] +primitive=Dragonscale Boon +id=386525 +rarity=C +[/card] +[card] +primitive=Dragon-Style Twins +id=386526 +rarity=R +[/card] +[card] +primitive=Duneblast +id=386527 +rarity=R +[/card] +[card] +primitive=Dutiful Return +id=386528 +rarity=C +[/card] +[card] +primitive=Efreet Weaponmaster +id=386529 +rarity=C +[/card] +[card] +primitive=Embodiment of Spring +id=386530 +rarity=C +[/card] +[card] +primitive=Empty the Pits +id=386531 +rarity=M +[/card] +[card] +primitive=End Hostilities +id=386532 +rarity=R +[/card] +[card] +primitive=Erase +id=386533 +rarity=C +[/card] +[card] +primitive=Feat of Resistance +id=386534 +rarity=C +[/card] +[card] +primitive=Feed the Clan +id=386535 +rarity=C +[/card] +[card] +primitive=Firehoof Cavalry +id=386536 +rarity=C +[/card] +[card] +primitive=Flooded Strand +id=386537 +rarity=R +[/card] +[card] +primitive=Flying Crane Technique +id=386538 +rarity=R +[/card] +[card] +primitive=Force Away +id=386539 +rarity=C +[/card] +[card] +primitive=Forest +id=386540 +rarity=L +[/card] +[card] +primitive=Forest +id=386541 +rarity=L +[/card] +[card] +primitive=Forest +id=386542 +rarity=L +[/card] +[card] +primitive=Forest +id=386543 +rarity=L +[/card] +[card] +primitive=Frontier Bivouac +id=386544 +rarity=U +[/card] +[card] +primitive=Ghostfire Blade +id=386545 +rarity=R +[/card] +[card] +primitive=Glacial Stalker +id=386546 +rarity=C +[/card] +[card] +primitive=Goblinslide +id=386547 +rarity=U +[/card] +[card] +primitive=Grim Haruspex +id=386548 +rarity=R +[/card] +[card] +primitive=Gurmag Swiftwing +id=386549 +rarity=U +[/card] +[card] +primitive=Hardened Scales +id=386550 +rarity=R +[/card] +[card] +primitive=Heart-Piercer Bow +id=386551 +rarity=U +[/card] +[card] +primitive=Heir of the Wilds +id=386552 +rarity=U +[/card] +[card] +primitive=Herald of Anafenza +id=386553 +rarity=R +[/card] +[card] +primitive=High Sentinels of Arashin +id=386554 +rarity=R +[/card] +[card] +primitive=Highland Game +id=386555 +rarity=C +[/card] +[card] +primitive=Highspire Mantis +id=386556 +rarity=U +[/card] +[card] +primitive=Hooded Hydra +id=386557 +rarity=M +[/card] +[card] +primitive=Hooting Mandrills +id=386558 +rarity=C +[/card] +[card] +primitive=Horde Ambusher +id=386559 +rarity=U +[/card] +[card] +primitive=Hordeling Outburst +id=386560 +rarity=U +[/card] +[card] +primitive=Howl of the Horde +id=386561 +rarity=R +[/card] +[card] +primitive=Icefeather Aven +id=386562 +rarity=U +[/card] +[card] +primitive=Icy Blast +id=386563 +rarity=R +[/card] +[card] +primitive=Incremental Growth +id=386564 +rarity=U +[/card] +[card] +primitive=Island +id=386565 +rarity=L +[/card] +[card] +primitive=Island +id=386566 +rarity=L +[/card] +[card] +primitive=Island +id=386567 +rarity=L +[/card] +[card] +primitive=Island +id=386568 +rarity=L +[/card] +[card] +primitive=Ivorytusk Fortress +id=386569 +rarity=R +[/card] +[card] +primitive=Jeering Instigator +id=386570 +rarity=R +[/card] +[card] +primitive=Jeskai Ascendancy +id=386571 +rarity=R +[/card] +[card] +primitive=Jeskai Banner +id=386572 +rarity=C +[/card] +[card] +primitive=Jeskai Charm +id=386573 +rarity=U +[/card] +[card] +primitive=Jeskai Elder +id=386574 +rarity=U +[/card] +[card] +primitive=Jeskai Student +id=386575 +rarity=C +[/card] +[card] +primitive=Jeskai Windscout +id=386576 +rarity=C +[/card] +[card] +primitive=Jungle Hollow +id=386577 +rarity=C +[/card] +[card] +primitive=Kheru Bloodsucker +id=386578 +rarity=U +[/card] +[card] +primitive=Kheru Dreadmaw +id=386579 +rarity=C +[/card] +[card] +primitive=Kheru Lich Lord +id=386580 +rarity=R +[/card] +[card] +primitive=Kheru Spellsnatcher +id=386581 +rarity=R +[/card] +[card] +primitive=Kill Shot +id=386582 +rarity=C +[/card] +[card] +primitive=Kin-Tree Invocation +id=386583 +rarity=U +[/card] +[card] +primitive=Kin-Tree Warden +id=386584 +rarity=C +[/card] +[card] +primitive=Krumar Bond-Kin +id=386585 +rarity=C +[/card] +[card] +primitive=Leaping Master +id=386586 +rarity=C +[/card] +[card] +primitive=Lens of Clarity +id=386587 +rarity=C +[/card] +[card] +primitive=Longshot Squad +id=386588 +rarity=C +[/card] +[card] +primitive=Mantis Rider +id=3865889 +rarity=R +[/card] +[card] +primitive=Mardu Ascendancy +id=386590 +rarity=R +[/card] +[card] +primitive=Mardu Banner +id=386591 +rarity=C +[/card] +[card] +primitive=Mardu Blazebringer +id=386592 +rarity=U +[/card] +[card] +primitive=Mardu Charm +id=386593 +rarity=U +[/card] +[card +primitive=Mardu Warrior token +id=-386593 +rarity=T +[/card] +[card] +primitive=Mardu Hateblade +id=386594 +rarity=C +[/card] +[card] +primitive=Mardu Heart-Piercer +id=386595 +rarity=U +[/card] +[card] +primitive=Mardu Hordechief +id=386596 +rarity=C +[/card] +[card] +primitive=Mardu Roughrider +id=386597 +rarity=U +[/card] +[card] +primitive=Mardu Skullhunter +id=386598 +rarity=C +[/card] +[card] +primitive=Mardu Warshrieker +id=386599 +rarity=C +[/card] +[card] +primitive=Master of Pearls +id=386600 +rarity=R +[/card] +[card] +primitive=Master the Way +id=386601 +rarity=U +[/card] +[card] +primitive=Meandering Towershell +id=386602 +rarity=R +[/card] +[card] +primitive=Mer-Ek Nightblade +id=386603 +rarity=U +[/card] +[card] +primitive=Mindswipe +id=386604 +rarity=R +[/card] +[card] +primitive=Mistfire Weaver +id=386605 +rarity=U +[/card] +[card] +primitive=Molting Snakeskin +id=386606 +rarity=C +[/card] +[card] +primitive=Monastery Flock +id=386607 +rarity=C +[/card] +[card] +primitive=Monastery Swiftspear +id=386608 +rarity=U +[/card] +[card] +primitive=Mountain +id=386609 +rarity=L +[/card] +[card] +primitive=Mountain +id=386610 +rarity=L +[/card] +[card] +primitive=Mountain +id=386611 +rarity=L +[/card] +[card] +primitive=Mountain +id=386612 +rarity=L +[/card] +[card] +primitive=Murderous Cut +id=386613 +rarity=U +[/card] +[card] +primitive=Mystic Monastery +id=386614 +rarity=U +[/card] +[card] +primitive=Mystic of the Hidden Way +id=386615 +rarity=C +[/card] +[card] +primitive=Narset, Enlightened Master +id=386616 +rarity=M +[/card] +[card] +primitive=Naturalize +id=386617 +rarity=C +[/card] +[card] +primitive=Necropolis Fiend +id=386618 +rarity=R +[/card] +[card] +primitive=Nomad Outpost +id=386619 +rarity=U +[/card] +[card] +primitive=Opulent Palace +id=386620 +rarity=U +[/card] +[card] +primitive=Pearl Lake Ancient +id=386621 +rarity=M +[/card] +[card] +primitive=Pine Walker +id=386622 +rarity=U +[/card] +[card] +primitive=Plains +id=386623 +rarity=L +[/card] +[card] +primitive=Plains +id=386624 +rarity=L +[/card] +[card] +primitive=Plains +id=386625 +rarity=L +[/card] +[card] +primitive=Plains +id=386626 +rarity=L +[/card] +[card] +primitive=Polluted Delta +id=386627 +rarity=R +[/card] +[card] +primitive=Ponyback Brigade +id=386628 +rarity=C +[/card] +[card] +primitive=Quiet Contemplation +id=386629 +rarity=U +[/card] +[card] +primitive=Raiders' Spoils +id=386630 +rarity=U +[/card] +[card] +primitive=Rakshasa Deathdealer +id=386631 +rarity=R +[/card] +[card] +primitive=Rakshasa Vizier +id=386632 +rarity=R +[/card] +[card] +primitive=Rakshasa's Secret +id=386633 +rarity=C +[/card] +[card] +primitive=Rattleclaw Mystic +id=386634 +rarity=R +[/card] +[card] +primitive=Retribution of the Ancients +id=386635 +rarity=R +[/card] +[card] +primitive=Ride Down +id=386636 +rarity=U +[/card] +[card] +primitive=Rite of the Serpent +id=386637 +rarity=C +[/card] +[card] +primitive=Riverwheel Aerialists +id=386638 +rarity=U +[/card] +[card] +primitive=Roar of Challenge +id=386639 +rarity=U +[/card] +[card] +primitive=Rotting Mastodon +id=386640 +rarity=C +[/card] +[card] +primitive=Rugged Highlands +id=386641 +rarity=C +[/card] +[card] +primitive=Rush of Battle +id=386642 +rarity=C +[/card] +[card] +primitive=Ruthless Ripper +id=386643 +rarity=U +[/card] +[card] +primitive=Sage of the Inward Eye +id=386644 +rarity=R +[/card] +[card] +primitive=Sage-Eye Harrier +id=386645 +rarity=C +[/card] +[card] +primitive=Sagu Archer +id=386646 +rarity=C +[/card] +[card] +primitive=Sagu Mauler +id=386647 +rarity=R +[/card] +[card] +primitive=Salt Road Patrol +id=386648 +rarity=R +[/card] +[card] +primitive=Sandsteppe Citadel +id=386649 +rarity=U +[/card] +[card] +primitive=Sarkhan, the Dragonspeaker +id=386650 +rarity=M +[/card] +[card] +primitive=Savage Knuckleblade +id=386651 +rarity=R +[/card] +[card] +primitive=Savage Punch +id=386652 +rarity=C +[/card] +[card] +primitive=Scaldkin +id=386653 +rarity=C +[/card] +[card] +primitive=Scion of Glaciers +id=386654 +rarity=U +[/card] +[card] +primitive=Scoured Barrens +id=386655 +rarity=C +[/card] +[card] +primitive=Scout the Borders +id=386656 +rarity=C +[/card] +[card] +primitive=Secret Plans +id=386657 +rarity=U +[/card] +[card] +primitive=See the Unwritten +id=386658 +rarity=M +[/card] +[card] +primitive=Seek the Horizon +id=386659 +rarity=U +[/card] +[card] +primitive=Seeker of the Way +id=386660 +rarity=U +[/card] +[card] +primitive=Set Adrift +id=386661 +rarity=U +[/card] +[card] +primitive=Shambling Attendants +id=386662 +rarity=C +[/card] +[card] +primitive=Shatter +id=386663 +rarity=C +[/card] +[card] +primitive=Sidisi, Brood Tyrant +id=386664 +rarity=M +[/card] +[card] +primitive=Sidisi's Pet +id=386665 +rarity=C +[/card] +[card] +primitive=Siege Rhino +id=386666 +rarity=R +[/card] +[card] +primitive=Siegecraft +id=386667 +rarity=C +[/card] +[card] +primitive=Singing Bell Strike +id=386668 +rarity=C +[/card] +[card] +primitive=Smite the Monstrous +id=386669 +rarity=C +[/card] +[card] +primitive=Smoke Teller +id=386670 +rarity=C +[/card] +[card] +primitive=Snowhorn Rider +id=386671 +rarity=C +[/card] +[card] +primitive=Sorin, Solemn Visitor +id=386672 +rarity=M +[/card] +[card] +primitive=Stubborn Denial +id=386673 +rarity=U +[/card] +[card] +primitive=Sultai Ascendancy +id=386674 +rarity=R +[/card] +[card] +primitive=Sultai Banner +id=386675 +rarity=C +[/card] +[card] +primitive=Sultai Charm +id=386676 +rarity=U +[/card] +[card] +primitive=Sultai Flayer +id=386677 +rarity=U +[/card] +[card] +primitive=Sultai Scavenger +id=386678 +rarity=C +[/card] +[card] +primitive=Sultai Soothsayer +id=386679 +rarity=U +[/card] +[card] +primitive=Summit Prowler +id=386680 +rarity=C +[/card] +[card] +primitive=Surrak Dragonclaw +id=386681 +rarity=M +[/card] +[card] +primitive=Suspension Field +id=386682 +rarity=U +[/card] +[card] +primitive=Swamp +id=386683 +rarity=L +[/card] +[card] +primitive=Swamp +id=386684 +rarity=L +[/card] +[card] +primitive=Swamp +id=386685 +rarity=L +[/card] +[card] +primitive=Swamp +id=386686 +rarity=L +[/card] +[card] +primitive=Swarm of Bloodflies +id=386687 +rarity=U +[/card] +[card] +primitive=Swift Kick +id=386688 +rarity=C +[/card] +[card] +primitive=Swiftwater Cliffs +id=386689 +rarity=C +[/card] +[card] +primitive=Taigam's Scheming +id=386690 +rarity=C +[/card] +[card] +primitive=Take Up Arms +id=386691 +rarity=U +[/card] +[card] +primitive=Temur Ascendancy +id=386692 +rarity=R +[/card] +[card] +primitive=Temur Banner +id=386693 +rarity=C +[/card] +[card] +primitive=Temur Charger +id=386694 +rarity=U +[/card] +[card] +primitive=Temur Charm +id=386695 +rarity=U +[/card] +[card] +primitive=Thornwood Falls +id=386696 +rarity=C +[/card] +[card] +primitive=Thousand Winds +id=386697 +rarity=R +[/card] +[card] +primitive=Throttle +id=386698 +rarity=C +[/card] +[card] +primitive=Timely Hordemate +id=386699 +rarity=U +[/card] +[card] +primitive=Tomb of the Spirit Dragon +id=386700 +rarity=U +[/card] +[card] +primitive=Tormenting Voice +id=386701 +rarity=C +[/card] +[card] +primitive=Trail of Mystery +id=386702 +rarity=R +[/card] +[card] +primitive=Tranquil Cove +id=386703 +rarity=C +[/card] +[card] +primitive=Trap Essence +id=386704 +rarity=R +[/card] +[card] +primitive=Treasure Cruise +id=386705 +rarity=C +[/card] +[card] +primitive=Trumpet Blast +id=386706 +rarity=C +[/card] +[card] +primitive=Tusked Colossodon +id=386707 +rarity=C +[/card] +[card] +primitive=Tuskguard Captain +id=386708 +rarity=U +[/card] +[card] +primitive=Ugin's Nexus +id=386709 +rarity=M +[/card] +[card] +primitive=Unyielding Krumar +id=386710 +rarity=C +[/card] +[card] +primitive=Utter End +id=386711 +rarity=R +[/card] +[card] +primitive=Valley Dasher +id=386712 +rarity=C +[/card] +[card] +primitive=Venerable Lammasu +id=386713 +rarity=U +[/card] +[card] +primitive=Villainous Wealth +id=386714 +rarity=R +[/card] +[card] +primitive=War Behemoth +id=386715 +rarity=C +[/card] +[card] +primitive=Warden of the Eye +id=386716 +rarity=U +[/card] +[card] +primitive=War-Name Aspirant +id=386717 +rarity=U +[/card] +[card] +primitive=Watcher of the Roost +id=386718 +rarity=U +[/card] +[card] +primitive=Waterwhirl +id=386719 +rarity=U +[/card] +[card] +primitive=Weave Fate +id=386720 +rarity=C +[/card] +[card] +primitive=Wetland Sambar +id=386721 +rarity=C +[/card] +[card] +primitive=Whirlwind Adept +id=386722 +rarity=C +[/card] +[card] +primitive=Wind-Scarred Crag +id=386723 +rarity=C +[/card] +[card] +primitive=Windstorm +id=386724 +rarity=U +[/card] +[card] +primitive=Windswept Heath +id=386725 +rarity=R +[/card] +[card] +primitive=Wingmate Roc +id=386726 +rarity=M +[/card] +[card] +primitive=Winterflame +id=386727 +rarity=U +[/card] +[card] +primitive=Witness of the Ages +id=386728 +rarity=U +[/card] +[card] +primitive=Wooded Foothills +id=386729 +rarity=R +[/card] +[card] +primitive=Woolly Loxodon +id=386730 +rarity=C +[/card] +[card] +primitive=Zurgo Helmsmasher +id=386731 +rarity=M +[/card] diff --git a/projects/mtg/bin/Res/sets/KTK/booster.txt b/projects/mtg/bin/Res/sets/KTK/booster.txt new file mode 100644 index 000000000..dc7345ae9 --- /dev/null +++ b/projects/mtg/bin/Res/sets/KTK/booster.txt @@ -0,0 +1,21 @@ + + + rarity:mythic; + rarity:rare; + rarity:rare; + rarity:rare; + rarity:rare; + rarity:rare; + rarity:rare; + rarity:rare; + + + rarity:uncommon; + + + rarity:special; + + + rarity:common; + + \ No newline at end of file diff --git a/projects/mtg/bin/Res/sets/LRW/_cards.dat b/projects/mtg/bin/Res/sets/LRW/_cards.dat index 58a8ff115..c1af94093 100644 --- a/projects/mtg/bin/Res/sets/LRW/_cards.dat +++ b/projects/mtg/bin/Res/sets/LRW/_cards.dat @@ -1513,8 +1513,3 @@ primitive=Zephyr Net id=142357 rarity=C [/card] -[card] -primitive=Avatar Token -id=-140233 -rarity=T -[/card] diff --git a/projects/mtg/bin/Res/sets/M14/_cards.dat b/projects/mtg/bin/Res/sets/M14/_cards.dat index c2c52c8be..eb5cd4d15 100644 --- a/projects/mtg/bin/Res/sets/M14/_cards.dat +++ b/projects/mtg/bin/Res/sets/M14/_cards.dat @@ -11,7 +11,7 @@ rarity=C [card] primitive=Accorder's Shield id=370581 -rarity=C +rarity=U [/card] [card] primitive=Accursed Spirit @@ -31,7 +31,7 @@ rarity=C [card] primitive=Air Servant id=370688 -rarity=C +rarity=U [/card] [card] primitive=Ajani, Caller of the Pride @@ -121,7 +121,7 @@ rarity=C [card] primitive=Blur Sliver id=370593 -rarity=U +rarity=C [/card] [card] primitive=Bogbrew Witch @@ -156,7 +156,7 @@ rarity=C [card] primitive=Bubbling Cauldron id=370661 -rarity=R +rarity=U [/card] [card] primitive=Burning Earth @@ -261,7 +261,7 @@ rarity=R [card] primitive=Darksteel Forge id=370734 -rarity=R +rarity=M [/card] [card] primitive=Darksteel Ingot @@ -326,7 +326,7 @@ rarity=R [card] primitive=Doom Blade id=370609 -rarity=C +rarity=U [/card] [card] primitive=Door of Destinies @@ -339,6 +339,11 @@ id=370660 rarity=U [/card] [card] +primitive=Dragon Egg Dragon +id=-370660 +rarity=T +[/card] +[card] primitive=Dragon Hatchling id=370717 rarity=C @@ -431,7 +436,7 @@ rarity=C [card] primitive=Fortify id=370712 -rarity=U +rarity=C [/card] [card] primitive=Frost Breath @@ -581,7 +586,7 @@ rarity=R [card] primitive=Kalonian Hydra id=370766 -rarity=R +rarity=M [/card] [card] primitive=Kalonian Tusker @@ -591,7 +596,7 @@ rarity=U [card] primitive=Lava Axe id=370595 -rarity= +rarity=C [/card] [card] primitive=Lay of the Land @@ -619,8 +624,8 @@ id=370740 rarity=R [/card] [card] -primitive=Zombie Token -id=-339967 +primitive=Liliana's Reaver Zombie +id=-370740 rarity=T [/card] [card] @@ -736,7 +741,7 @@ rarity=R [card] primitive=Nightwing Shade id=370705 -rarity=U +rarity=C [/card] [card] primitive=Oath of the Ancient Wood @@ -831,7 +836,7 @@ rarity=R [card] primitive=Quag Sickness id=370714 -rarity=U +rarity=C [/card] [card] primitive=Quicken @@ -846,7 +851,7 @@ rarity=C [card] primitive=Ratchet Bomb id=370623 -rarity=C +rarity=R [/card] [card] primitive=Regathan Firecat @@ -896,7 +901,7 @@ rarity=R [card] primitive=Scourge of Valkas id=370584 -rarity=R +rarity=M [/card] [card] primitive=Scroll Thief @@ -951,7 +956,7 @@ rarity=M [card] primitive=Shimmering Grotto id=370631 -rarity=C +rarity=U [/card] [card] primitive=Shivan Dragon @@ -1031,6 +1036,7 @@ rarity=U [card] primitive=Staff of the Mind Magus id=370676 +rarity=U [/card] [card] primitive=Staff of the Wild Magus @@ -1105,7 +1111,7 @@ rarity=R [card] primitive=Thunder Strike id=370607 -rarity=U +rarity=C [/card] [card] primitive=Tidebinder Mage @@ -1115,7 +1121,7 @@ rarity=R [card] primitive=Time Ebb id=370641 -rarity=R +rarity=C [/card] [card] primitive=Tome Scour @@ -1215,7 +1221,7 @@ rarity=R [card] primitive=Windreader Sphinx id=370810 -rarity=U +rarity=M [/card] [card] primitive=Windstorm @@ -1243,8 +1249,8 @@ id=370619 rarity=R [/card] [card] -primitive=Zombie Token -id=-339968 +primitive=Xathrid Necromancer Zombie +id=-370619 rarity=T [/card] [card] diff --git a/projects/mtg/bin/Res/sets/M15/_cards.dat b/projects/mtg/bin/Res/sets/M15/_cards.dat new file mode 100644 index 000000000..bf494208d --- /dev/null +++ b/projects/mtg/bin/Res/sets/M15/_cards.dat @@ -0,0 +1,1445 @@ +[meta] +author=Wagic Team +name=Magic 2015 +year=2014 +[/meta] +[card] +primitive=Accursed Spirit +id=383175 +rarity=C +[/card] +[card] +primitive=Act on Impulse +id=383176 +rarity=U +[/card] +[card] +primitive=Aegis Angel +id=383160 +rarity=R +[/card] +[card] +primitive=Aeronaut Tinkerer +id=383177 +rarity=C +[/card] +[card] +primitive=AEtherspouts +id=383178 +rarity=R +[/card] +[card] +primitive=Aggressive Mining +id=383179 +rarity=R +[/card] +[card] +primitive=Ajani Steadfast +id=383180 +rarity=M +[/card] +[card] +primitive=Ajani's Pridemate +id=383181 +rarity=U +[/card] +[card] +primitive=Altac Bloodseeker +id=383182 +rarity=U +[/card] +[card] +primitive=Amphin Pathmage +id=383183 +rarity=C +[/card] +[card] +primitive=Ancient Silverback +id=383184 +rarity=U +[/card] +[card] +primitive=Avacyn, Guardian Angel +id=383185 +rarity=R +[/card] +[card] +primitive=Avarice Amulet +id=383186 +rarity=R +[/card] +[card] +primitive=Back to Nature +id=383187 +rarity=U +[/card] +[card] +primitive=Battle Mastery +id=383188 +rarity=U +[/card] +[card] +primitive=Battlefield Forge +id=383189 +rarity=R +[/card] +[card] +primitive=Belligerent Sliver +id=383190 +rarity=U +[/card] +[card] +primitive=Black Cat +id=383191 +rarity=C +[/card] +[card] +primitive=Blastfire Bolt +id=383192 +rarity=C +[/card] +[card] +primitive=Blood Host +id=383193 +rarity=U +[/card] +[card] +primitive=Boonweaver Giant +id=383194 +rarity=U +[/card] +[card] +primitive=Borderland Marauder +id=383195 +rarity=C +[/card] +[card] +primitive=Brawler's Plate +id=383196 +rarity=U +[/card] +[card] +primitive=Bronze Sable +id=383197 +rarity=C +[/card] +[card] +primitive=Brood Keeper +id=383198 +rarity=U +[/card] +[card] +primitive=Brood Keeper Dragon +id=-383198 +rarity=T +[/card] +[card] +primitive=Burning Anger +id=383199 +rarity=R +[/card] +[card] +primitive=Cancel +id=383161 +rarity=C +[/card] +[card] +primitive=Carnivorous Moss-Beast +id=383200 +rarity=C +[/card] +[card] +primitive=Carrion Crow +id=383201 +rarity=C +[/card] +[card] +primitive=Caustic Tar +id=383202 +rarity=U +[/card] +[card] +primitive=Caves of Koilos +id=383203 +rarity=R +[/card] +[card] +primitive=Centaur Courser +id=383162 +rarity=C +[/card] +[card] +primitive=Chandra, Pyromaster +id=383204 +rarity=M +[/card] +[card] +primitive=Charging Rhino +id=383205 +rarity=C +[/card] +[card] +primitive=Chasm Skulker +id=383206 +rarity=R +[/card] +[card] +primitive=Chief Engineer +id=383207 +rarity=R +[/card] +[card] +primitive=Child of Night +id=383208 +rarity=C +[/card] +[card] +primitive=Chord of Calling +id=383209 +rarity=R +[/card] +[card] +primitive=Chronostutter +id=383210 +rarity=C +[/card] +[card] +primitive=Circle of Flame +id=383211 +rarity=U +[/card] +[card] +primitive=Clear a Path +id=383212 +rarity=C +[/card] +[card] +primitive=Cone of Flame +id=383213 +rarity=U +[/card] +[card] +primitive=Congregate +id=383214 +rarity=U +[/card] +[card] +primitive=Constricting Sliver +id=383215 +rarity=U +[/card] +[card] +primitive=Coral Barrier +id=383216 +rarity=C +[/card] +[card] +primitive=Covenant of Blood +id=383217 +rarity=C +[/card] +[card] +primitive=Crippling Blight +id=383218 +rarity=C +[/card] +[card] +primitive=Crowd's Favor +id=383219 +rarity=C +[/card] +[card] +primitive=Crucible of Fire +id=383220 +rarity=R +[/card] +[card] +primitive=Cruel Sadist +id=383221 +rarity=R +[/card] +[card] +primitive=Darksteel Citadel +id=383222 +rarity=U +[/card] +[card] +primitive=Dauntless River Marshal +id=383223 +rarity=U +[/card] +[card] +primitive=Devouring Light +id=383224 +rarity=U +[/card] +[card] +primitive=Diffusion Sliver +id=383225 +rarity=U +[/card] +[card] +primitive=Dissipate +id=383226 +rarity=U +[/card] +[card] +primitive=Divination +id=383227 +rarity=C +[/card] +[card] +primitive=Divine Favor +id=383228 +rarity=C +[/card] +[card] +primitive=Divine Verdict +id=383163 +rarity=C +[/card] +[card] +primitive=Elvish Mystic +id=383229 +rarity=U +[/card] +[card] +primitive=Encrust +id=383230 +rarity=C +[/card] +[card] +primitive=Endless Obedience +id=383231 +rarity=U +[/card] +[card] +primitive=Ensoul Artifact +id=383232 +rarity=U +[/card] +[card] +primitive=Ephemeral Shields +id=383233 +rarity=C +[/card] +[card] +primitive=Eternal Thirst +id=383234 +rarity=C +[/card] +[card] +primitive=Evolving Wilds +id=383235 +rarity=C +[/card] +[card] +primitive=Feast on the Fallen +id=383236 +rarity=U +[/card] +[card] +primitive=Feral Incarnation +id=383237 +rarity=U +[/card] +[card] +primitive=Festergloom +id=383238 +rarity=C +[/card] +[card] +primitive=First Response +id=383239 +rarity=U +[/card] +[card] +primitive=Flesh to Dust +id=383240 +rarity=C +[/card] +[card] +primitive=Forest +id=383241 +rarity=L +[/card] +[card] +primitive=Forest +id=383242 +rarity=L +[/card] +[card] +primitive=Forest +id=383243 +rarity=L +[/card] +[card] +primitive=Forest +id=383244 +rarity=L +[/card] +[card] +primitive=Forge Devil +id=383245 +rarity=C +[/card] +[card] +primitive=Foundry Street Denizen +id=383246 +rarity=C +[/card] +[card] +primitive=Frenzied Goblin +id=383247 +rarity=U +[/card] +[card] +primitive=Frost Lynx +id=383248 +rarity=C +[/card] +[card] +primitive=Fugitive Wizard +id=383249 +rarity=C +[/card] +[card] +primitive=Furnace Whelp +id=383164 +rarity=U +[/card] +[card] +primitive=Gargoyle Sentinel +id=383250 +rarity=U +[/card] +[card] +primitive=Garruk, Apex Predator +id=383251 +rarity=M +[/card] +[card] +primitive=Garruk's Packleader +id=383165 +rarity=U +[/card] +[card] +primitive=Gather Courage +id=383252 +rarity=U +[/card] +[card] +primitive=Geist of the Moors +id=383253 +rarity=U +[/card] +[card] +primitive=Generator Servant +id=383254 +rarity=C +[/card] +[card] +primitive=Genesis Hydra +id=383255 +rarity=R +[/card] +[card] +primitive=Glacial Crasher +id=383256 +rarity=C +[/card] +[card] +primitive=Goblin Kaboomist +id=383257 +rarity=R +[/card] +[card] +primitive=Land Mine +id=-383257 +rarity=T +[/card] +[card] +primitive=Goblin Rabblemaster +id=383258 +rarity=R +[/card] +[card] +primitive=Goblin Roughrider +id=383259 +rarity=C +[/card] +[card] +primitive=Gravedigger +id=383260 +rarity=U +[/card] +[card] +primitive=Grindclock +id=383261 +rarity=R +[/card] +[card] +primitive=Hammerhand +id=383262 +rarity=C +[/card] +[card] +primitive=Haunted Plate Mail +id=383263 +rarity=R +[/card] +[card] +primitive=Heat Ray +id=383264 +rarity=U +[/card] +[card] +primitive=Heliod's Pilgrim +id=383265 +rarity=C +[/card] +[card] +primitive=Hoarding Dragon +id=383266 +rarity=R +[/card] +[card] +primitive=Hornet Nest +id=383267 +rarity=R +[/card] +[card] +primitive=Hornet Queen +id=383268 +rarity=R +[/card] +[card] +primitive=Hot Soup +id=383269 +rarity=U +[/card] +[card] +primitive=Hunt the Weak +id=383270 +rarity=C +[/card] +[card] +primitive=Hunter's Ambush +id=383271 +rarity=C +[/card] +[card] +primitive=Hushwing Gryff +id=383272 +rarity=R +[/card] +[card] +primitive=Hydrosurge +id=383273 +rarity=C +[/card] +[card] +primitive=Illusory Angel +id=383274 +rarity=U +[/card] +[card] +primitive=In Garruk's Wake +id=383275 +rarity=R +[/card] +[card] +primitive=Indulgent Tormentor +id=383276 +rarity=R +[/card] +[card] +primitive=Inferno Fist +id=383277 +rarity=C +[/card] +[card] +primitive=Inspired Charge +id=383166 +rarity=C +[/card] +[card] +primitive=Into the Void +id=383278 +rarity=U +[/card] +[card] +primitive=Invasive Species +id=383279 +rarity=C +[/card] +[card] +primitive=Invisibility +id=383280 +rarity=C +[/card] +[card] +primitive=Island +id=383281 +rarity=L +[/card] +[card] +primitive=Island +id=383282 +rarity=L +[/card] +[card] +primitive=Island +id=383283 +rarity=L +[/card] +[card] +primitive=Island +id=383284 +rarity=L +[/card] +[card] +primitive=Jace, the Living Guildpact +id=383285 +rarity=M +[/card] +[card] +primitive=Jace's Ingenuity +id=383286 +rarity=U +[/card] +[card] +primitive=Jalira, Master Polymorphist +id=383287 +rarity=R +[/card] +[card] +primitive=Jorubai Murk Lurker +id=383288 +rarity=U +[/card] +[card] +primitive=Juggernaut +id=383289 +rarity=U +[/card] +[card] +primitive=Kalonian Twingrove +id=383290 +rarity=R +[/card] +[card] +primitive=Treefolk Warrior +id=-383290 +rarity=T +[/card] +[card] +primitive=Kapsho Kitefins +id=383291 +rarity=U +[/card] +[card] +primitive=Kinsbaile Skirmisher +id=383292 +rarity=C +[/card] +[card] +primitive=Kird Chieftain +id=383293 +rarity=U +[/card] +[card] +primitive=Krenko's Enforcer +id=383294 +rarity=C +[/card] +[card] +primitive=Kurkesh, Onakke Ancient +id=383295 +rarity=R +[/card] +[card] +primitive=Lava Axe +id=383296 +rarity=C +[/card] +[card] +primitive=Leeching Sliver +id=383297 +rarity=U +[/card] +[card] +primitive=Life's Legacy +id=383298 +rarity=R +[/card] +[card] +primitive=Lightning Strike +id=383299 +rarity=C +[/card] +[card] +primitive=Liliana Vess +id=383300 +rarity=M +[/card] +[card] +primitive=Living Totem +id=383301 +rarity=C +[/card] +[card] +primitive=Llanowar Wastes +id=383302 +rarity=R +[/card] +[card] +primitive=Mahamoti Djinn +id=383167 +rarity=R +[/card] +[card] +primitive=Marked by Honor +id=383303 +rarity=C +[/card] +[card] +primitive=Mass Calcify +id=383304 +rarity=R +[/card] +[card] +primitive=Master of Predicaments +id=383305 +rarity=R +[/card] +[card] +primitive=Meditation Puzzle +id=383306 +rarity=C +[/card] +[card] +primitive=Mercurial Pretender +id=383307 +rarity=R +[/card] +[card] +primitive=Meteorite +id=383308 +rarity=U +[/card] +[card] +primitive=Midnight Guard +id=383309 +rarity=C +[/card] +[card] +primitive=Might Makes Right +id=383310 +rarity=U +[/card] +[card] +primitive=Military Intelligence +id=383311 +rarity=U +[/card] +[card] +primitive=Mind Rot +id=383312 +rarity=C +[/card] +[card] +primitive=Mind Sculpt +id=383313 +rarity=C +[/card] +[card] +primitive=Miner's Bane +id=383314 +rarity=C +[/card] +[card] +primitive=Mountain +id=383315 +rarity=L +[/card] +[card] +primitive=Mountain +id=383316 +rarity=L +[/card] +[card] +primitive=Mountain +id=383317 +rarity=L +[/card] +[card] +primitive=Mountain +id=383318 +rarity=L +[/card] +[card] +primitive=Naturalize +id=383319 +rarity=C +[/card] +[card] +primitive=Necrobite +id=383320 +rarity=C +[/card] +[card] +primitive=Necrogen Scudder +id=383321 +rarity=U +[/card] +[card] +primitive=Necromancer's Assistant +id=383322 +rarity=C +[/card] +[card] +primitive=Necromancer's Stockpile +id=383323 +rarity=R +[/card] +[card] +primitive=Zombie Token +id=-383323 +rarity=T +[/card] +[card] +primitive=Negate +id=383324 +rarity=C +[/card] +[card] +primitive=Netcaster Spider +id=383325 +rarity=C +[/card] +[card] +primitive=Nightfire Giant +id=383326 +rarity=U +[/card] +[card] +primitive=Nightmare +id=383168 +rarity=R +[/card] +[card] +primitive=Nimbus of the Isles +id=383327 +rarity=C +[/card] +[card] +primitive=Nissa, Worldwaker +id=383328 +rarity=M +[/card] +[card] +primitive=Nissa's Expedition +id=383329 +rarity=U +[/card] +[card] +primitive=Ob Nixilis, Unshackled +id=383330 +rarity=R +[/card] +[card] +primitive=Obelisk of Urd +id=383331 +rarity=R +[/card] +[card] +primitive=Oppressive Rays +id=383332 +rarity=C +[/card] +[card] +primitive=Oreskos Swiftclaw +id=383333 +rarity=C +[/card] +[card] +primitive=Ornithopter +id=383334 +rarity=C +[/card] +[card] +primitive=Overwhelm +id=383335 +rarity=U +[/card] +[card] +primitive=Paragon of Eternal Wilds +id=383336 +rarity=U +[/card] +[card] +primitive=Paragon of Fierce Defiance +id=383337 +rarity=U +[/card] +[card] +primitive=Paragon of Gathering Mists +id=383338 +rarity=U +[/card] +[card] +primitive=Paragon of New Dawns +id=383339 +rarity=U +[/card] +[card] +primitive=Paragon of Open Graves +id=383340 +rarity=U +[/card] +[card] +primitive=Peel from Reality +id=383341 +rarity=C +[/card] +[card] +primitive=Perilous Vault +id=383342 +rarity=M +[/card] +[card] +primitive=Phyrexian Revoker +id=383343 +rarity=R +[/card] +[card] +primitive=Phytotitan +id=383344 +rarity=R +[/card] +[card] +primitive=Pillar of Light +id=383345 +rarity=C +[/card] +[card] +primitive=Plains +id=383346 +rarity=L +[/card] +[card] +primitive=Plains +id=383347 +rarity=L +[/card] +[card] +primitive=Plains +id=383348 +rarity=L +[/card] +[card] +primitive=Plains +id=383349 +rarity=L +[/card] +[card] +primitive=Plummet +id=383350 +rarity=C +[/card] +[card] +primitive=Polymorphist's Jest +id=383351 +rarity=R +[/card] +[card] +primitive=Preeminent Captain +id=383352 +rarity=R +[/card] +[card] +primitive=Profane Memento +id=383353 +rarity=U +[/card] +[card] +primitive=Quickling +id=383354 +rarity=U +[/card] +[card] +primitive=Radiant Fountain +id=383355 +rarity=C +[/card] +[card] +primitive=Raise the Alarm +id=383356 +rarity=C +[/card] +[card] +primitive=Ranger's Guile +id=383357 +rarity=C +[/card] +[card] +primitive=Razorfoot Griffin +id=383358 +rarity=C +[/card] +[card] +primitive=Reclamation Sage +id=383359 +rarity=U +[/card] +[card] +primitive=Research Assistant +id=383360 +rarity=C +[/card] +[card] +primitive=Resolute Archangel +id=383361 +rarity=R +[/card] +[card] +primitive=Restock +id=383362 +rarity=U +[/card] +[card] +primitive=Return to the Ranks +id=383363 +rarity=R +[/card] +[card] +primitive=Roaring Primadox +id=383364 +rarity=U +[/card] +[card] +primitive=Rogue's Gloves +id=383365 +rarity=U +[/card] +[card] +primitive=Rotfeaster Maggot +id=383366 +rarity=C +[/card] +[card] +primitive=Rummaging Goblin +id=383367 +rarity=C +[/card] +[card] +primitive=Runeclaw Bear +id=383368 +rarity=C +[/card] +[card] +primitive=Sacred Armory +id=383369 +rarity=U +[/card] +[card] +primitive=Sanctified Charge +id=383370 +rarity=C +[/card] +[card] +primitive=Satyr Wayfinder +id=383371 +rarity=C +[/card] +[card] +primitive=Scrapyard Mongrel +id=383372 +rarity=C +[/card] +[card] +primitive=Scuttling Doom Engine +id=383373 +rarity=R +[/card] +[card] +primitive=Seismic Strike +id=383169 +rarity=C +[/card] +[card] +primitive=Selfless Cathar +id=383374 +rarity=C +[/card] +[card] +primitive=Sengir Vampire +id=383170 +rarity=U +[/card] +[card] +primitive=Seraph of the Masses +id=383375 +rarity=U +[/card] +[card] +primitive=Serra Angel +id=383171 +rarity=U +[/card] +[card] +primitive=Shadowcloak Vampire +id=383376 +rarity=C +[/card] +[card] +primitive=Shaman of Spring +id=383377 +rarity=C +[/card] +[card] +primitive=Shield of the Avatar +id=383378 +rarity=R +[/card] +[card] +primitive=Shivan Dragon +id=383172 +rarity=R +[/card] +[card] +primitive=Shivan Reef +id=383379 +rarity=R +[/card] +[card] +primitive=Shrapnel Blast +id=383380 +rarity=U +[/card] +[card] +primitive=Siege Dragon +id=383381 +rarity=R +[/card] +[card] +primitive=Siege Wurm +id=383382 +rarity=C +[/card] +[card] +primitive=Sign in Blood +id=383383 +rarity=C +[/card] +[card] +primitive=Sliver Hive +id=383384 +rarity=R +[/card] +[card] +primitive=Sliver Hivelord +id=383385 +rarity=M +[/card] +[card] +primitive=Solemn Offering +id=383386 +rarity=C +[/card] +[card] +primitive=Soul of Innistrad +id=383387 +rarity=M +[/card] +[card] +primitive=Soul of New Phyrexia +id=383388 +rarity=M +[/card] +[card] +primitive=Soul of Ravnica +id=383389 +rarity=M +[/card] +[card] +primitive=Soul of Shandalar +id=383390 +rarity=M +[/card] +[card] +primitive=Soul of Theros +id=383391 +rarity=M +[/card] +[card] +primitive=Soul of Zendikar +id=383392 +rarity=M +[/card] +[card] +primitive=Soulmender +id=383393 +rarity=C +[/card] +[card] +primitive=Spectra Ward +id=383394 +rarity=R +[/card] +[card] +primitive=Spirit Bonds +id=383395 +rarity=R +[/card] +[card] +primitive=Stab Wound +id=383396 +rarity=U +[/card] +[card] +primitive=Staff of the Death Magus +id=383397 +rarity=U +[/card] +[card] +primitive=Staff of the Flame Magus +id=383398 +rarity=U +[/card] +[card] +primitive=Staff of the Mind Magus +id=383399 +rarity=U +[/card] +[card] +primitive=Staff of the Sun Magus +id=383400 +rarity=U +[/card] +[card] +primitive=Staff of the Wild Magus +id=383401 +rarity=U +[/card] +[card] +primitive=Stain the Mind +id=383402 +rarity=R +[/card] +[card] +primitive=Statute of Denial +id=383403 +rarity=C +[/card] +[card] +primitive=Stoke the Flames +id=383404 +rarity=U +[/card] +[card] +primitive=Stormtide Leviathan +id=383405 +rarity=R +[/card] +[card] +primitive=Sunblade Elf +id=383406 +rarity=U +[/card] +[card] +primitive=Sungrace Pegasus +id=383407 +rarity=C +[/card] +[card] +primitive=Swamp +id=383408 +rarity=L +[/card] +[card] +primitive=Swamp +id=383409 +rarity=L +[/card] +[card] +primitive=Swamp +id=383410 +rarity=L +[/card] +[card] +primitive=Swamp +id=383411 +rarity=L +[/card] +[card] +primitive=Terra Stomper +id=383173 +rarity=R +[/card] +[card] +primitive=The Chain Veil +id=383412 +rarity=M +[/card] +[card] +primitive=Thundering Giant +id=383413 +rarity=C +[/card] +[card] +primitive=Tireless Missionaries +id=383414 +rarity=C +[/card] +[card] +primitive=Titanic Growth +id=383415 +rarity=C +[/card] +[card] +primitive=Torch Fiend +id=383416 +rarity=C +[/card] +[card] +primitive=Tormod's Crypt +id=383417 +rarity=U +[/card] +[card] +primitive=Triplicate Spirits +id=383418 +rarity=C +[/card] +[card] +primitive=Turn to Frog +id=383419 +rarity=U +[/card] +[card] +primitive=Typhoid Rats +id=383420 +rarity=C +[/card] +[card] +primitive=Tyrant's Machine +id=383421 +rarity=C +[/card] +[card] +primitive=Ulcerate +id=383422 +rarity=U +[/card] +[card] +primitive=Undergrowth Scavenger +id=383423 +rarity=C +[/card] +[card] +primitive=Unmake the Graves +id=383424 +rarity=C +[/card] +[card] +primitive=Urborg, Tomb of Yawgmoth +id=383425 +rarity=R +[/card] +[card] +primitive=Venom Sliver +id=383426 +rarity=U +[/card] +[card] +primitive=Verdant Haven +id=383427 +rarity=C +[/card] +[card] +primitive=Vineweft +id=383428 +rarity=C +[/card] +[card] +primitive=Void Snare +id=383429 +rarity=C +[/card] +[card] +primitive=Walking Corpse +id=383174 +rarity=C +[/card] +[card] +primitive=Wall of Essence +id=383430 +rarity=U +[/card] +[card] +primitive=Wall of Fire +id=383431 +rarity=C +[/card] +[card] +primitive=Wall of Frost +id=383432 +rarity=U +[/card] +[card] +primitive=Wall of Limbs +id=383433 +rarity=U +[/card] +[card] +primitive=Wall of Mulch +id=383434 +rarity=U +[/card] +[card] +primitive=Warden of the Beyond +id=383435 +rarity=U +[/card] +[card] +primitive=Waste Not +id=383436 +rarity=R +[/card] +[card] +primitive=Welkin Tern +id=383437 +rarity=C +[/card] +[card] +primitive=Will-Forged Golem +id=383438 +rarity=C +[/card] +[card] +primitive=Witch's Familiar +id=383439 +rarity=C +[/card] +[card] +primitive=Xathrid Slyblade +id=383440 +rarity=U +[/card] +[card] +primitive=Yavimaya Coast +id=383441 +rarity=R +[/card] +[card] +primitive=Yisan, the Wanderer Bard +id=383442 +rarity=R +[/card] +[card] +primitive=Zof Shade +id=383443 +rarity=C +[/card] diff --git a/projects/mtg/bin/Res/sets/ORI/_cards.dat b/projects/mtg/bin/Res/sets/ORI/_cards.dat new file mode 100644 index 000000000..55bb1f173 --- /dev/null +++ b/projects/mtg/bin/Res/sets/ORI/_cards.dat @@ -0,0 +1,1391 @@ +[meta] +author=Wagic Team +name=Magic Origins +year=2015 +[/meta] +[card] +primitive=Abbot of Keral Keep +id=398411 +rarity=R +[/card] +[card] +primitive=Acolyte of the Inferno +id=398574 +rarity=U +[/card] +[card] +primitive=Act of Treason +id=398578 +rarity=C +[/card] +[card] +primitive=Aerial Volley +id=398565 +rarity=C +[/card] +[card] +primitive=Akroan Jailer +id=398656 +rarity=C +[/card] +[card] +primitive=Akroan Sergeant +id=398604 +rarity=C +[/card] +[card] +primitive=Alchemist's Vial +id=398640 +rarity=C +[/card] +[card] +primitive=Alhammarret, High Arbiter +id=398436 +rarity=R +[/card] +[card] +primitive=Alhammarret's Archive +id=398564 +rarity=M +[/card] +[card] +primitive=Ampryn Tactician +id=398603 +rarity=C +[/card] +[card] +primitive=Anchor to the AEther +id=398474 +rarity=U +[/card] +[card] +primitive=Angel's Tomb +id=398418 +rarity=U +[/card] +[card] +primitive=Animist's Awakening +id=398437 +rarity=R +[/card] +[card] +primitive=Anointer of Champions +id=398455 +rarity=U +[/card] +[card] +primitive=Archangel of Tithes +id=398571 +rarity=M +[/card] +[card] +primitive=Artificer's Epiphany +id=398462 +rarity=C +[/card] +[card] +primitive=Aspiring Aeronaut +id=398674 +rarity=C +[/card] +[card] +primitive=Auramancer +id=398678 +rarity=C +[/card] +[card] +primitive=Avaricious Dragon +id=398667 +rarity=M +[/card] +[card] +primitive=Aven Battle Priest +id=398627 +rarity=C +[/card] +[card] +primitive=Battlefield Forge +id=398417 +rarity=R +[/card] +[card] +primitive=Bellows Lizard +id=398439 +rarity=C +[/card] +[card] +primitive=Blazing Hellhound +id=398660 +rarity=U +[/card] +[card] +primitive=Blessed Spirits +id=398628 +rarity=U +[/card] +[card] +primitive=Blightcaster +id=398618 +rarity=U +[/card] +[card] +primitive=Blood-Cursed Knight +id=398527 +rarity=U +[/card] +[card] +primitive=Boggart Brute +id=398606 +rarity=C +[/card] +[card] +primitive=Bonded Construct +id=398665 +rarity=C +[/card] +[card] +primitive=Bone to Ash +id=398539 +rarity=C +[/card] +[card] +primitive=Bounding Krasis +id=398635 +rarity=U +[/card] +[card] +primitive=Brawler's Plate +id=398532 +rarity=U +[/card] +[card] +primitive=Calculated Dismissal +id=398480 +rarity=C +[/card] +[card] +primitive=Call of the Full Moon +id=398457 +rarity=U +[/card] +[card] +primitive=Catacomb Slug +id=398473 +rarity=C +[/card] +[card] +primitive=Caustic Caterpillar +id=398409 +rarity=C +[/card] +[card] +primitive=Caves of Koilos +id=398504 +rarity=R +[/card] +[card] +primitive=Celestial Flare +id=398488 +rarity=C +[/card] +[card] +primitive=Chandra, Fire of Kaladesh +id=398422 +rarity=M +[/card] +[card] +primitive=Chandra, Roaring Flame +id=398423 +rarity=T +[/card] +[card] +primitive=Chandra's Fury +id=398632 +rarity=C +[/card] +[card] +primitive=Chandra's Ignition +id=398416 +rarity=R +[/card] +[card] +primitive=Charging Griffin +id=398560 +rarity=C +[/card] +[card] +primitive=Chief of the Foundry +id=398581 +rarity=U +[/card] +[card] +primitive=Citadel Castellan +id=398672 +rarity=U +[/card] +[card] +primitive=Clash of Wills +id=398542 +rarity=U +[/card] +[card] +primitive=Claustrophobia +id=398607 +rarity=C +[/card] +[card] +primitive=Cleric of the Forward Order +id=398451 +rarity=C +[/card] +[card] +primitive=Cobblebrute +id=398616 +rarity=C +[/card] +[card] +primitive=Conclave Naturalists +id=398419 +rarity=U +[/card] +[card] +primitive=Consecrated by Blood +id=398512 +rarity=U +[/card] +[card] +primitive=Consul's Lieutenant +id=398446 +rarity=U +[/card] +[card] +primitive=Cruel Revival +id=398415 +rarity=U +[/card] +[card] +primitive=Dark Dabbling +id=398466 +rarity=C +[/card] +[card] +primitive=Dark Petition +id=398525 +rarity=R +[/card] +[card] +primitive=Day's Undoing +id=398652 +rarity=M +[/card] +[card] +primitive=Deadbridge Shaman +id=398500 +rarity=C +[/card] +[card] +primitive=Deep-Sea Terror +id=398605 +rarity=C +[/card] +[card] +primitive=Demolish +id=398486 +rarity=C +[/card] +[card] +primitive=Demonic Pact +id=398433 +rarity=M +[/card] +[card] +primitive=Despoiler of Souls +id=398587 +rarity=R +[/card] +[card] +primitive=Disciple of the Ring +id=398583 +rarity=M +[/card] +[card] +primitive=Disperse +id=398528 +rarity=C +[/card] +[card] +primitive=Displacement Wave +id=398580 +rarity=R +[/card] +[card] +primitive=Dragon Fodder +id=398647 +rarity=C +[/card] +[card] +primitive=Dreadwaters +id=398405 +rarity=C +[/card] +[card] +primitive=Dwynen, Gilt-Leaf Daen +id=398546 +rarity=R +[/card] +[card] +primitive=Dwynen's Elite +id=398609 +rarity=U +[/card] +[card] +primitive=Elemental Bond +id=398406 +rarity=U +[/card] +[card] +primitive=Elvish Visionary +id=398554 +rarity=C +[/card] +[card] +primitive=Embermaw Hellion +id=398576 +rarity=R +[/card] +[card] +primitive=Enlightened Ascetic +id=398414 +rarity=C +[/card] +[card] +primitive=Enshrouding Mist +id=398654 +rarity=C +[/card] +[card] +primitive=Enthralling Victor +id=398493 +rarity=U +[/card] +[card] +primitive=Erebos's Titan +id=398584 +rarity=M +[/card] +[card] +primitive=Evolutionary Leap +id=398573 +rarity=R +[/card] +[card] +primitive=Evolving Wilds +id=398548 +rarity=C +[/card] +[card] +primitive=Exquisite Firecraft +id=398513 +rarity=R +[/card] +[card] +primitive=Eyeblight Assassin +id=398535 +rarity=C +[/card] +[card] +primitive=Eyeblight Massacre +id=398645 +rarity=U +[/card] +[card] +primitive=Faerie Miscreant +id=398459 +rarity=C +[/card] +[card] +primitive=Fetid Imp +id=398633 +rarity=C +[/card] +[card] +primitive=Fiery Conclusion +id=398497 +rarity=U +[/card] +[card] +primitive=Fiery Impulse +id=398516 +rarity=C +[/card] +[card] +primitive=Firefiend Elemental +id=398590 +rarity=C +[/card] +[card] +primitive=Flameshadow Conjuring +id=398547 +rarity=R +[/card] +[card] +primitive=Fleshbag Marauder +id=398625 +rarity=U +[/card] +[card] +primitive=Forest +id=398570 +rarity=C +[/card] +[card] +primitive=Foundry of the Consuls +id=398613 +rarity=U +[/card] +[card] +primitive=Gaea's Revenge +id=398501 +rarity=R +[/card] +[card] +primitive=Gather the Pack +id=398448 +rarity=U +[/card] +[card] +primitive=Ghirapur AEther Grid +id=398517 +rarity=U +[/card] +[card] +primitive=Ghirapur Gearcrafter +id=398681 +rarity=C +[/card] +[card] +primitive=Gideon, Battle-Forged +id=398429 +rarity=T +[/card] +[card] +primitive=Gideon's Phalanx +id=398471 +rarity=R +[/card] +[card] +primitive=Gilt-Leaf Winnower +id=398495 +rarity=R +[/card] +[card] +primitive=Gnarlroot Trapper +id=398413 +rarity=U +[/card] +[card] +primitive=Goblin Glory Chaser +id=398598 +rarity=U +[/card] +[card] +primitive=Goblin Piledriver +id=398537 +rarity=R +[/card] +[card] +primitive=Gold-Forged Sentinel +id=398585 +rarity=U +[/card] +[card] +primitive=Grasp of the Hieromancer +id=398558 +rarity=C +[/card] +[card] +primitive=Graveblade Marauder +id=398526 +rarity=R +[/card] +[card] +primitive=Guardian Automaton +id=398509 +rarity=C +[/card] +[card] +primitive=Guardians of Meletis +id=398553 +rarity=C +[/card] +[card] +primitive=Hallowed Moonlight +id=398505 +rarity=R +[/card] +[card] +primitive=Hangarback Walker +id=398572 +rarity=R +[/card] +[card] +primitive=Harbinger of the Tides +id=398569 +rarity=R +[/card] +[card] +primitive=Healing Hands +id=398563 +rarity=C +[/card] +[card] +primitive=Heavy Infantry +id=398408 +rarity=C +[/card] +[card] +primitive=Helm of the Gods +id=398588 +rarity=R +[/card] +[card] +primitive=Herald of the Pantheon +id=398460 +rarity=R +[/card] +[card] +primitive=Hitchclaw Recluse +id=398676 +rarity=C +[/card] +[card] +primitive=Hixus, Prison Warden +id=398611 +rarity=R +[/card] +[card] +primitive=Honored Hierarch +id=398450 +rarity=R +[/card] +[card] +primitive=Hydrolash +id=398666 +rarity=U +[/card] +[card] +primitive=Infectious Bloodlust +id=398582 +rarity=C +[/card] +[card] +primitive=Infernal Scarring +id=398638 +rarity=C +[/card] +[card] +primitive=Infinite Obliteration +id=398503 +rarity=R +[/card] +[card] +primitive=Iroas's Champion +id=398653 +rarity=U +[/card] +[card] +primitive=Island +id=398586 +rarity=C +[/card] +[card] +primitive=Jace, Telepath Unbound +id=398435 +rarity=T +[/card] +[card] +primitive=Jace, Vryn's Prodigy +id=398434 +rarity=M +[/card] +[card] +primitive=Jace's Sanctum +id=398614 +rarity=R +[/card] +[card] +primitive=Jayemdae Tome +id=398530 +rarity=U +[/card] +[card] +primitive=Jhessian Thief +id=398536 +rarity=U +[/card] +[card] +primitive=Joraga Invocation +id=398642 +rarity=U +[/card] +[card] +primitive=Knight of the Pilgrim's Road +id=398420 +rarity=C +[/card] +[card] +primitive=Knight of the White Orchid +id=398594 +rarity=R +[/card] +[card] +primitive=Knightly Valor +id=398622 +rarity=U +[/card] +[card] +primitive=Kothophed, Soul Hoarder +id=398443 +rarity=R +[/card] +[card] +primitive=Kytheon, Hero of Akros +id=398428 +rarity=M +[/card] +[card] +primitive=Kytheon's Irregulars +id=398561 +rarity=R +[/card] +[card] +primitive=Kytheon's Tactics +id=398470 +rarity=C +[/card] +[card] +primitive=Languish +id=398597 +rarity=R +[/card] +[card] +primitive=Leaf Gilder +id=398634 +rarity=C +[/card] +[card] +primitive=Lightning Javelin +id=398538 +rarity=C +[/card] +[card] +primitive=Liliana, Defiant Necromancer +id=398442 +rarity=T +[/card] +[card] +primitive=Liliana, Heretical Healer +id=398441 +rarity=M +[/card] +[card] +primitive=Llanowar Empath +id=398482 +rarity=C +[/card] +[card] +primitive=Llanowar Wastes +id=398589 +rarity=R +[/card] +[card] +primitive=Macabre Waltz +id=398494 +rarity=C +[/card] +[card] +primitive=Mage-Ring Bully +id=398426 +rarity=C +[/card] +[card] +primitive=Mage-Ring Network +id=398533 +rarity=U +[/card] +[card] +primitive=Mage-Ring Responder +id=398620 +rarity=R +[/card] +[card] +primitive=Magmatic Insight +id=398496 +rarity=U +[/card] +[card] +primitive=Malakir Cullblade +id=398556 +rarity=U +[/card] +[card] +primitive=Managorger Hydra +id=398456 +rarity=R +[/card] +[card] +primitive=Mantle of Webs +id=398577 +rarity=C +[/card] +[card] +primitive=Maritime Guard +id=398670 +rarity=C +[/card] +[card] +primitive=Meteorite +id=398499 +rarity=U +[/card] +[card] +primitive=Might of the Masses +id=398662 +rarity=C +[/card] +[card] +primitive=Mighty Leap +id=398630 +rarity=C +[/card] +[card] +primitive=Mizzium Meddler +id=398596 +rarity=R +[/card] +[card] +primitive=Molten Vortex +id=398649 +rarity=R +[/card] +[card] +primitive=Mountain +id=398510 +rarity=C +[/card] +[card] +primitive=Murder Investigation +id=398641 +rarity=U +[/card] +[card] +primitive=Nantuko Husk +id=398440 +rarity=C +[/card] +[card] +primitive=Necromantic Summons +id=398491 +rarity=U +[/card] +[card] +primitive=Negate +id=398629 +rarity=C +[/card] +[card] +primitive=Nightsnare +id=398562 +rarity=C +[/card] +[card] +primitive=Nissa, Sage Animist +id=398432 +rarity=T +[/card] +[card] +primitive=Nissa, Vastwood Seer +id=398438 +rarity=M +[/card] +[card] +primitive=Nissa's Pilgrimage +id=398593 +rarity=C +[/card] +[card] +primitive=Nissa's Revelation +id=398506 +rarity=R +[/card] +[card] +primitive=Nivix Barrier +id=398465 +rarity=C +[/card] +[card] +primitive=Orbs of Warding +id=398551 +rarity=R +[/card] +[card] +primitive=Orchard Spirit +id=398644 +rarity=C +[/card] +[card] +primitive=Outland Colossus +id=398668 +rarity=R +[/card] +[card] +primitive=Patron of the Valiant +id=398631 +rarity=U +[/card] +[card] +primitive=Pharika's Disciple +id=398531 +rarity=C +[/card] +[card] +primitive=Pia and Kiran Nalaar +id=398453 +rarity=R +[/card] +[card] +primitive=Plains +id=398675 +rarity=C +[/card] +[card] +primitive=Possessed Skaab +id=398657 +rarity=U +[/card] +[card] +primitive=Prickleboar +id=398449 +rarity=C +[/card] +[card] +primitive=Priest of the Blood Rite +id=398639 +rarity=R +[/card] +[card] +primitive=Prism Ring +id=398646 +rarity=U +[/card] +[card] +primitive=Psychic Rebuttal +id=398479 +rarity=U +[/card] +[card] +primitive=Pyromancer's Goggles +id=398427 +rarity=M +[/card] +[card] +primitive=Rabid Bloodsucker +id=398557 +rarity=C +[/card] +[card] +primitive=Ramroller +id=398467 +rarity=U +[/card] +[card] +primitive=Ravaging Blaze +id=398601 +rarity=U +[/card] +[card] +primitive=Read the Bones +id=398637 +rarity=C +[/card] +[card] +primitive=Reave Soul +id=398591 +rarity=C +[/card] +[card] +primitive=Reclaim +id=398543 +rarity=C +[/card] +[card] +primitive=Reclusive Artificer +id=398521 +rarity=U +[/card] +[card] +primitive=Relic Seeker +id=398476 +rarity=R +[/card] +[card] +primitive=Returned Centaur +id=398468 +rarity=C +[/card] +[card] +primitive=Revenant +id=398575 +rarity=U +[/card] +[card] +primitive=Rhox Maulers +id=398663 +rarity=C +[/card] +[card] +primitive=Ringwarden Owl +id=398464 +rarity=C +[/card] +[card] +primitive=Rogue's Passage +id=398523 +rarity=U +[/card] +[card] +primitive=Runed Servitor +id=398643 +rarity=U +[/card] +[card] +primitive=Scab-Clan Berserker +id=398461 +rarity=R +[/card] +[card] +primitive=Scrapskin Drake +id=398478 +rarity=C +[/card] +[card] +primitive=Screeching Skaab +id=398487 +rarity=C +[/card] +[card] +primitive=Seismic Elemental +id=398579 +rarity=U +[/card] +[card] +primitive=Send to Sleep +id=398545 +rarity=C +[/card] +[card] +primitive=Sentinel of the Eternal Watch +id=398659 +rarity=U +[/card] +[card] +primitive=Separatist Voidmage +id=398608 +rarity=C +[/card] +[card] +primitive=Shadows of the Past +id=398522 +rarity=U +[/card] +[card] +primitive=Shaman of the Pack +id=398489 +rarity=U +[/card] +[card] +primitive=Shambling Ghoul +id=398552 +rarity=C +[/card] +[card] +primitive=Shivan Reef +id=398444 +rarity=R +[/card] +[card] +primitive=Sigil of the Empty Throne +id=398524 +rarity=R +[/card] +[card] +primitive=Sigil of Valor +id=398515 +rarity=U +[/card] +[card] +primitive=Sigiled Starfish +id=398592 +rarity=U +[/card] +[card] +primitive=Skaab Goliath +id=398559 +rarity=U +[/card] +[card] +primitive=Skyraker Giant +id=398430 +rarity=U +[/card] +[card] +primitive=Skysnare Spider +id=398650 +rarity=U +[/card] +[card] +primitive=Smash to Smithereens +id=398669 +rarity=C +[/card] +[card] +primitive=Somberwald Alpha +id=398626 +rarity=U +[/card] +[card] +primitive=Soulblade Djinn +id=398485 +rarity=R +[/card] +[card] +primitive=Sphinx's Tutelage +id=398520 +rarity=U +[/card] +[card] +primitive=Stalwart Aven +id=398624 +rarity=C +[/card] +[card] +primitive=Starfield of Nyx +id=398475 +rarity=M +[/card] +[card] +primitive=Stratus Walk +id=398549 +rarity=C +[/card] +[card] +primitive=Subterranean Scout +id=398458 +rarity=C +[/card] +[card] +primitive=Suppression Bonds +id=398602 +rarity=C +[/card] +[card] +primitive=Swamp +id=398555 +rarity=C +[/card] +[card] +primitive=Swift Reckoning +id=398481 +rarity=U +[/card] +[card] +primitive=Sword of the Animist +id=398492 +rarity=R +[/card] +[card] +primitive=Sylvan Messenger +id=398651 +rarity=U +[/card] +[card] +primitive=Tainted Remedy +id=398612 +rarity=R +[/card] +[card] +primitive=Talent of the Telepath +id=398483 +rarity=R +[/card] +[card] +primitive=The Great Aurora +id=398679 +rarity=M +[/card] +[card] +primitive=Thopter Engineer +id=398514 +rarity=U +[/card] +[card] +primitive=Thopter Spy Network +id=398519 +rarity=R +[/card] +[card] +primitive=Thornbow Archer +id=398407 +rarity=C +[/card] +[card] +primitive=Throwing Knife +id=398595 +rarity=U +[/card] +[card] +primitive=Thunderclap Wyvern +id=398655 +rarity=U +[/card] +[card] +primitive=Timberpack Wolf +id=398445 +rarity=C +[/card] +[card] +primitive=Titanic Growth +id=398648 +rarity=C +[/card] +[card] +primitive=Titan's Strength +id=398680 +rarity=C +[/card] +[card] +primitive=Topan Freeblade +id=398619 +rarity=C +[/card] +[card] +primitive=Tormented Thoughts +id=398623 +rarity=U +[/card] +[card] +primitive=Totem-Guide Hartebeest +id=398599 +rarity=U +[/card] +[card] +primitive=Touch of Moonglove +id=398600 +rarity=C +[/card] +[card] +primitive=Tower Geist +id=398615 +rarity=U +[/card] +[card] +primitive=Tragic Arrogance +id=398610 +rarity=R +[/card] +[card] +primitive=Turn to Frog +id=398463 +rarity=U +[/card] +[card] +primitive=Undead Servant +id=398484 +rarity=C +[/card] +[card] +primitive=Undercity Troll +id=398568 +rarity=U +[/card] +[card] +primitive=Unholy Hunger +id=398452 +rarity=C +[/card] +[card] +primitive=Valeron Wardens +id=398447 +rarity=U +[/card] +[card] +primitive=Valor in Akros +id=398529 +rarity=U +[/card] +[card] +primitive=Vastwood Gorger +id=398469 +rarity=C +[/card] +[card] +primitive=Veteran's Sidearm +id=398498 +rarity=C +[/card] +[card] +primitive=Vine Snare +id=398658 +rarity=C +[/card] +[card] +primitive=Volcanic Rambler +id=398636 +rarity=C +[/card] +[card] +primitive=Vryn Wingmare +id=398567 +rarity=R +[/card] +[card] +primitive=War Horn +id=398673 +rarity=U +[/card] +[card] +primitive=War Oracle +id=398621 +rarity=U +[/card] +[card] +primitive=Watercourser +id=398540 +rarity=C +[/card] +[card] +primitive=Weight of the Underworld +id=398544 +rarity=C +[/card] +[card] +primitive=Whirler Rogue +id=398410 +rarity=U +[/card] +[card] +primitive=Wild Instincts +id=398508 +rarity=C +[/card] +[card] +primitive=Willbreaker +id=398502 +rarity=R +[/card] +[card] +primitive=Woodland Bellower +id=398511 +rarity=M +[/card] +[card] +primitive=Yavimaya Coast +id=398566 +rarity=R +[/card] +[card] +primitive=Yeva's Forcemage +id=398424 +rarity=C +[/card] +[card] +primitive=Yoked Ox +id=398671 +rarity=C +[/card] +[card] +primitive=Zendikar Incarnate +id=398661 +rarity=U +[/card] +[card] +primitive=Zendikar's Roil +id=398518 +rarity=U +[/card] +[card] +primitive=Forest +id=398421 +rarity=C +[/card] +[card] +primitive=Forest +id=398454 +rarity=C +[/card] +[card] +primitive=Forest +id=398617 +rarity=C +[/card] +[card] +primitive=Island +id=398431 +rarity=C +[/card] +[card] +primitive=Island +id=398477 +rarity=C +[/card] +[card] +primitive=Island +id=398664 +rarity=C +[/card] +[card] +primitive=Mountain +id=398412 +rarity=C +[/card] +[card] +primitive=Mountain +id=398425 +rarity=C +[/card] +[card] +primitive=Mountain +id=398490 +rarity=C +[/card] +[card] +primitive=Plains +id=398534 +rarity=C +[/card] +[card] +primitive=Plains +id=398541 +rarity=C +[/card] +[card] +primitive=Plains +id=398550 +rarity=C +[/card] +[card] +primitive=Swamp +id=398472 +rarity=C +[/card] +[card] +primitive=Swamp +id=398507 +rarity=C +[/card] +[card] +primitive=Swamp +id=398677 +rarity=C +[/card] + diff --git a/projects/mtg/bin/Res/sets/primitives/borderline.txt b/projects/mtg/bin/Res/sets/primitives/borderline.txt index fb52b39fb..9d8f5a066 100644 --- a/projects/mtg/bin/Res/sets/primitives/borderline.txt +++ b/projects/mtg/bin/Res/sets/primitives/borderline.txt @@ -1,5 +1,16 @@ grade=borderline [card] +name=Arrogant Wurm +abilities=trample,madness +autoexile=restriction{discarded} pay({2}{G}) name(pay 2G to cast) activate name(pay 2G to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard) +text=Trample -- Madness {2}{G} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) +mana={3}{G}{G} +type=Creature +subtype=Wurm +power=4 +toughness=4 +[/card] +[card] name=Autumn Willow abilities=opponentshroud,shroud auto={G}:-shroud @@ -24,6 +35,50 @@ power=2 toughness=2 [/card] [card] +name=Basking Rootwalla +abilities=madness +autoexile=restriction{discarded} pay({0}) name(pay 0 to cast) activate name(pay 0 to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard) +auto={1}{G}:2/2 limit:1 +text={1}{G}: Basking Rootwalla gets +2/+2 until end of turn. Activate this ability only once each turn. -- Madness {0} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) +mana={G} +type=Creature +subtype=Lizard +power=1 +toughness=1 +[/card] +[card] +name=Big Game Hunter +abilities=madness +autoexile=restriction{discarded} pay({B}) name(pay B to cast) activate name(pay B to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard) +auto=bury target(creature[power>=4]) +text=When Big Game Hunter enters the battlefield, destroy target creature with power 4 or greater. It can't be regenerated. -- Madness {B} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) +mana={1}{B}{B} +type=Creature +subtype=Human Rebel Assassin +power=1 +toughness=1 +[/card] +[card] +name=Call to the Netherworld +abilities=madness +autoexile=restriction{discarded} pay({0}) name(pay 0 to cast) activate name(pay 0 to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard) +target=creature[black]|myGraveyard +auto=moveTo(myHand) +text=Return target black creature card from your graveyard to your hand. -- Madness {0} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) +mana={B} +type=Sorcery +[/card] +[card] +name=Cemetery Puca +text=Whenever a creature is put into a graveyard from the battlefield, you may pay {1}. If you do, Cemetery Puca becomes a copy of that creature and gains this ability. +auto=@movedto(creature|graveyard) from(battlefield):all(trigger[from]) pay[[{1}]] copy +mana={1}{UB}{UB} +type=Creature +subtype=Shapeshifter +power=1 +toughness=2 +[/card] +[card] name=Cinder Seer auto={2}{r}{t}:target(creature,Player) damage:type:*[red]:myhand text={2}{R}, {T}: Reveal any number of red cards in your hand. Cinder Seer deals X damage to target creature or player, where X is the number of cards revealed this way. @@ -44,6 +99,59 @@ mana={1}{B}{G} type=Instant [/card] [card] +name=Cryptoplasm +auto=@each my upkeep:may copy target(other creature|battlefield) +text=At the beginning of your upkeep, you may have Cryptoplasm become a copy of another target creature. If you do, Cryptoplasm gains this ability. +mana={1}{U}{U} +type=Creature +subtype=Shapeshifter +power=2 +toughness=2 +[/card] +[card] +name=Dark Withering +abilities=madness +autoexile=restriction{discarded} pay({B}) name(pay B to cast) activate name(pay B to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard) +target=creature[-black] +auto=destroy +text=Destroy target nonblack creature. -- Madness {B} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) +mana={4}{B}{B} +type=Instant +[/card] +[card] +name=Dimir Doppelganger +auto={1}{U}{B}:target(creature|graveyard) moveto(exile) and!(copy)! +text={1}{U}{B}: Exile target creature card from a graveyard. Dimir Doppelganger becomes a copy of that card and gains this ability. +mana={1}{U}{B} +type=Creature +subtype=Shapeshifter +power=0 +toughness=2 +[/card] +[card] +name=Distortion Strike +target=creature +auto=1/0 +auto=unblockable +auto=if rebound then transforms((,newability[moveto(exile)],newability[phaseaction[my upkeep once checkex] activate may activate castcard(restricted)])) +mana={U} +type=Sorcery +text=Target creature gets +1/+0 until end of turn and is unblockable this turn. 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=Emerge Unscathed +target=creature|mybattlefield +auto=choice name(green) transforms((,newability[protection from green])) ueot +auto=choice name(red) transforms((,newability[protection from red])) ueot +auto=choice name(blue) transforms((,newability[protection from blue])) ueot +auto=choice name(black) transforms((,newability[protection from black])) ueot +auto=choice name(white) transforms((,newability[protection from white])) ueot +auto=if rebound then transforms((,newability[moveto(exile)],newability[phaseaction[my upkeep once checkex] activate may activate castcard(restricted)])) +mana={W} +type=Instant +text=Target creature you control gains protection from the color of your choice until end of turn. 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=Feral Hydra type=Creature subtype=Hydra Beast @@ -56,6 +164,26 @@ auto={3}:counter(1/1) #Not all player can use ability [/card] [card] +name=Fiery Temper +abilities=madness +autoexile=restriction{discarded} pay({R}) name(pay R to cast) activate name(pay R to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard) +target=creature,player +auto=damage:3 +text=Fiery Temper deals 3 damage to target creature or player. -- Madness {R} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) +mana={1}{R}{R} +type=Instant +[/card] +[card] +name=Frantic Purification +abilities=madness +autoexile=restriction{discarded} pay({W}) name(pay W to cast) activate name(pay W to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard) +target=enchantment +auto=destroy +text=Destroy target enchantment. -- Madness {W} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) +mana={2}{W} +type=Instant +[/card] +[card] name=Ghastly Remains auto=foreach(zombie|myhand) counter(1/1,1) autograveyard={B}{B}{B}:moveTo(myhand) myUpkeepOnly @@ -77,6 +205,18 @@ power=4 toughness=4 [/card] [card] +name=Gorgon Recluse +abilities=madness +autoexile=restriction{discarded} pay({B}{B}) name(pay BB to cast) activate name(pay BB to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard) +auto=@combat(blocked,blocking) source(this) from(creature):all(trigger[from]) phaseaction[combatends once] destroy +text=Whenever Gorgon Recluse blocks or becomes blocked by a nonblack creature, destroy that creature at end of combat. -- Madness {B}{B} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) +mana={3}{B}{B} +type=Creature +subtype=Gorgon +power=2 +toughness=4 +[/card] +[card] name=Govern the Guildless target=creature[-multicolor] auto=moveto(mybattlefield) @@ -86,15 +226,15 @@ mana={5}{U} type=Sorcery [/card] [card] -name=Gravecrawler -abilities=cantblock -autograveyard=aslongas(zombie|myBattlefield) {B}:name(cast from graveyard) activate name(cast from graveyard) castcard(normal) assorcery -text=Gravecrawler can't block. -- You may cast Gravecrawler from your graveyard as long as you control a Zombie. -mana={B} -type=Creature -subtype=Zombie -power=2 -toughness=1 +name=Ichor Slick +abilities=madness +autoexile=restriction{discarded} pay({3}{B}) name(pay 3B to cast) activate name(pay 3B to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard) +target=creature +auto=-3/-3 +autohand=__CYCLING__({2}) +text=Target creature gets -3/-3 until end of turn. -- Cycling {2} ({2}, Discard this card: Draw a card.) -- Madness {3}{B} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) +mana={2}{B} +type=Sorcery [/card] [card] name=Ivy Seer @@ -160,6 +300,23 @@ power=1 toughness=1 [/card] [card] +name=Nomads' Assembly +auto=token(Kor Soldier,Creature Kor Soldier,1/1,white)*type:creature:mybattlefield +auto=if rebound then transforms((,newability[moveto(exile)],newability[phaseaction[my upkeep once checkex] activate may activate castcard(restricted)])) +mana={4}{W}{W} +type=Sorcery +text=Put a 1/1 white Kor Soldier creature token onto the battlefield for each creature you control. 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=Obsessive Search +abilities=madness +autoexile=restriction{discarded} pay({U}) name(pay U to cast) activate name(pay U to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard) +auto=draw:1 controller +text=Draw a card. -- Madness {U} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) +mana={U} +type=Instant +[/card] +[card] name=Ogre Marauder text=Whenever Ogre Marauder attacks, it gains "Ogre Marauder can't be blocked" until end of turn unless defending player sacrifices a creature. auto=@combat(attacking) source(this):ability$!name(choose one) if type(creature|mybattlefield)~morethan~0 then choice sacrifice notatarget(creature|mybattlefield) _ choice all(mystored) unblockable ueot!$ opponent @@ -170,6 +327,24 @@ power=3 toughness=1 [/card] [card] +name=Prey's Vengeance +target=creature +auto=2/2 +auto=if rebound then transforms((,newability[moveto(exile)],newability[phaseaction[my upkeep once checkex] activate may activate castcard(restricted)])) +mana={G} +type=Instant +text=Target creature gets +2/+2 until end of turn. 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=Psychotic Haze +abilities=madness +autoexile=restriction{discarded} pay({1}{B}) name(pay 1B to cast) activate name(pay 1B to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard) +auto=damage:1 all(creature,player) +text=Psychotic Haze deals 1 damage to each creature and each player. -- Madness {1}{B} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) +mana={2}{B}{B} +type=Instant +[/card] +[card] name=Rakdos Augermage abilities=first strike auto={T}:name(target opponent) target(opponent) donothing && all(this) transforms((,newability[ability$!name(discard) reject notatarget(*|opponenthand)!$ targetedplayer && ability$!name(discard) reject notatarget(*|opponenthand)!$ controller])) assorcery @@ -189,6 +364,26 @@ mana={X}{X}{U} type=Sorcery [/card] [card] +name=Reckless Wurm +abilities=trample,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=Trample -- Madness {2}{R} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) +mana={3}{R}{R} +type=Creature +subtype=Wurm +power=4 +toughness=4 +[/card] +[card] +name=Recurring Insight +target=opponent +auto=draw:type:*:targetedpersonshand controller +auto=if rebound then transforms((,newability[moveto(exile)],newability[phaseaction[my upkeep once checkex] activate may activate castcard(restricted)])) +mana={4}{U}{U} +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=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. @@ -247,6 +442,83 @@ mana={G}{W} type=Instant [/card] [card] +name=Staggershock +target=creature,player +auto=damage:2 +auto=if rebound then transforms((,newability[moveto(exile)],newability[phaseaction[my upkeep once checkex] activate may activate castcard(restricted)])) +mana={2}{R} +type=Instant +text=Staggershock deals 2 damage to target creature or player. 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=Strength of Isolation +abilities=madness +autoexile=restriction{discarded} pay({W}) name(pay W to cast) activate name(pay W to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard) +target=creature +auto=1/2 +auto=protection from black +text=Enchant creature -- Enchanted creature gets +1/+2 and has protection from black. -- Madness {W} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) +mana={1}{W} +type=Enchantment +subtype=Aura +[/card] +[card] +name=Strength of Lunacy +abilities=madness +autoexile=restriction{discarded} pay({B}) name(pay B to cast) activate name(pay B to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard) +target=creature +auto=2/1 +auto=protection from white +text=Enchant creature -- Enchanted creature gets +2/+1 and has protection from white. -- Madness {B} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) +mana={1}{B} +type=Enchantment +subtype=Aura +[/card] +[card] +name=Surreal Memoir +auto=moverandom(instant) from(mygraveyard) to(myhand) +auto=if rebound then transforms((,newability[moveto(exile)],newability[phaseaction[my upkeep once checkex] activate may activate castcard(restricted)])) +mana={3}{R} +type=Sorcery +text=Return an instant card at random from your graveyard to your 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=Survival Cache +auto=life:2 controller +auto=if compare(lifetotal)~morethan~compare(opponentlifetotal) then draw:1 controller +auto=if rebound then transforms((,newability[moveto(exile)],newability[phaseaction[my upkeep once checkex] activate may activate castcard(restricted)])) +mana={2}{W} +type=Sorcery +text=You gain 2 life. Then if you have more life than an opponent, draw a card. 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=Thespian's Stage +auto={T}:Add{1} +auto={2}{T}:copy target(land|battlefield) +text={T}: Add {1} to your mana pool. -- {2}, {T}: Thespian's Stage becomes a copy of target land and gains this ability. +type=Land +[/card] +[card] +name=Unstable Shapeshifter +auto=@movedto(other creature|battlefield):all(trigger[from]) copy +text=Whenever another creature enters the battlefield, Unstable Shapeshifter becomes a copy of that creature and gains this ability. +mana={3}{U} +type=Creature +subtype=Shapeshifter +power=0 +toughness=1 +[/card] +[card] +name=Virulent Swipe +target=creature +auto=2/0 +auto=deathtouch +auto=if rebound then transforms((,newability[moveto(exile)],newability[phaseaction[my upkeep once checkex] activate may activate castcard(restricted)])) +mana={B} +type=Instant +text=Target creature gets +2/+0 and gains deathtouch until end of turn. 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=Zombie Brute abilities=trample auto=foreach(zombie|myhand) counter(1/1,1) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index e07e2a87f..5b042f5fc 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -2,7 +2,7 @@ #Please keep these card alphabetized, and try to have the "name=" line at the top of each card [card] name=Aeon Chronicler -auto=phandcount/phandcount nonstatic +anyzone=phandcount/phandcount cdaactive autoexile=@counterremoved(0/0,1,Time) from(sourcecard) suspended:draw:1 suspend(0)={X}{3}{U} text=Aeon Chronicler's power and toughness are each equal to the number of cards in your hand. -- Suspend X - {X}{3}{U}. X can't be 0. (Rather than cast this card from your hand, you may pay {X}{3}{U} and exile it with X time counters on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost. It has haste.) -- Whenever a time counter is removed from Aeon Chronicler while it's exiled, draw a card. @@ -223,7 +223,7 @@ type=Land [card] name=Abattoir Ghoul abilities=first strike -auto=@vampired(creature) from(this):all(trigger[to]) life:toughness controller +auto=@vampired(creature) from(this):all(trigger[to]) dynamicability text=First strike -- Whenever a creature dealt damage by Abattoir Ghoul this turn dies, you gain life equal to that creature's toughness. mana={3}{B} type=Creature @@ -282,6 +282,18 @@ mana={1}{W} type=Instant [/card] [card] +name=Abhorrent Overlord +abilities=flying +auto=token(Harpy,creature harpy, 1/1,black,flying)*type:manaB +auto=@each my upkeep:sacrifice notatarget(creature|myBattlefield) +text=Flying. -- When Abhorrent Overlord enters the battlefield, put a number of 1/1 black Harpy creature tokens with flying onto the battlefield equal to your devotion to black. (Each {B} in the mana costs of permanents you control counts toward your devotion to black.) -- At the beginning of your upkeep, sacrifice a creature. +mana={5}{B}{B} +type=Creature +subtype=Demon +power=6 +toughness=6 +[/card] +[card] name=Abjure target=*|stack auto=fizzle @@ -309,6 +321,19 @@ power=2 toughness=6 [/card] [card] +name=Abomination of Gudul +abilities=flying +facedown={3} +autofacedown={2}{B}{G}{U}:morph +auto=@combatdamaged(player) from(this):may name(draw & discard) ability$!draw:1 _ choice notatarget(*|myhand) reject)!$ controller +text=Flying. -- Whenever Abomination of Gudul deals combat damage to a player, you may draw a card. If you do, discard a card. -- Morph {2}{B}{G}{U}: (You may cast this card face down as a 2/2 creature for 3. Turn it face up any time for its morph cost.) +mana={3}{B}{G}{U} +type=Creature +subtype=Horror +power=3 +toughness=4 +[/card] +[card] name=Aboroth auto=cumulativeupcost[{C(-1/-1.1}] sacrifice text=Cumulative upkeep - Put a -1/-1 counter on Aboroth. (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.) @@ -475,8 +500,8 @@ toughness=6 [card] name=Abyssal Specter abilities=flying -auto=@damaged(controller) from(this):ability$!name(discard) target(*|myhand) reject!$ controller -auto=@damaged(opponent) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@damageof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ controller +auto=@damagefoeof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent text=Flying -- Whenever Abyssal Specter deals damage to a player, that player discards a card. mana={2}{B}{B} type=Creature @@ -485,6 +510,129 @@ power=2 toughness=3 [/card] [card] +name=Abzan Advantage +target=player +auto=ability$!name(sacrifice enchantment) notatarget(enchantment|myBattlefield) sacrifice!$ targetedplayer +auto=ability$!name(Bolster) notatarget(creature[toughness=toughness:lowest:creature:mybattlefield]|mybattlefield) counter(1/1,1)!$ controller +text=Target player sacrifices an enchantment. -- Bolster 1. (Choose a creature with the least toughness among creatures you control and put a +1/+1 counter on it.) +mana={1}{W} +type=Instant +[/card] +[card] +name=Abzan Ascendancy +auto=all(creature|mybattlefield) counter(1/1,1) +auto=@movedto(creature[-token]|graveyard) from(mybattlefield):token(Spirit,Creature Spirit,1/1,white flying) controller +text=When Abzan Ascendancy enters the battlefield, put a +1/+1 counter on each creature you control. -- Whenever a nontoken creature you control dies, put a 1/1 white Spirit creature token with flying onto the battlefield. +mana={W}{B}{G} +type=Enchantment +[/card] +[card] +name=Abzan Banner +auto={T}: Add{W} +auto={T}: Add{B} +auto={T}: Add{G} +auto={W}{B}{G}{T}{S}:draw:1 controller +text={T}: Add {W},{B} or {G} to your mana pool. -- {W}{B}{G}, {T}, Sacrifice Abzan Banner: Draw a card. +mana={3} +type=Artifact +[/card] +[card] +name=Abzan Battle Priest +auto={W}{T}:counter(1/1,1) asSorcery +auto=lord(creature[counter{1/1.1}]|mybattlefield) lifelink +text=Outlast {W} ({W},{T}: Put a +1/+1 counter on this creature. Outlast only as a sorcery.) -- Each creature you control with a +1/+1 counter on it has first strike. +mana={3}{W} +type=Creature +subtype=Human Cleric +power=3 +toughness=2 +[/card] +[card] +name=Abzan Beastmaster +auto=@each my upkeep restriction{type(creature[toughness=toughness:highest:creature:Battlefield]|myBattlefield)~morethan~0}:draw:1 controller +text=At the beginning of your upkeep, draw a card if you control the creature with the greatest toughness or tied for the greatest toughness. +mana={2}{G} +type=Creature +subtype=Hound Shaman +power=2 +toughness=1 +[/card] +[card] +name=Abzan Charm +auto=choice name(Exile power 3 or more) moveTo(exile) target(creature[power>=3]|battlefield) +auto=choice name(Draw 2 cards lose 2 life) draw:2 controller && life:-2 controller +auto=choice name(2 counters on 1 creature) counter(1/1,2) target(creature) +auto=if type(creature|battlefield)~morethan~1 then choice name(1 counter on 2 creatures) counter(1/1,1) target(<2>creature) +text=Choose one: -- Exile target creature with power 3 or greater. -- You draw two cards and you lose 2 life. -- Distribute two +1/+1 counters among one or two target creatures. +mana={W}{B}{G} +type=Instant +[/card] +[card] +name=Abzan Falconer +auto={W}{T}:counter(1/1,1) asSorcery +auto=lord(creature[counter{1/1.1}]|myBattlefield) flying +text=Outlast {W} ({W}, {T}: Put a +1/+1 counter on this creature. Outlast only as a sorcery.) -- Each creature you control with a +1/+1 counter on it has flying. +mana={2}{W} +type=Creature +subtype=Human Soldier +power=2 +toughness=3 +[/card] +[card] +name=Abzan Guide +abilities=lifelink +facedown={3} +autofacedown={2}{W}{B}{G}:morph +text=Lifelink (Damage dealt by this creature also causes you to gain that much life.) -- Morph {2}{W}{B}{G} (You may cast this card face down as a 2/2 creature for 3. Turn it face up any time for its morph cost.) +mana={3}{W}{B}{G} +type=Creature +subtype=Human Warrior +power=4 +toughness=4 +[/card] +[card] +name=Abzan Kin-Guard +auto=aslongas(*[white;black]|mybattlefield) lifelink +text=Abzan Kin-Guard has lifelink as long as you control a white or black permanent. +mana={3}{G} +type=Creature +subtype=Human Warrior +power=3 +toughness=3 +[/card] +[card] +name=Abzan Runemark +target=creature +auto=2/2 +auto=aslongas(*[black;green]|mybattlefield):teach(creature) vigilance +text=Enchant creature. -- Enchanted creature gets +2/+2. -- Enchanted creature has vigilance as long as you control a black or green permanent. +mana={2}{W} +type=Enchantment +subtype=Aura +[/card] +[card] +name=Abzan Skycaptain +abilities=flying +auto=@movedTo(this|graveyard) from(battlefield):ability$!name(Bolster) notatarget(creature[toughness=toughness:lowest:creature:mybattlefield]|mybattlefield) counter(1/1,2)!$ controller +text=Flying. -- When Abzan Skycaptain dies, bolster 2. (Choose a creature with the least toughness among creatures you control and put two +1/+1 counters on it.) +mana={3}{W} +type=Creature +subtype=Bird Soldier +power=2 +toughness=2 +[/card] +[card] +name=Academy Raider +abilities=intimidate +auto=@combatdamaged(player) from(this):if type(*|myhand)~morethan~0 then ability$!may reject notatarget(*|myhand) and!(draw:1)! !$ controller +text=Intimidate. -- Whenever Academy Raider deals combat damage to a player, you may discard a card. If you do, draw a card. +mana={2}{R} +type=Creature +subtype=Human Warrior +power=1 +toughness=1 +[/card] +[card] name=Academy Rector auto=@movedTo(this|graveyard) from(battlefield):may all(trigger[to]) moveto(exile) && target(enchantment|mylibrary) moveTo(mybattlefield) text=When Academy Rector dies, you may exile it. If you do, search your library for an enchantment card, put that card onto the battlefield, then shuffle your library. @@ -575,6 +723,16 @@ power=2 toughness=2 [/card] [card] +name=Accursed Spirit +abilities=intimidate +text=Intimidate. +mana={3}{B} +type=Creature +subtype=Spirit +power=3 +toughness=2 +[/card] +[card] name=Acid Rain auto=destroy all(forest) text=Destroy all Forests. @@ -593,6 +751,20 @@ power=3 toughness=5 [/card] [card] +name=Acid-Spewer Dragon +abilities=flying,deathtouch +facedown={3} +autofacedown={5}{B}{B}:morph +autofaceup=counter(1/1,1) +autofaceup=counter(1/1,1) all(other creature[dragon]|mybattlefield) +text=Flying, deathtouch -- Megamorph {5}{B}{B} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) -- When Acid-Spewer Dragon is turned face up, put a +1/+1 counter on each other Dragon creature you control. +mana={5}{B} +type=Creature +subtype=Dragon +power=3 +toughness=3 +[/card] +[card] name=Acidic Slime abilities=deathtouch auto=destroy target(artifact,enchantment,land) @@ -622,6 +794,17 @@ mana={2}{R} type=Sorcery [/card] [card] +name=Acolyte of the Inferno +auto=this(cantargetcard(*[-renown]) transforms((,newability[@combatdamaged(player) from(this):counter(1/1) && becomes(renown) forever])) +auto=@combat(blocked) source(this) from(creature):all(trigger[from]) damage:2 +text=Renown 1 (When this creature deals combat damage to a player, if it isn't renowned, put a +1/+1 counter on it and it becomes renowned.) -- Whenever Acolyte of the Inferno becomes blocked by a creature, it deals 2 damage to that creature. +mana={2}{R} +type=Creature +subtype=Human Monk +power=3 +toughness=1 +[/card] +[card] name=Acolyte of Xathrid auto={1}{B}{T}:life:-1 target(player) text={1}{B}, {T}: Target player loses 1 life. @@ -695,7 +878,7 @@ type=Instant [/card] [card] name=Adamaro, First to Desire -auto=foreach(*|opponenthand) 1/1 +anyzone=type:*:opponenthand/type:*:opponenthand cdaactive text=Adamaro, First to Desire's power and toughness are each equal to the number of cards in the hand of the opponent with the most cards in hand. mana={1}{R}{R} type=Legendary Creature @@ -821,6 +1004,16 @@ mana={1}{G}{G}{W} type=Instant [/card] [card] +name=Advocate of the Beast +auto=@each my endofturn:target(creature[Beast]|mybattlefield) counter(1/1,1) +text=At the beginning of your end step, put a +1/+1 counter on target Beast creature you control. +mana={2}{G} +type=Creature +subtype=Elf Shaman +power=2 +toughness=3 +[/card] +[card] name=Aegis Angel abilities=flying auto=target(other *) transforms((,indestructible)) @@ -832,6 +1025,16 @@ power=5 toughness=5 [/card] [card] +name=Aegis of the Gods +abilities=playershroud +text=You have hexproof. (You can't be the target of spells or abilities your opponents control.) +mana={1}{W} +type=Enchantment Creature +subtype=Human Soldier +power=2 +toughness=1 +[/card] +[card] name=Aegis of the Meek auto={1}{T}:target(creature[power=1;toughness=1]) 1/2 ueot text={1}, {T}: Target 1/1 creature gets +1/+2 until end of turn. @@ -864,6 +1067,19 @@ mana={2}{G} type=Instant [/card] [card] +name=Aerie Bowmasters +abilities=reach +facedown={3} +autofacedown={5}{G}:morph +autofaceup=counter(1/1,1) +text=Reach (This creature can block creatures with flying.) -- Megamorph {5}{G} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) +mana={2}{G}{G} +type=Creature +subtype=Hound Archer +power=3 +toughness=4 +[/card] +[card] name=Aerie Mystics abilities=flying auto={1}{G}{U}:lord(creature|myBattlefield) shroud ueot @@ -896,6 +1112,16 @@ power=2 toughness=4 [/card] [card] +name=Aeronaut Tinkerer +auto=aslongas(artifact|myBattlefield) flying +text=Aeronaut Tinkerer has flying as long as you control an artifact.(It can't be blocked except by creatures flying or reach.) +mana={2}{U} +type=Creature +subtype=Human Artificer +power=2 +toughness=3 +[/card] +[card] name=Aesthir Glider abilities=flying,cantblock text=Flying -- Aesthir Glider can't block. @@ -963,7 +1189,7 @@ toughness=2 [/card] [card] name=Ageless Entity -auto=@lifed(controller):all(trigger[to]) dynamicability +auto=@lifeof(player):all(trigger[to]) dynamicability text=Whenever you gain life, put that many +1/+1 counters on Ageless Entity. mana={3}{G}{G} type=Creature @@ -984,6 +1210,38 @@ power=4 toughness=4 [/card] [card] +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. +mana={3}{B} +type=Enchantment Creature +subtype=Zombie +power=2 +toughness=2 +[/card] +[card] +name=Agent of the Fates +abilities=deathtouch +auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):ability$!name(sacrifice) notatarget(creature|mybattlefield) sacrifice !$ opponent +text=Deathtouch. -- Heroic - Whenever you cast a spell that targets Agent of the Fates, each opponent sacrifices a creature. +mana={1}{B}{B} +type=Creature +subtype=Human Assassin +power=3 +toughness=2 +[/card] +[card] +name=Agent of Horizons +auto={2}{U}:unblockable ueot +text={2}{U}: Agent of Horizons can't be blocked this turn. +mana={2}{G} +type=Creature +subtype=Human Rogue +power=3 +toughness=2 +[/card] +[card] name=Agent of Masks auto=@each my upkeep:life:-1 opponent auto=@each my upkeep:life:1 controller @@ -1015,6 +1273,14 @@ power=1 toughness=1 [/card] [card] +name=Aggressive Mining +auto=maxPlay(land)-99 controller +auto={S(land|mybattlefield):draw:2 controller limit:1 +text=You can't play lands. -- Sacrifice a land: Draw two cards. Activate this ability only once each turn. +mana={3}{R} +type=Enchantment +[/card] +[card] name=Aggressive Urge target=creature auto=1/1 @@ -1099,6 +1365,63 @@ power=3 toughness=3 [/card] [card] +name=Ainok Artillerist +auto=this(counter{1/1.1}>0) reach +text=Ainok Artillerist has reach as long as it has a +1/+1 counter on it. (It can block creatures with flying.) +mana={2}{G} +type=Creature +subtype=Hound Archer +power=4 +toughness=1 +[/card] +[card] +name=Ainok Bond-Kin +auto={1}{W}{T}:counter(1/1,1) asSorcery +auto=lord(creature[counter{1/1.1}]|mybattlefield) first strike +text=Outlast {1}{W} ({1}{W}, {T}: Put a +1/+1 counter on this creature. Outlast only as a sorcery.) -- Each creature you control with a +1/+1 counter on it has first strike. +mana={1}{W} +type=Creature +subtype=Hound Soldier +power=2 +toughness=1 +[/card] +[card] +name=Ainok Guide +auto=choice name(+1/+1 counter) counter(1/1,1) +auto=choice name(search for a land) moveTo(ownerlibrary) notatarget(land[basic]|mylibrary) +text=When Ainok Guide enters the battlefield, choose one: -- Put a +1/+1 counter on Ainok Guide. -- Search your library for a basic land card, reveal it, then shuffle your library and put that card on top of it. +mana={1}{G} +type=Creature +subtype=Hound Scout +power=1 +toughness=1 +[/card] +[card] +name=Ainok Survivalist +facedown={3} +autofacedown={1}{G}:morph +autofaceup=counter(1/1,1) +autofaceup=destroy target(*[artifact;enchantment]|opponentbattlefield) +text=Megamorph {1}{G} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) -- When Ainok Survivalist is turned face up, destroy target artifact or enchantment an opponent controls. +mana={1}{G} +type=Creature +subtype=Hound Shaman +power=2 +toughness=1 +[/card] +[card] +name=Ainok Tracker +abilities=first strike +facedown={3} +autofacedown={4}{R}:morph +text=First strike -- Morph {4}{R} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) +mana={5}{R} +type=Creature +subtype=Hound Scout +power=3 +toughness=3 +[/card] +[card] name=Air Bladder target=creature auto=flying @@ -1170,7 +1493,7 @@ subtype=Ajani [/card] [card] name=Avatar Token -auto=thisforeach(controllerlife) 1/1 +anyzone=lifetotal/lifetotal cdaactive type=Creature subtype=Avatar power=* @@ -1208,7 +1531,7 @@ type=Enchantment [/card] [card] name=Ajani's Pridemate -auto=@lifed(controller):may counter(1/1,1) +auto=@lifeof(player):may counter(1/1,1) text=Whenever you gain life, you may put a +1/+1 counter on Ajani's Pridemate. mana={1}{W} type=Creature @@ -1301,7 +1624,8 @@ toughness=1 [/card] [card] name=Akki Underminer -auto=@combatdamaged(player) from(this):choice name(player sacrifices) ability$!name(sacrifice) notatarget(*|mybattlefield) sacrifice!$ opponent +auto=@combatdamagefoeof(player) from(this):ability$!name(sacrifice) notatarget(*|mybattlefield) sacrifice!$ opponent +auto=@combatdamageof(player) from(this):ability$!name(sacrifice) notatarget(*|mybattlefield) sacrifice!$ controller text=Whenever Akki Underminer deals combat damage to a player, that player sacrifices a permanent. mana={3}{R} type=Creature @@ -1313,7 +1637,7 @@ toughness=1 name=Akoum Battlesinger abilities=haste auto=may lord(ally|myBattlefield) 1/0 ueot -auto=@movedTo(other ally|myBattlefield):may all(ally|myBattlefield) 1/0 ueot +auto=@movedTo(other ally|myBattlefield):may lord(ally|myBattlefield) 1/0 ueot text=Haste -- Whenever Akoum Battlesinger or another Ally enters the battlefield under your control, you may have Ally creatures you control get +1/+0 until end of turn. mana={1}{R} type=Creature @@ -1351,6 +1675,79 @@ power=1 toughness=1 [/card] [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. +mana={4}{R} +type=Creature +subtype=Human Shaman +power=3 +toughness=2 +[/card] +[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. +mana={R} +type=Creature +subtype=Human Soldier +power=1 +toughness=1 +[/card] +[card] +name=Akroan Hoplite +auto=@combat(attacking) source(this):foreach(creature[attacking]|myBattlefield) 1/0 ueot +text=Whenever Akroan Hoplite attacks, it gets +X/+0 until end of turn, where X is the number of attacking creatures you control. +mana={W}{R} +type=Creature +subtype=Human Soldier +power=1 +toughness=2 +[/card] +[card] +name=Akroan Horse +abilities=defender +auto=moveto(opponentBattlefield) +auto=@each my upkeep:token(Soldier,Creature Soldier,1/1,white) opponent +text=Defender. -- When Akroan Horse enters the battlefield, an opponent gains control of it. -- At the beginning of your upkeep, each opponent puts a 1/1 white Soldier creature token onto the battlefield. +mana={4} +type=Artifact Creature +subtype=Horse +power=0 +toughness=4 +[/card] +[card] +name=Akroan Jailer +auto={2}{W}{T}:target(creature) tap +text=2W, Tap: Tap target creature. +mana={W} +type=Creature +subtype=Human Soldier +power=1 +toughness=1 +[/card] +[card] +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. +mana={2}{R} +type=Creature +subtype=Human Warrior +power=2 +toughness=1 +[/card] +[card] +name=Akroan Mastiff +auto={W}{T}:tap target(creature) +text={W},{T}: Tap target creature. +mana={3}{W} +type=Creature +subtype=Hound +power=2 +toughness=2 +[/card] +[card] name=Akroan Phalanx abilities=vigilance auto={2}{R}:all(creature|mybattlefield) 1/0 ueot @@ -1362,6 +1759,17 @@ power=3 toughness=3 [/card] [card] +name=Akroan Sergeant +abilities=first strike +auto=this(cantargetcard(*[-renown]) transforms((,newability[@combatdamaged(player) from(this):counter(1/1) && becomes(renown) forever])) +text=First strike (This creature deals combat damage before creatures without first strike.) -- Renown 1 (When this creature deals combat damage to a player, if it isn't renowned, put a +1/+1 counter on it and it becomes renowned.) +mana={2}{R} +type=Creature +subtype=Human Soldier +power=2 +toughness=2 +[/card] +[card] name=Akroan Skyguard abilities=flying auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):counter(1/1,1) @@ -1489,8 +1897,18 @@ power=4 toughness=4 [/card] [card] +name=Alabaster Kirin +abilities=flying,vigilance +text=Flying, vigilance +mana={3}{W} +type=Creature +subtype=Kirin +power=2 +toughness=3 +[/card] +[card] name=Alabaster Leech -auto=lord(*[white]|myhand) altercost(white, +1) +auto=lord(*[white]|myhand,mylibrary,mygraveyard,myexile) altercost(white, +1) text=White spells you cast cost {W} more to cast. mana={W} type=Creature @@ -1586,13 +2004,6 @@ power=1 toughness=1 [/card] [card] -name=Aladdin's Lamp -alias=1092 -text={X}, {T}: The next time you would draw a card this turn, instead look at the top X cards of your library, put all but one of them on the bottom of your library in a random order, then draw a card. X can't be 0. -mana={10} -type=Artifact -[/card] -[card] name=Aladdin's Ring auto={8}{T}:damage:4 target(creature,player) text={8}, {T}: Aladdin's Ring deals 4 damage to target creature or player. @@ -1637,6 +2048,14 @@ text={T}: Add {1} to your mana pool. -- {G}{U}, {T}: You may cast nonland cards type=Land [/card] [card] +name=Alchemist's Vial +auto=choice draw:1 controller +auto={1}{T}{S}:target(creature) transforms((,newability[cantattack ueot],newability[cantblock ueot])) ueot +text=When Alchemist's Vial enters the battlefield, draw a card. -- 1, Tap, Sacrifice Alchemist's Vial: Target creature can't attack or block this turn. +mana={2} +type=Artifact +[/card] +[card] name=Alchor's Tomb auto={2}{T}:activatechooseacolor target(*|mybattlefield) becomes(,chosencolor) activatechooseend text={2}, {T}: Target permanent you control becomes the color of your choice. (This effect lasts indefinitely.) @@ -1663,6 +2082,28 @@ power=2 toughness=2 [/card] [card] +name=Alesha, Who Smiles at Death +abilities=first strike +auto=@combat(attacking) source(this) restriction{type(creature[power<=2]|mygraveyard)~morethan~0}:pay({WB}{WB}) target(creature[power<=2]|mygraveyard) ninjutsu +text=First strike -- Whenever Alesha, Who Smiles at Death attacks, you may pay [W/B][W/B]. If you do, return target creature card with power 2 or less from your graveyard to the battlefield tapped and attacking. +mana={2}{R} +type=Legendary Creature +subtype=Human Warrior +power=3 +toughness=2 +[/card] +[card] +name=Alesha's Vanguard +other={2}{B} name(Dash) +auto=if paid(alternative) then transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveto(ownerhand) all(this)])) forever +text=Dash {2}{B} (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} +type=Creature +subtype=Orc Warrior +power=3 +toughness=3 +[/card] +[card] name=Alexi, Zephyr Mage auto={X}{U}{T}{discard(*|myhand)}{discard(*|myhand)}:name(X = 0) donothing auto={1}{U}{T}{discard(*|myhand)}{discard(*|myhand)}:name(X = 1) target(creature) moveTo(ownerhand) @@ -1721,7 +2162,7 @@ toughness=1 [/card] [card] name=Ali from Cairo -auto=@damaged(controller) restriction{compare(lifetotal)~lessthan~1}:this(controllerlife < 1) lifeset:1 controller +auto=this(controllerlife >= 1) transforms((,newability[reduceto:1])) text=Damage that would reduce your life total to less than 1 reduces it to 1 instead. mana={2}{R}{R} type=Creature @@ -1887,9 +2328,30 @@ power=6 toughness=5 [/card] [card] +name=Alpine Grizzly +text= +mana={2}{G} +type=Creature +subtype=Bear +power=4 +toughness=2 +[/card] +[card] +name=Altac Bloodseeker +auto=@movedTo(creature|graveyard) from(opponentbattlefield):2/0 ueot +auto=@movedTo(creature|graveyard) from(opponentbattlefield):first strike ueot +auto=@movedTo(creature|graveyard) from(opponentbattlefield):haste ueot +text=Whenever a creature an opponent controls dies, Altac Bloodseeker gets +2/+0 and gains first strike and haste until end of turn. (It deals combat damage before creatures without first strike, and it can attack and {T} as soon as it comes under your control.) +mana={1}{R} +type=Creature +subtype=Human Berserker +power=2 +toughness=1 +[/card] +[card] name=Altar Golem abilities=trample,doesnotuntap -auto=foreach(creature|battlefield) 1/1 +anyzone=type:creature:battlefield/type:creature:battlefield cdaactive auto={T(creature|myBattlefield)}{T(creature|myBattlefield)}{T(creature|myBattlefield)}{T(creature|myBattlefield)}{T(creature|myBattlefield)}:untap text=Trample -- Altar Golem's power and toughness are each equal to the number of creatures on the battlefield. -- Altar Golem doesn't untap during your untap step. -- Tap five untapped creatures you control: Untap Altar Golem. mana={7} @@ -1921,6 +2383,13 @@ mana={7} type=Artifact [/card] [card] +name=Altar of the Brood +auto=@movedTo(other *|myBattlefield):deplete:1 opponent +text=Whenever another permanent enters the battlefield under your control, each opponent puts the top card of his or her library into his or her graveyard. +mana={1} +type=Artifact +[/card] +[card] name=Altar's Light target=artifact,enchantment auto=moveTo(exile) @@ -1936,6 +2405,14 @@ mana={1}{B}{S(creature|mybattlefield)} type=Instant [/card] [card] +name=Aluren +auto=lord(creature[manacost<=3]|hand,exile,graveyard) zerocast forcedalive +auto=lord(creature[manacost<=3]|hand,exile,graveyard) spellmastery forcedalive +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 +[/card] +[card] name=Amass the Components auto=draw:3 controller auto=bottomoflibrary notatarget(*|myhand) @@ -1972,6 +2449,19 @@ mana={3}{B} type=Sorcery [/card] [card] +name=Ambuscade Shaman +other={3}{B} name(Dash) +auto=if paid(alternative) then transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveto(ownerhand) all(this)])) forever +auto=2/2 ueot +auto=@movedto(other creature|mybattlefield):all(trigger) 2/2 ueot +text=Whenever Ambuscade Shaman or another creature enters the battlefield under your control, that creature gets +2/+2 until end of turn. -- Dash {3}{B} (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={2}{B} +type=Creature +subtype=Orc Shaman +power=2 +toughness=2 +[/card] +[card] name=Ambush auto=lord(creature[blocking]) first strike text=Blocking creatures gain first strike until end of turn. @@ -1990,6 +2480,17 @@ power=2 toughness=2 [/card] [card] +name=Ambush Krotiq +abilities=trample +auto=moveTo(ownerhand) notatarget(other creature|myBattlefield) +text=Trample -- When Ambush Krotiq enters the battlefield, return another creature you control to its owner's hand. +mana={5}{G} +type=Creature +subtype=Insect +power=5 +toughness=5 +[/card] +[card] name=Ambush Party abilities=first strike,haste text=First strike, haste @@ -2037,6 +2538,26 @@ power=2 toughness=4 [/card] [card] +name=Amphin Pathmage +auto={2}{U}:unblockable target(creature) ueot +text={2}{U}: Target creature can't be blocked this turn. +mana={3}{U} +type=Creature +subtype=Salamander Wizard +power=3 +toughness=2 +[/card] +[card] +name=Ampryn Tactician +auto=choice all(creature|mybattlefield) 1/1 ueot +text=When Ampryn Tactician enters the battlefield, creatures you control get +1/+1 until end of turn. +mana={2}{W}{W} +type=Creature +subtype=Human Soldier +power=3 +toughness=3 +[/card] +[card] name=Amoeboid Changeling abilities=changeling auto={T}:transforms((allsubtypes)) target(creature) ueot @@ -2214,6 +2735,27 @@ power=3 toughness=3 [/card] [card] +name=Anafenza, Kin-Tree Spirit +auto=@movedTo(other creature[-token]|mybattlefield):ability$!name(Bolster) counter(1/1,1) notatarget(creature[toughness=toughness:lowest:creature:battlefield]|mybattlefield)!$ controller +text=Whenever another nontoken creature enters the battlefield under your control, bolster 1. (Choose a creature with the least toughness among creatures you control and put a +1/+1 counter on it.) +mana={W}{W} +type=Legendary Creature +subtype=Spirit Soldier +power=2 +toughness=2 +[/card] +[card] +name=Anafenza, the Foremost +abilities=oppgcreatureexiler +auto=@combat(attacking) source(this):counter(1/1,1) target(other creature[tapped]|mybattlefield) +text=When Anafenza, the Foremost attacks, put a +1/+1 counter on another target tapped creature you control. -- If a creature card would be put into an opponent's graveyard from anywhere, exile it instead. +mana={W}{B}{G} +type=Legendary Creature +subtype=Human Soldier +power=4 +toughness=4 +[/card] +[card] name=Anarchist auto=may moveTo(myhand) target(sorcery|mygraveyard) text=When Anarchist enters the battlefield, you may return target sorcery card from your graveyard to your hand. @@ -2242,6 +2784,18 @@ power=2 toughness=2 [/card] [card] +name=Anax and Cymede +abilities=first strike,vigilance +auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):all(creature|myBattlefield) 1/1 ueot +auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):all(creature|mybattlefield) trample ueot +text=Heroic - Whenever you cast a spell that targets Anax and Cymede, creatures you control get +1/+1 and gain trample until end of turn. +mana={1}{R}{W} +type=Legendary Creature +subtype=Human Soldier +power=3 +toughness=2 +[/card] +[card] name=Ancestor's Chosen abilities=first strike auto=life:type:*:mygraveyard @@ -2290,6 +2844,16 @@ mana={U} type=Instant [/card] [card] +name=Ancestral Statue +auto=moveto(ownerhand) notatarget(*[-land]|mybattlefield) +text=When Ancestral Statue enters the battlefield, return a nonland permanent you control to its owner's hand. +mana={4} +type=Artifact Creature +subtype=Golem +power=3 +toughness=4 +[/card] +[card] name=Ancestral Tribute auto=life:twicetype:*:mygraveyard flashback={9}{W}{W}{W} @@ -2298,6 +2862,16 @@ mana={5}{W}{W} type=Sorcery [/card] [card] +name=Ancestral Vengeance +target=creature +auto=-1/-1 +auto=counter(1/1,1) target(creature|mybattlefield) +text=When Ancestral Vengeance enters the battlefield, put a +1/+1 counter on target creature you control. -- Enchanted creature gets -1/-1. +mana={B}{B} +type=Enchantment +subtype=Aura +[/card] +[card] name=Ancient Amphitheater auto=tap auto=aslongas(giant|myHand) untap @@ -2307,6 +2881,15 @@ text=As Ancient Amphitheater enters the battlefield, you may reveal a Giant card type=Land [/card] [card] +name=Ancient Carp +text=null +mana={4}{U} +type=Creature +subtype=Fish +power=2 +toughness=5 +[/card] +[card] name=Ancient Craving auto=draw:3 auto=life:-3 @@ -2362,22 +2945,7 @@ toughness=3 [/card] [card] name=Ancient Ooze -auto=foreach(other creature[manacost=1]|mybattlefield) 1/1 -auto=foreach(other creature[manacost=2]|mybattlefield) 2/2 -auto=foreach(other creature[manacost=3]|mybattlefield) 3/3 -auto=foreach(other creature[manacost=4]|mybattlefield) 4/4 -auto=foreach(other creature[manacost=5]|mybattlefield) 5/5 -auto=foreach(other creature[manacost=6]|mybattlefield) 6/6 -auto=foreach(other creature[manacost=7]|mybattlefield) 7/7 -auto=foreach(other creature[manacost=8]|mybattlefield) 8/8 -auto=foreach(other creature[manacost=9]|mybattlefield) 9/9 -auto=foreach(other creature[manacost=10]|mybattlefield) 10/10 -auto=foreach(other creature[manacost=11]|mybattlefield) 11/11 -auto=foreach(other creature[manacost=12]|mybattlefield) 12/12 -auto=foreach(other creature[manacost=13]|mybattlefield) 13/13 -auto=foreach(other creature[manacost=14]|mybattlefield) 14/14 -auto=foreach(other creature[manacost=15]|mybattlefield) 15/15 -auto=foreach(other creature[manacost=16]|mybattlefield) 16/16 +anyzone=pancientooze/pancientooze cdaactive text=Ancient Ooze's power and toughness are each equal to the total converted mana cost of other creatures you control. mana={5}{G}{G} type=Creature @@ -2429,7 +2997,7 @@ type=Land [/card] [card] name=Andradite Leech -auto=lord(*[black]|myhand) altercost(black,+1) +auto=lord(*[black]|myhand,mylibrary,mygraveyard,myexile) altercost(black,+1) auto={B}:1/1 text=Black spells you cast cost {B} more to cast. -- {B}: Andradite Leech gets +1/+1 until end of turn. mana={2}{B} @@ -2567,7 +3135,7 @@ toughness=3 [/card] [card] name=Angelheart Vial -auto=@damaged(controller):may counter(0/0,thatmuch,Charge) +auto=@damageof(player):may counter(0/0,thatmuch,Charge) auto={2}{T}{C(0/0,-4,Charge)}:life:2 && draw:1 controller text=Whenever you're dealt damage, you may put that many charge counters on Angelheart Vial. -- {2}, {T}, Remove four charge counters from Angelheart Vial: You gain 2 life and draw a card. mana={5} @@ -2760,6 +3328,14 @@ power=2 toughness=2 [/card] [card] +name=Anger of the Gods +auto=all(creature[-protection from red]) exiledeath +auto=damage:3 all(creature) +text=Anger of the Gods deals 3 damage to each creature. If a creature dealt damage this way would die this turn, exile it instead. +mana={1}{R}{R} +type=Sorcery +[/card] +[card] name=Angry Mob abilities=trample auto=phaseaction[my untap] type:swamp:opponentbattlefield/type:swamp:opponentbattlefield ueot nonstatic @@ -2799,7 +3375,7 @@ subtype=Aura name=Animar, Soul of Elements abilities=protection from white,protection from black auto=@movedTo(creature|mystack):counter(1/1,1) -auto=thisforeach(counter{1/1,1}) lord(creature|myhand) altercost(colorless, -1) +auto=thisforeach(counter{1/1,1}) lord(creature|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) text=Protection from white and from black -- Whenever you cast a creature spell, put a +1/+1 counter on Animar, Soul of Elements. -- Creature spells you cast cost 1 less to cast for each +1/+1 counter on Animar. mana={U}{R}{G} type=Legendary Creature @@ -2851,6 +3427,17 @@ mana={2} type=Artifact [/card] [card] +name=Ankle Shanker +abilities=haste +auto=@combat(attacking) source(this):all(creature|mybattlefield) transforms((newability[first strike ueot],newability[deathtouch ueot])) ueot +text=Haste -- Whenever Ankle Shanker attacks, creatures you control gain first strike and deathtouch until end of turn. +mana={2}{R}{W}{B} +type=Creature +subtype=Goblin Berserker +power=2 +toughness=2 +[/card] +[card] name=Annex target=Land alias=1194 @@ -2905,6 +3492,16 @@ mana={W} type=Instant [/card] [card] +name=Anointer of Champions +auto={T}:target(creature[attacking]) 1/1 ueot +text=Tap: Target attacking creature gets +1/+1 until end of turn. +mana={W} +type=Creature +subtype=Human Cleric +power=1 +toughness=1 +[/card] +[card] name=Ant Queen auto={1}{G}:token(Insect,Creature Insect, 1/1,green) text={1}{G}: Put a 1/1 green Insect creature token onto the battlefield. @@ -2923,6 +3520,16 @@ mana={3}{R} type=Enchantment [/card] [card] +name=Anthousa, Setessan Hero +auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):target(land) transforms((Creature Warrior,setpower=2,settoughness=2)) ueot +text=Heroic - Whenever you cast a spell that targets Anthoussa, Setessan Hero, up to three target lands you control each become 2/2 Warrior creatures until end of turn. They're still lands. +mana={3}{G}{G} +type=Legendary Creature +subtype=Human Warrior +power=4 +toughness=5 +[/card] +[card] name=Anthroplasm auto=counter(1/1,2) auto={X}{T}:+0/+1 all(this) && removeallcounters(1/1) && counter(1/1,X) && -0/-1 all(this) @@ -2996,6 +3603,16 @@ mana={2} type=Artifact [/card] [card] +name=Anvilwrought Raptor +abilities=flying,first strike +text=Flying, first strike +mana={4} +type=Artifact Creature +subtype=Bird +power=2 +toughness=1 +[/card] +[card] name=Apathy target=creature auto=teach(creature) doesnotuntap @@ -3258,6 +3875,39 @@ power=5 toughness=5 [/card] [card] +name=Arashin Cleric +auto=life:3 +text=When Arashin Cleric enters the battlefield, you gain 3 life. +mana={1}{W} +type=Creature +subtype=Human Cleric +power=1 +toughness=3 +[/card] +[card] +name=Arashin Foremost +abilities=double strike +auto=target(other creature[warrior]|mybattlefield) double strike ueot +auto=@combat(attacking) source(this):target(other creature[warrior]|mybattlefield) double strike ueot +text=Double strike -- Whenever Arashin Foremost enters the battlefield or attacks, another target Warrior creature you control gains double strike until end of turn. +mana={1}{W}{W} +type=Creature +subtype=Human Warrior +power=2 +toughness=2 +[/card] +[card] +name=Arashin Sovereign +abilities=flying +auto=@movedto(this|graveyard) from(mybattlefield):may name(put on top or bottom) transforms((,newability[choice name(Top of Library) moveto(ownerlibrary) ],newability[choice bottomoflibrary])) forever +text=Flying -- When Arashin Sovereign dies, you may put it on the top or bottom of its owner's library. +mana={5}{G}{W} +type=Creature +subtype=Dragon +power=6 +toughness=6 +[/card] +[card] name=Arbalest Elite auto={2}{W}{T}:damage:3 target(creature[attacking;blocking]) && all(this) frozen text={2}{W}, {T}: Arbalest Elite deals 3 damage to target attacking or blocking creature. Arbalest Elite doesn't untap during your next untap step. @@ -3279,6 +3929,17 @@ power=5 toughness=5 [/card] [card] +name=Arbor Colossus +abilities=reach +auto=this(cantargetcard(*[-monstrous]) {3}{G}{G}{G}:becomes(monstrous) forever && counter(1/1,3) && transforms((,newAbility[destroy target(creature[flying]|opponentbattlefield)])) forever +text=Reach -- {3}{G}{G}{G}: Monstrosity 3. (If this creature isn't monstrous, put three +1/+1 counters on it and it becomes monstrous.) -- When Arbor Colossus becomes monstrous, destroy target creature with flying an opponent controls +mana={2}{G}{G}{G} +type=Creature +subtype=Giant +power=6 +toughness=6 +[/card] +[card] name=Arbor Elf auto={t}:untap target(forest) text={T}: Untap target Forest. @@ -3318,7 +3979,7 @@ type=Sorcery [/card] [card] name=Arc Mage -auto={2}{R}{T}:token(-1111113) && damage:1 target(creature,player) +auto={2}{R}{T}{discard(*|myhand)}:damage:1 target(creature,player) && activate damage:1 target(creature,player) text={2}{R}, {T}, Discard a card: Arc Mage deals 2 damage divided as you choose among one or two target creatures and/or players. mana={2}{R} type=Creature @@ -3327,14 +3988,6 @@ power=2 toughness=2 [/card] [card] -name=Arc Mage's 2nd Damage -auto=counter(0/0,1,Arc Mage) -auto=@damaged(creature,player):thisforeach(counter{0/0.1.Arc Mage}>0) damage:1 target(creature,player) && counter(0/0,-1,Arc Mage) && counter(0/0,1,Bury) -auto=thisforeach(counter{0/0.1.Bury}>0) bury -id=-1111113 -type=Nothing -[/card] -[card] name=Arc Runner abilities=haste,treason text=Haste -- At the beginning of the end step, sacrifice Arc Runner. @@ -3385,8 +4038,8 @@ type=Enchantment [/card] [card] name=Arcane Melee -auto=lord(instant|hand) altercost(colorless,-2) -auto=lord(sorcery|hand) altercost(colorless,-2) +auto=lord(instant|hand,library,graveyard,exile) altercost(colorless,-2) +auto=lord(sorcery|hand,library,graveyard,exile) altercost(colorless,-2) text=Instant and sorcery spells cost {2} less to cast. mana={4}{U} type=Enchantment @@ -3430,6 +4083,13 @@ power=3 toughness=4 [/card] [card] +name=Arcbond +auto=target(creature) transforms((,newability[@damaged(this):damage:thatmuch all(other creature|battlefield)],newability[@damaged(this):damage:thatmuch all(player)])) ueot +text=Choose target creature. Whenever that creature is dealt damage this turn, it deals that much damage to each other creature and each player. +mana={2}{R} +type=Instant +[/card] +[card] name=Arcbound Bruiser auto=counter(1/1,3) auto=@movedTo(this|mygraveyard) from(myBattlefield):may thisforeach(counter{1/1.1}) counter(1/1,1) target(creature[artifact]) @@ -3518,7 +4178,7 @@ toughness=0 [card] name=Arcbound Slith auto=counter(1/1,1) -auto=@combatdamaged(opponent) from(this):counter(1/1,1) +auto=@combatdamaged(player) from(this):counter(1/1,1) auto=@movedTo(this|mygraveyard) from(myBattlefield):may thisforeach(counter{1/1.1}) counter(1/1,1) target(creature[artifact]) text=Whenever Arcbound Slith deals combat damage to a player, put a +1/+1 counter on it. -- Modular 1 (This enters the battlefield with a +1/+1 counter on it. When it's put into a graveyard, you may put its +1/+1 counters on target artifact creature.) mana={2} @@ -3594,6 +4254,29 @@ power=5 toughness=5 [/card] [card] +name=Archangel of Thune +abilities=flying,lifelink +auto=@lifeof(player):all(creature|mybattlefield) counter(1/1,1) +text=Flying. -- Lifelink. -- Whenever you gain life, put a +1/+1 counter on each creature you control. +mana={3}{W}{W} +type=Creature +subtype=Angel +power=3 +toughness=4 +[/card] +[card] +name=Archangel of Tithes +abilities=flying +auto=this(untapped) lord(creature|opponentbattlefield) transforms((,newability[@each mycombatbegins:pay[[{1}]] name(pay 1 mana) donothing?cantattack all(this)])) +auto=@combat(attacking) source(this):all(creature|opponentbattlefield) transforms((,newability[pay[[{1}]] name(pay 1 mana) donothing?cantblock all(this)])) +text=Flying -- As long as Archangel of Tithes is untapped, creatures can't attack you or a planeswalker you control unless their controller pays {1} for each of those creatures. -- As long as Archangel of Tithes is attacking, creatures can't block unless their controller pays {1} for each of those creatures. +mana={1}{W}{W}{W} +type=Creature +subtype=Angel +power=3 +toughness=5 +[/card] +[card] name=Archangel's Light auto=life:twicetype:*:mygraveyard auto=moveto(myLibrary) all(*|myGraveyard) && shuffle @@ -3614,6 +4297,27 @@ power=6 toughness=6 [/card] [card] +name=Archers of Qarsi +abilities=defender,reach +text=Defender -- Reach (This creature can block creatures with flying.) +mana={3}{G} +type=Creature +subtype=Naga Archer +power=5 +toughness=2 +[/card] +[card] +name=Archers' Parapet +abilities=defender +auto={1}{B}{T}:life:-1 opponent +text=Defender -- {1}{B}, {T}: Each opponent loses 1 life. +mana={1}{G} +type=Creature +subtype=Wall +power=0 +toughness=5 +[/card] +[card] name=Archery Training target=creature auto=@each my upkeep:may counter(0/0,1,Archery) all(this) @@ -3880,6 +4584,16 @@ power=1 toughness=2 [/card] [card] +name=Arena Athlete +auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):cantblock target(creature|opponentbattlefield) ueot +text=Heroic - Whenever you cast a spell that targets Arena Athlete, target creature an opponent controls can't block this turn. +mana={1}{R} +type=Creature +subtype=Human +power=2 +toughness=1 +[/card] +[card] name=Arena of the Ancients auto=lord(creature[legendary]) doesnotuntap auto=tap all(creature[legendary]) @@ -4029,7 +4743,7 @@ type=Artifact [card] name=Arm with AEther text=Until end of turn, creatures you control gain "Whenever this creature deals damage to an opponent, you may return target creature that player controls to its owner's hand." -auto=all(creature|mybattlefield) transforms((,newability[@damaged(opponent) from(this) once:may moveto(ownerhand) target(creature|opponentbattlefield)])) ueot +auto=all(creature|mybattlefield) transforms((,newability[@damagefoeof(player) from(this) once:may moveto(ownerhand) target(creature|opponentbattlefield)])) ueot mana={2}{U} type=Sorcery [/card] @@ -4070,6 +4784,17 @@ mana={6} type=Artifact [/card] [card] +name=Armament Corps +auto=choice name(one creature) counter(1/1,2) target(creature|mybattlefield) +auto=if type(creature|mybattlefield)~morethan~1 then choice name(2 creatures) counter(1/1.1) target(<2>creature|mybattlefield) +text=When Armament Corps enters the battlefield, distribute two +1/+1 counters among one or two target creatures you control. +mana={2}{W}{B}{G} +type=Creature +subtype=Human Soldier +power=4 +toughness=4 +[/card] +[card] name=Armament Master auto=this(gear=1) lord(other creature[kor]|myBattlefield) 2/2 auto=this(gear=2) lord(other creature[kor]|myBattlefield) 4/4 @@ -4089,6 +4814,16 @@ power=2 toughness=2 [/card] [card] +name=Armament of Nyx +target=Creature +auto=teach(-enchantment) preventalldamage from(this) +auto=teach(enchantment) double strike +text=Enchant creature -- Enchanted creature has double strike as long as it's an enchantment. Otherwise, prevent all damage that would be dealt by enchanted creature. (A creature with double strike deals both first-strike and regular combat damage.) +mana={2}{W} +type=Enchantment +subtype=Aura +[/card] +[card] name=Armed Response target=creature[attacking] auto=damage:type:equipment:mybattlefield @@ -4263,6 +4998,15 @@ power=2 toughness=5 [/card] [card] +name=Armory of Iroas +auto={2}:equip +auto=@combat(attacking) source(mytgt):counter(1/1,1) +text=Whenever equipped creature attacks, put a +1/+1 counter on it. -- Equip {2} +mana={2} +type=Artifact +subtype=Equipment +[/card] +[card] name=Arms Dealer auto={1}{R}{S(goblin|myBattlefield)}:Damage:4 target(creature) text={1}{R}, Sacrifice a Goblin: Arms Dealer deals 4 damage to target creature. @@ -4391,6 +5135,23 @@ type=Enchantment subtype=Aura [/card] [card] +name=Artificer's Epiphany +auto=draw:2 +auto=if type(artifact|mybattlefield)~lessthan~1 then reject notatarget(*|myhand) +text=Draw two cards. If you control no artifacts, discard a card. +mana={2}{U} +type=Instant +[/card] +[card] +name=Artificer's Hex +target=equipment +auto=@each my upkeep:transforms((,newability[destroy all(parents)])) ueot +text=Enchant Equipment. -- At the beginning of your upkeep, if enchanted Equipment is attached to a creature, destroy that creature. +mana={B} +type=Enchantment +subtype=Aura +[/card] +[card] name=Artificer's Intuition auto={U}{discard(artifact|myhand)}:moveTo(myhand) target(artifact[manacost<=1]|mylibrary) text={U}, Discard an artifact card: Search your library for an artifact card with converted mana cost 1 or less, reveal that card, and put it into your hand. Then shuffle your library. @@ -4519,6 +5280,18 @@ mana={2}{B}{B} type=Sorcery [/card] [card] +name=Ashen Rider +abilities=flying +auto=moveTo(exile) target(*|battlefield) +autograveyard=@movedTo(this|graveyard) from(mybattlefield):moveTo(exile) target(*|battlefield) +text=Flying -- When Ashen Rider enters the battlefield or dies, exile target permanent. +mana={4}{W}{W}{B}{B} +type=Creature +subtype=Archon +power=5 +toughness=5 +[/card] +[card] name=Ashenmoor Cohort auto=aslongas(other creature[black]|myBattlefield) 1/1 != 0 text=Ashenmoor Cohort gets +1/+1 as long as you control another black creature. @@ -4589,7 +5362,8 @@ toughness=3 [/card] [card] name=Ashling, the Extinguisher -auto=@combatdamaged(opponent) from(this):target(creature|opponentbattlefield) sacrifice +auto=@combatdamagefoeof(player) from(this):target(creature|opponentbattlefield) sacrifice +auto=@combatdamageof(player) from(this):target(creature|mybattlefield) sacrifice text=Whenever Ashling, the Extinguisher deals combat damage to a player, choose target creature that player controls. He or she sacrifices that creature. mana={2}{B}{B} type=Legendary Creature @@ -4643,6 +5417,16 @@ power=2 toughness=3 [/card] [card] +name=Aspect of Gorgon +target=creature +auto=teach(creature) deathtouch +auto=teach(creature) 1/3 +text=Enchant creature -- Enchanted creature gets +1/+3 and has deathtouch. (Any amount of damage it deals to a creature is enough to destroy it.) +mana={2}{B} +type=Enchantment +subtype=Aura +[/card] +[card] name=Aspect of Hydra target=creature auto=type:manag:mybattlefield/type:manag:mybattlefield ueot @@ -4670,6 +5454,16 @@ type=Enchantment subtype=Aura [/card] [card] +name=Asphodel Wanderer +auto={2}{B}:regenerate +text={2}{B}: Regenerate Asphodel Wanderer. +mana={B} +type=Creature +subtype=Skeleton Soldier +power=1 +toughness=1 +[/card] +[card] name=Asphyxiate target=Creature[-tapped] auto=destroy @@ -4678,6 +5472,17 @@ mana={1}{B}{B} type=Sorcery [/card] [card] +name=Aspiring Aeronaut +abilities=flying +auto=choice token(Thopter,Artifact Creature Thopter,1/1,flying) +text=Flying (This creature can't be blocked except by creatures with flying or reach.) -- When Aspiring Aeronaut enters the battlefield, put a 1/1 colorless Thopter artifact creature token with flying onto the battlefield. +mana={3}{U} +type=Creature +subtype=Human Artificer +power=1 +toughness=2 +[/card] +[card] name=Assassinate target=creature[tapped] auto=destroy @@ -4802,6 +5607,49 @@ power=2 toughness=3 [/card] [card] +name=Atarka Beastbreaker +auto={4}{G}:4/4 restriction{compare(powertotalinplay)~morethan~7} +text=Formidable — {4}{G}: Atarka Beastbreaker gets +4/+4 until end of turn. Activate this ability only if creatures you control have total power 8 or greater. +mana={1}{G} +type=Creature +subtype=Human Warrior +power=2 +toughness=2 +[/card] +[card] +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} +type=Legendary Creature +subtype=Dragon +power=6 +toughness=4 +[/card] +[card] +name=Atarka Efreet +facedown={3} +autofacedown={2}{R}:morph +autofaceup=counter(1/1,1) +autofaceup=damage:1 target(creature,player) +text=Megamorph {2}{R} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) -- When Atarka Efreet is turned face up, it deals 1 damage to target creature or player. +mana={3}{R} +type=Creature +subtype=Efreet Shaman +power=5 +toughness=1 +[/card] +[card] +name=Atarka Monument +auto={T}:add{G} +auto={T}:add{R} +auto={4}{R}{G}:becomes(Artifact Creature Dragon,4/4,flying,red,green) ueot +text={T}: Add {R} or {G} to your mana pool. -- {4}{R}{G}: Atarka Monument becomes a 4/4 red and green Dragon artifact creature with flying until end of turn. +mana={3} +type=Artifact +[/card] +[card] name=Atog auto={S(artifact|myBattlefield)}:2/2 text=Sacrifice an artifact: Atog gets +2/+2 until end of turn. @@ -4969,8 +5817,8 @@ subtype=Aura [/card] [card] name=Aura of Silence -auto=lord(artifact|opponenthand) altercost(colorless, +2) -auto=lord(enchantment|opponenthand) altercost(colorless, +2) +auto=lord(artifact|opponenthand,opponentlibrary,opponentgraveyard,opponentexile) altercost(colorless, +2) +auto=lord(enchantment|opponenthand,opponentlibrary,opponentgraveyard,opponentexile) altercost(colorless, +2) auto={S}:destroy target(artifact,enchantment) text=Artifact and enchantment spells your opponents cast cost {2} more to cast. -- Sacrifice Aura of Silence: Destroy target artifact or enchantment. mana={1}{W}{W} @@ -5037,7 +5885,7 @@ toughness=4 [/card] [card] name=Aurification -auto=@damaged(controller) from(creature):all(trigger[from]) counter(0/0,1,Gold) +auto=@damageof(player) from(creature):all(trigger[from]) counter(0/0,1,Gold) auto=lord(creature[counter{0/0.1.Gold}]) defender auto=@movedTo(this|nonbattlezone) from(myBattlefield):all(creature) removeallcounters(0/0,1,Gold) text=Whenever a creature deals damage to you, put a gold counter on it. -- Each creature with a gold counter on it is a Wall in addition to its other creature types and has defender. (Those creatures can't attack.) -- When Aurification leaves the battlefield, remove all gold counters from all creatures. @@ -5119,7 +5967,7 @@ toughness=1 [/card] [card] name=Auriok Survivors -auto=may name(move and attach) moveto(mybattlefield) target(equipment|mygraveyard) && newtarget +auto=may name(move and attach) moveto(mybattlefield) target(equipment|mygraveyard) and!(newhook)! text=When Auriok Survivors enters the battlefield, you may return target Equipment card from your graveyard to the battlefield. If you do, you may attach it to Auriok Survivors. mana={5}{W} type=Creature @@ -5140,7 +5988,7 @@ toughness=1 [card] name=Auriok Windwalker abilities=flying -auto={T}:target(equipment|mybattlefield) transforms((,newability[retarget target(creature|mybattlefield)])) forever +auto={T}:target(equipment|mybattlefield) transforms((,newability[rehook target(creature|mybattlefield)])) forever text=Flying -- {T}: Attach target Equipment you control to target creature you control. mana={3}{W} type=Creature @@ -5226,6 +6074,18 @@ power=8 toughness=8 [/card] [card] +name=Avacyn, Guardian Angel +abilities=flying,vigilance +auto={1}{W}:name(target Creature) target(other creature) activatechooseacolor transforms((,newability[preventalldamage from(*[chosencolor])])) ueot activatechooseend +auto={5}{W}{W}:name(target Player) target(player) && activatechooseacolor emblem transforms((,newability[preventalldamage to(targetedplayer) from(*[chosencolor])])) ueot activatechooseend +text=Flying, vigilance -- {1}{W}: Prevent all damage that would be dealt to another target creature this turn by sources of the color of your choice. -- {5}{W}{W}: Prevent all damage that would be dealt to target player this turn by sources of the color of your choice. +mana={2}{W}{W}{W} +type=Legendary Creature +subtype=Angel +power=5 +toughness=4 +[/card] +[card] name=Avacynian Priest auto={1}{T}:tap target(creature[-human]) text={1}, {T}: Tap target non-Human creature. @@ -5314,6 +6174,17 @@ power=8 toughness=8 [/card] [card] +name=Avatar of the Resolute +abilities=reach,trample +auto=foreach(creature[counter{1/1.1}]|mybattlefield) counter(1/1,1) +text=Reach, trample -- Avatar of the Resolute enters the battlefield with a +1/+1 counter on it for each other creature you control with a +1/+1 counter on it. +mana={G}{G} +type=Creature +subtype=Avatar +power=3 +toughness=2 +[/card] +[card] name=Avatar of Will abilities=flying otherrestriction=type(*|opponenthand)~equalto~0 @@ -5351,6 +6222,18 @@ power=3 toughness=3 [/card] [card] +name=Avarice Amulet +auto=teach(creature) 2/0 +auto=teach(creature) vigilance +auto=teach(creature) transforms((,newability[@each my upkeep:draw:1])) +auto=@movedto(graveyard) from(mytgt|battlefield):choice target(opponent) && moveto(targetedpersonsbattlefield) all(this) +auto={2}:equip +text=Equipped creature gets +2/+0 and has vigilance and "At the beginning of your upkeep, draw a card." -- When equipped creature dies, target opponent gains control of Avarice Amulet. -- Equip {2} ({2}: Attach to target creature you control. Equip only as a sorcery.) +mana={4} +type=Artifact +subtype=Equipment +[/card] +[card] name=Avarice Totem auto={5}:moveto(mybattlefield) target(*[-land]|opponentbattlefield) && moveto(opponentbattlefield) all(this) text={5}: Exchange control of Avarice Totem and target nonland permanent. @@ -5358,6 +6241,18 @@ mana={1} type=Artifact [/card] [card] +name=Avaricious Dragon +abilities=flying +auto=@each my draw:draw:1 controller +auto=@each my cleanup:reject all(*|myhand) +text=Flying -- At the beginning of your draw step, draw an additional card. -- At the beginning of your end step, discard your hand. +mana={2}{R}{R} +type=Creature +subtype=Dragon +power=4 +toughness=4 +[/card] +[card] name=Aven Archer abilities=flying auto={2}{W}{T}:damage:2 target(creature[attacking;blocking]) @@ -5380,6 +6275,17 @@ power=2 toughness=2 [/card] [card] +name=Aven Battle Priest +abilities=flying +auto=choice life:3 controller +text=Flying (This creature can't be blocked except by creatures with flying or reach.) -- When Aven Battle Priest enters the battlefield, you gain 3 life. +mana={5}{W} +type=Creature +subtype=Bird Cleric +power=3 +toughness=3 +[/card] +[card] name=Aven Brigadier abilities=flying auto=lord(other soldier) 1/1 @@ -5507,6 +6413,16 @@ mana={1}{W}{W} type=Enchantment [/card] [card] +name=Aven Skirmisher +abilities=flying +text=Flying +mana={W} +type=Creature +subtype=Bird Warrior +power=1 +toughness=1 +[/card] +[card] name=Aven Smokeweaver abilities=flying,protection from red text=Flying, protection from red @@ -5527,6 +6443,42 @@ power=1 toughness=1 [/card] [card] +name=Aven Sunstriker +abilities=flying,double strike +facedown={3} +autofacedown={4}{W}:morph +autofaceup=counter(1/1,1) +text=Flying -- Double strike (This creature deals both first-strike and regular combat damage.) -- Megamorph {4}{W} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) +mana={1}{W}{W} +type=Creature +subtype=Bird Warrior +power=1 +toughness=1 +[/card] +[card] +name=Aven Surveyor +abilities=flying +auto=choice name(+1/+1 counter) counter(1/1,1) +auto=choice name(bounce creature) moveto(ownerhand) target(creature) +text=Flying. -- When Aven Surveyor enters the battlefield, choose one: -- Put a +1/+1 counter on Aven Surveyor. -- Return target creature to its owners hand. +mana={3}{U}{U} +type=Creature +subtype=Bird Scout +power=2 +toughness=2 +[/card] +[card] +name=Aven Tactician +abilities=flying +auto=ability$!name(Bolster) notatarget(creature[toughness=toughness:lowest:creature:mybattlefield]|mybattlefield) counter(1/1,1)!$ controller +text=Flying -- When Aven Tactician enters the battlefield, bolster 1. (Choose a creature with the least toughness among creatures you control and put a +1/+1 counter on it.) +mana={4}{W} +type=Creature +subtype=Bird Soldier +power=2 +toughness=3 +[/card] +[card] name=Aven Trailblazer abilities=flying auto=aslongas(forest|myBattlefield) 0/1 @@ -5622,6 +6574,24 @@ power=2 toughness=2 [/card] [card] +name=Awaken the Ancient +target=mountain +auto=transforms((Giant Creature,setpower=7,settoughness=7,red,haste)) +text=Enchant Mountain -- {2}: Enchanted Mountain becomes a 7/7 red Giant creature with haste. It's still a land. +mana={1}{R}{R}{R} +type=Enchantment +subtype=Aura +[/card] +[card] +name=Awaken the Bear +target=creature +auto=trample ueot +auto=3/3 ueot +text=Target creature gets +3/+3 and gains trample until end of turn. +mana={2}{G} +type=Instant +[/card] +[card] name=Awakener Druid auto=target(forest) transforms((Treefolk Creature,setpower=4,settoughness=5,green)) text=When Awakener Druid enters the battlefield, target Forest becomes a 4/5 green Treefolk creature for as long as Awakener Druid is on the battlefield. It's still a land. @@ -5873,7 +6843,7 @@ type=Artifact [card] name=Azor's Elocutors auto=@each my upkeep:counter(0/0,1,Filibuster) all(this) && this(counter{0/0.5.Filibuster})>=wingame -auto=@damaged(controller):counter(0/0,-1,Filibuster) +auto=@damageof(player):counter(0/0,-1,Filibuster) text=At the beginning of your upkeep, put a filibuster counter on Azor's Elocutors. Then if Azor's Elocutors has five or more filibuster counters on it, you win the game. -- Whenever a source deals damage to you, remove a filibuster counter from Azor's Elocutors. mana={3}{WU}{WU} type=Creature @@ -5928,7 +6898,7 @@ type=Instant [card] name=Backfire target=creature -auto=@damaged(controller) from(mytgt):damage:thatmuch targetcontroller +auto=@damageof(player) from(mytgt):damage:thatmuch targetcontroller text=Enchant creature -- Whenever enchanted creature deals damage to you, Backfire deals that much damage to that creature's controller. mana={U} type=Enchantment @@ -6094,7 +7064,8 @@ toughness=3 [card] name=Balefire Dragon abilities=flying -auto=@combatdamaged(opponent) from(this):all(creature|opponentbattlefield) damage:thatmuch +auto=@combatdamagefoeof(player) from(this):all(creature|opponentbattlefield) damage:thatmuch +auto=@combatdamageof(player) from(this):all(creature|mybattlefield) damage:thatmuch text=Flying -- Whenever Balefire Dragon deals combat damage to a player, it deals that much damage to each creature that player controls. mana={5}{R}{R} type=Creature @@ -6190,7 +7161,7 @@ toughness=2 [/card] [card] name=Ballyrush Banneret -auto=lord(*[soldier;kithkin]|myhand) altercost(colorless, -1) +auto=lord(*[soldier;kithkin]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) text=Kithkin spells and Soldier spells you cast cost {1} less to cast. mana={1}{W} type=Creature @@ -6322,6 +7293,16 @@ type=Enchantment subtype=Aura [/card] [card] +name=Banisher Priest +auto=(blink)forsrc target(creature|opponentbattlefield) +text=When Banisher Priest enters the battlefield, exile target creature an opponent controls until Banisher Priest leaves the battlefield. +mana={1}{W}{W} +type=Creature +subtype=Human Cleric +power=2 +toughness=2 +[/card] +[card] name=Banishing Knack target=creature auto=teach(creature) {T}:moveto(ownerhand) target(*[-land]|battlefield) @@ -6330,10 +7311,17 @@ mana={U} type=Instant [/card] [card] +name=Banishing Light +auto=(blink)forsrc target(*[-land]|opponentbattlefield) +text=When Banishing Light enters the battlefield, exile target nonland permanent an opponent controls until Banishing Light leaves the battlefield. (That permanent returns under its owner's control.) +mana={2}{W} +type=Enchantment +[/card] +[card] name=Banishing Stroke target=*[artifact;creature;enchantment] auto=bottomoflibrary -autohand=restriction{miracle} pay[[{W}]] name(Miracle) activate name(Miracle) castcard(normal) +autohand=restriction{miracle} pay[[{W}]] name(Miracle) activate name(Miracle) castcard(restricted) text=Put target artifact, creature, or enchantment on the bottom of its owner's library. -- Miracle {W} (You may cast this card for its miracle cost when you draw it if it's the first card you drew this turn.) mana={5}{W} type=Instant @@ -6552,8 +7540,8 @@ type=Artifact [card] name=Barbed Shocker abilities=trample,haste -auto=@damaged(opponent) from(this):all(*|opponenthand) transforms((,newability[reject],newability[draw:1])) ueot -auto=@damaged(controller) from(this):all(*|myhand) transforms((,newability[reject],newability[draw:1])) ueot +auto=@damagefoeof(player) from(this):all(*|opponenthand) transforms((,newability[reject],newability[draw:1])) ueot +auto=@damageof(player) from(this):all(*|myhand) transforms((,newability[reject],newability[draw:1])) ueot text=Trample, haste -- Whenever Barbed Shocker deals damage to a player, that player discards all the cards in his or her hand, then draws that many cards. mana={3}{R} type=Creature @@ -6669,6 +7657,21 @@ power=3 toughness=2 [/card] [card] +name=Barrage of Boulders +auto=damage:1 all(creature|opponentbattlefield) +auto=if type(creature[power>=4]|mybattlefield)~morethan~0 then all(creature|battlefield) transforms((newability[cantblock ueot])) ueot +text=Barrage of Boulders deals 1 damage to each creature you don't control. -- Ferocious If you control a creature with power 4 or greater, creatures can't block this turn. +mana={2}{R} +type=Sorcery +[/card] +[card] +name=Barrage of Expendables +auto={R}{S(creature|myBattlefield)}:damage:1 target(creature,player) +text={R}, Sacrifice a creature: Barrage of Expendables deals 1 damage to target creature or player. +mana={R} +type=Enchantment +[/card] +[card] name=Barrage Ogre auto={T}{S(artifact|myBattlefield)}:damage:2 target(creature,player) text={T}, Sacrifice an artifact: Barrage Ogre deals 2 damage to target creature or player. @@ -6865,6 +7868,24 @@ type=Artifact subtype=Equipment [/card] [card] +name=Bassara Tower Archer +abilities=opponentshroud,reach +text=Hexproof, reach +mana={G}{G} +type=Creature +subtype=Human Archer +power=2 +toughness=1 +[/card] +[card] +name=Bathe in Dragonfire +target=creature +auto=damage:4 +text=Bathe in Dragonfire deals 4 damage to target creature. +mana={2}{R} +type=Sorcery +[/card] +[card] name=Bathe in Light target=creature auto=choice name(white) protection from white && all(creature[share!color!]) protection from white @@ -6920,8 +7941,9 @@ toughness=1 [/card] [card] name=Battering Krasis +abilities=trample auto=evolve -text=Evolve (Whenever a creature enters the battlefield under your control, if that creature has greater power or toughness than this creature, put a +1/+1 counter on this creature.) +text=Trample -- Evolve (Whenever a creature enters the battlefield under your control, if that creature has greater power or toughness than this creature, put a +1/+1 counter on this creature.) mana={2}{G} type=Creature subtype=Fish Beast @@ -6963,6 +7985,17 @@ type=Artifact subtype=Equipment [/card] [card] +name=Battle Brawler +auto=aslongas(*[red;white]|mybattlefield) 1/0 +auto=aslongas(*[red;white]|mybattlefield) first strike +text=As long as you control a red or white permanent, Battle Brawler gets +1/+0 and has first strike. +mana={1}{B} +type=Creature +subtype=Orc Warrior +power=2 +toughness=2 +[/card] +[card] name=Battle Cry auto=untap all(creature[white]|mybattlefield) auto=all(creature|myBattlefield) transforms((,newability[@combat(blocking) source(this) once:0/1 ueot])) ueot @@ -7031,9 +8064,19 @@ mana={2}{W}{W} type=Sorcery [/card] [card] +name=Battle Sliver +auto=lord(sliver|mybattlefield) 2/0 +text=All Sliver creatures you control get +2/+0. +mana={4}{R} +type=Creature +subtype=Sliver +power=2 +toughness=2 +[/card] +[card] name=Battle Squadron abilities=flying -auto=foreach(creature|myBattlefield) 1/1 +anyzone=type:creature:myBattlefield/type:creature:myBattlefield cdaactive text=Flying -- Battle Squadron's power and toughness are each equal to the number of creatures you control. mana={3}{R}{R} type=Creature @@ -7101,7 +8144,7 @@ toughness=2 [/card] [card] name=Battleflight Eagle -auto=target(creature|battlefield) 2/2 ueot && flying ueot +auto=target(creature|battlefield) transforms((,newability[2/2],newability[flying])) ueot abilities=flying text=Flying -- When Battleflight Eagle enters the battlefield, target creature gets +2/+2 and gains flying until end of turn. mana={4}{W} @@ -7111,6 +8154,17 @@ power=2 toughness=2 [/card] [card] +name=Battlefront Krushok +abilities=oneblocker +auto=lord(creature[counter{1/1.1}]|myBattlefield) oneblocker +text=Battlefront Krushok can't be blocked by more than one creature. -- Each creature you control with a +1/+1 counter on it can't be blocked by more than one creature. +mana={4}{G} +type=Creature +subtype=Beast +power=3 +toughness=4 +[/card] +[card] name=Battlegate Mimic auto=@movedTo(*[red&white]|mystack) turnlimited:transforms((,setpower=4,settoughness=2,first strike)) ueot text=Whenever you cast a spell that's both red and white, Battlegate Mimic becomes 4/2 and gains first strike until end of turn. @@ -7307,6 +8361,26 @@ power=2 toughness=2 [/card] [card] +name=Bear's Companion +auto=token(Bear,Creature Bear, 4/4,green) +text=When Bear's Companion enters the battlefield, put a 4/4 green Bear creature token onto the battlefield. +mana={2}{G}{U}{R} +type=Creature +subtype=Human Warrior +power=2 +toughness=2 +[/card] +[card] +name=Bearer of the Heavens +autograveyard=@movedto(this|graveyard) from(battlefield):phaseaction[endofturn once] destroy all(*|battlefield) +text=When Bearer of the Heavens dies, destroy all permanents at the beginning of the next end step. +mana={7}{R} +type=Creature +subtype=Giant +power=10 +toughness=10 +[/card] +[card] name=Bearscape auto={1}{G}{E(*|mygraveyard)}{E(*|mygraveyard)}:token(Bear,Creature Bear,2/2,green) text={1}{G}, Exile two cards from your graveyard: Put a 2/2 green Bear creature token onto the battlefield. @@ -7315,7 +8389,7 @@ type=Enchantment [/card] [card] name=Beast of Burden -auto=foreach(creature|Battlefield) 1/1 +anyzone=type:creature:Battlefield/type:creature:Battlefield cdaactive text=Beast of Burden's power and toughness are each equal to the number of creatures on the battlefield. mana={6} type=Artifact Creature @@ -7515,6 +8589,16 @@ power=3 toughness=3 [/card] [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. +mana={3}{B} +type=Creature +subtype=Orc Warrior +power=4 +toughness=5 +[/card] +[card] name=Bellowing Tanglewurm abilities=intimidate auto=lord(other creature[green]|myBattlefield) intimidate @@ -7536,6 +8620,20 @@ power=1 toughness=1 [/card] [card] +name=Belltoll Dragon +abilities=flying,opponentshroud +facedown={3} +autofacedown={5}{U}{U}:morph +autofaceup=counter(1/1,1) +autofaceup=counter(1/1,1) all(other creature[dragon]|mybattlefield) +text=Flying, hexproof -- Megamorph {5}{U}{U} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) -- When Belltoll Dragon is turned face up, put a +1/+1 counter on each other Dragon creature you control. +mana={5}{U} +type=Creature +subtype=Dragon +power=3 +toughness=3 +[/card] +[card] name=Belltower Sphinx abilities=flying auto=@damaged(this) from(*|opponentbattlefield):deplete:thatmuch opponent @@ -7581,7 +8679,7 @@ toughness=2 [/card] [card] name=Benalish Commander -auto=type:soldier:mybattlefield/type:soldier:mybattlefield nonstatic +anyzone=type:soldier:mybattlefield/type:soldier:mybattlefield cdaactive autoexile=@counterremoved(0/0,1,Time) from(sourcecard) suspended:token(Soldier,Creature Soldier,1/1,white) suspend(0)={X}{W}{W} text=Benalish Commander's power and toughness are each equal to the number of Soldiers you control. -- Suspend X - {X}{W}{W}. X can't be 0. (Rather than cast this card from your hand, you may pay {X}{W}{W} and exile it with X time counters on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost. It has haste.) -- Whenever a time counter is removed from Benalish Commander while it's exiled, put a 1/1 white Soldier creature token onto the battlefield. @@ -7701,6 +8799,16 @@ power=5 toughness=3 [/card] [card] +name=Benthic Giant +abilities=opponentshroud +text=Hexproof. +mana={5}{U} +type=Creature +subtype=Giant +power=4 +toughness=5 +[/card] +[card] name=Benthicore auto=token(Merfolk Wizard,Creature Merfolk Wizard,1/1,blue)*2 auto={T(merfolk|myBattlefield)}{T(merfolk|myBattlefield)}:untap && shroud @@ -7761,6 +8869,13 @@ power=4 toughness=4 [/card] [card] +name=Berserkers' Onslaught +auto=lord(creature[attacking]|mybattlefield) double strike +text=Attacking creatures you control have double strike. +mana={3}{R}{R} +type=Enchantment +[/card] +[card] name=Beseech the Queen auto=moveTo(myhand) notatarget(*[manacost<=type:land:mybattlefield]|mylibrary) text=({(2/b)} can be paid with any two mana or with {B}. This card's converted mana cost is 6.) -- Search your library for a card with converted mana cost less than or equal to the number of lands you control, reveal it, and put it into your hand. Then shuffle your library. @@ -7839,6 +8954,14 @@ mana={2}{U} type=Instant [/card] [card] +name=Bident of Thassa +auto=@combatdamaged(player) from(creature|myBattlefield):may draw:1 controller +auto={1}{U}{T}:all(creature|opponentbattlefield) mustattack ueot +text=Whenever a creature you control deals combat damage to a player, you may draw a card. -- {1}{U},{T}: Creatures your opponents control attack this turn if able. +mana={2}{U}{U} +type=Legendary Enchantment Artifact +[/card] +[card] name=Bifurcate target=creature[-token] auto=moveTo(mybattlefield) notatarget(*[share!name!]|mylibrary) @@ -8121,13 +9244,14 @@ type=Sorcery [card] name=Black Vise auto=name(choose opponent) notatarget(opponent) deplete:0 -auto=@each targetedplayer upkeep:foreach(*|targetedpersonshand) damage:1 targetedplayer >4 +auto=@each targetedplayer upkeep:damage:morethanfourcards targetedplayer text=As Black Vise enters the battlefield, choose an opponent. -- At the beginning of the chosen player's upkeep, Black Vise deals X damage to that player, where X is the number of cards in his or her hand minus 4. mana={1} type=Artifact [/card] [card] name=Black Ward +abilities=auraward target=creature auto=protection from black text=Enchant creature -- Enchanted creature has protection from black. This effect doesn't remove Black Ward. @@ -8343,6 +9467,14 @@ power=2 toughness=2 [/card] [card] +name=Blastfire Bolt +target=creature +auto=transforms((,newability[damage:5],newability[destroy all(children)])) ueot +text=Blastfire Bolt deals 5 damage to target creature. Destroy all Equipment attached to that creature. +mana={5}{R} +type=Instant +[/card] +[card] name=Blasting Station auto=@movedTo(creature|battlefield):may untap auto={T}{S(creature|myBattlefield)}:damage:1 target(creature,player) @@ -8411,6 +9543,16 @@ power=2 toughness=2 [/card] [card] +name=Blazing Hellhound +auto={1}{S(other creature|mybattlefield)}:damage:1 target(creature,player) +text={1}, Sacrifice another creature: Blazing Hellhound deals 1 damage to target creature or player. +mana={2}{B}{R} +type=Creature +subtype=Elemental Hound +power=4 +toughness=3 +[/card] +[card] name=Blazing Shoal other={E(other *[red]|myhand)} name(Exile Red Card from Hand) target=creature @@ -8424,7 +9566,8 @@ subtype=Arcane [card] name=Blazing Specter abilities=flying,haste -auto=@combatdamaged(opponent) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@combatdamagefoeof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@combatdamageof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ controller text=Flying, haste -- Whenever Blazing Specter deals combat damage to a player, that player discards a card. mana={2}{B}{R} type=Creature @@ -8460,6 +9603,17 @@ mana={1}{W} type=Instant [/card] [card] +name=Blessed Spirits +abilities=flying +auto=@movedto(enchantment|mystack):choice counter(1/1) +text=Flying -- Whenever you cast an enchantment spell, put a +1/+1 counter on Blessed Spirits. +mana={2}{W} +type=Creature +subtype=Spirit +power=2 +toughness=2 +[/card] +[card] name=Blessed Wind target=player auto=lifeset:20 @@ -8511,7 +9665,7 @@ subtype=Aura [card] name=Blessings of Nature auto=ability$!counter(1/1,1) target(creature)!$ controller && ability$!counter(1/1,1) target(creature)!$ controller && ability$!counter(1/1,1) target(creature)!$ controller && ability$!counter(1/1,1) target(creature)!$ controller -autohand=restriction{miracle} pay[[{G}]] name(Miracle) activate name(Miracle) castcard(normal) +autohand=restriction{miracle} pay[[{G}]] name(Miracle) activate name(Miracle) castcard(restricted) text=Distribute four +1/+1 counters among any number of target creatures. -- Miracle {G} (You may cast this card for its miracle cost when you draw it if it's the first card you drew this turn.) mana={4}{G} type=Sorcery @@ -8547,6 +9701,16 @@ type=Artifact subtype=Equipment [/card] [card] +name=Blightcaster +auto=@movedTo(enchantment|mystack):may target(creature) -2/-2 ueot +text=Whenever you cast an enchantment spell, you may have target creature get -2/-2 until end of turn. +mana={3}{B} +type=Creature +subtype=Human Wizard +power=2 +toughness=2 +[/card] +[card] name=Blighted Agent abilities=infect,unblockable text=Infect -- Blighted Agent is unblockable. @@ -8599,8 +9763,7 @@ toughness=1 [/card] [card] name=Blightsteel Colossus -abilities=trample,indestructible,infect -autograveyard=moveTo(ownerlibrary) && shuffle +abilities=trample,indestructible,infect,shufflelibrarydeath text=Trample,infect -- Blightsteel Colossus is indestructible. -- If Blightsteel Colossus would be put into a graveyard from anywhere, reveal Blightsteel Colossus and shuffle it into its owner's library instead. mana={12} type=Artifact Creature @@ -8691,7 +9854,8 @@ toughness=3 [card] name=Blinding Angel abilities=flying -auto=@combatdamaged(opponent) from(this):nextphasealter(remove,combatbegins,opponent) && nextphasealter(remove,combatattackers,opponent) && nextphasealter(remove,combatblockers,opponent) && nextphasealter(remove,combatdamage,opponent) && nextphasealter(remove,combatends,opponent) +auto=@combatdamagefoeof(player) from(this):nextphasealter(remove,combatbegins,opponent) && nextphasealter(remove,combatattackers,opponent) && nextphasealter(remove,combatblockers,opponent) && nextphasealter(remove,combatdamage,opponent) && nextphasealter(remove,combatends,opponent) +auto=@combatdamageof(player) from(this):nextphasealter(remove,combatbegins,controller) && nextphasealter(remove,combatattackers,controller) && nextphasealter(remove,combatblockers,controller) && nextphasealter(remove,combatdamage,controller) && nextphasealter(remove,combatends,controller) text=Flying (This creature can't be blocked except by creatures with flying or reach.) -- Whenever Blinding Angel deals combat damage to a player, that player skips his or her next combat phase. mana={3}{W}{W} type=Creature @@ -8736,6 +9900,14 @@ power=1 toughness=3 [/card] [card] +name=Blinding Spray +auto=all(creature|opponentbattlefield) -4/0 ueot +auto=draw:1 controller +text=Creatures your opponents control get -4/-0 until end of turn. -- Draw a card. +mana={4}{U} +type=Instant +[/card] +[card] name=Blinking Spirit auto={0}:moveto(ownerhand) text={0}: Return Blinking Spirit to its owner's hand. @@ -8884,7 +10056,8 @@ toughness=5 [card] name=Blizzard Specter abilities=flying -auto=@combatdamaged(player) from(this):all(this) transforms((,newability[choice name(bounce) ability$! target(*|mybattlefield) moveTo(ownerhand) !$opponent],newability[choice name(discard) ability$! target(*|myhand) reject !$opponent])) ueot +auto=@combatdamagefoeof(player) from(this):all(this) transforms((,newability[choice name(bounce) ability$! target(*|mybattlefield) moveTo(ownerhand) !$opponent],newability[choice name(discard) ability$! target(*|myhand) reject !$opponent])) ueot +auto=@combatdamageof(player) from(this):all(this) transforms((,newability[choice name(bounce) ability$! target(*|mybattlefield) moveTo(ownerhand) !$controller],newability[choice name(discard) ability$! target(*|myhand) reject !$controller])) ueot text=Flying -- Whenever Blizzard Specter deals combat damage to a player, choose one - That player returns a permanent he or she controls to its owner's hand; or that player discards a card. mana={2}{U}{B} type=Snow Creature @@ -8931,6 +10104,17 @@ power=0 toughness=1 [/card] [card] +name=Blood Bairn +abilities=flying +auto={S(other creature|myBattlefield)}:2/2 +text=Sacrifice another creature: Blood Bairn gets +2/+2 until end of turn. +mana={2}{B} +type=Creature +subtype=Vampire +power=2 +toughness=2 +[/card] +[card] name=Blood Baron of Vizkopa abilities=lifelink,protection from white,protection from black auto=this(opponentlife < 11) this(controllerlife >29) 6/6 @@ -8994,8 +10178,18 @@ mana={1}{R} type=Instant [/card] [card] +name=Blood Host +auto={1}{B}{S(other creature|mybattlefield)}:counter(1/1,1) && Life:2 controller +text={1}{B}, Sacrifice another creature: Put a +1/+1 counter on Blood Host and you gain 2 life. +mana={3}{B}{B} +type=Creature +subtype=Vampire +power=3 +toughness=3 +[/card] +[card] name=Blood Hound -auto=@damaged(controller):may counter(1/1,thatmuch) +auto=@damageof(player):may counter(1/1,thatmuch) auto=@each my endofturn:removeallcounters(1/1) text=Whenever you're dealt damage, you may put that many +1/+1 counters on Blood Hound. -- At the beginning of your end step, remove all +1/+1 counters from Blood Hound. mana={2}{R} @@ -9142,6 +10336,27 @@ power=2 toughness=2 [/card] [card] +name=Blood-Chin Fanatic +auto={1}{B}{S(other creature[warrior]|mybattlefield)}:target(player) life:-storedpower && life:storedpower controller +text={1}{B}, Sacrifice another Warrior creature: Target player loses X life and you gain X life, where X is the sacrificed creature's power. +mana={1}{B}{B} +type=Creature +subtype=Orc Warrior +power=3 +toughness=3 +[/card] +[card] +name=Blood-Cursed Knight +auto=aslongas(enchantment|mybattlefield) 1/1 +auto=aslongas(enchantment|mybattlefield) lifelink +text=As long as you control an enchantment, Blood-Cursed Knight gets +1/+1 and has lifelink. (Damage dealt by this creature also causes you to gain that much life.) +mana={1}{W}{B} +type=Creature +subtype=Vampire Knight +power=3 +toughness=2 +[/card] +[card] name=Bloodbond March auto=lord(creature) transforms((,newability[if casted(this) then all(*[share!name!]|targetcontrollergraveyard) moveto(battlefield)])) forever text=Whenever a player casts a creature spell, each player returns all cards with the same name as that spell from his or her graveyard to the battlefield. @@ -9168,6 +10383,17 @@ power=2 toughness=2 [/card] [card] +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. +mana={1}{B} +type=Creature +subtype=Human Soldier +power=2 +toughness=1 +[/card] +[card] name=Bloodcrazed Neonate abilities=mustattack auto=@combatdamaged(player) from(this):counter(1/1,1) @@ -9200,6 +10426,15 @@ mana={X}{B} type=Sorcery [/card] [card] +name=Bloodfell Caves +auto=tap +auto=life:1 +auto={T}:Add{B} +auto={T}:Add{R} +text=Bloodfell Caves enters the battlefield tapped. -- When Bloodfell Caves enters the battlefield, you gain 1 life. -- {T}: Add {B} or {R} to your mana pool. +type=Land +[/card] +[card] name=Bloodfire Colossus auto={R}{S}:damage:6 all(creature,player) text={R}, Sacrifice Bloodfire Colossus: Bloodfire Colossus deals 6 damage to each creature and each player. @@ -9220,6 +10455,27 @@ power=1 toughness=1 [/card] [card] +name=Bloodfire Enforcers +auto=aslongas(*[instant]|mygraveyard)aslongas(*[sorcery]|mygraveyard) first strike +auto=aslongas(*[instant]|mygraveyard)aslongas(*[sorcery]|mygraveyard) trample +text=Bloodfire Enforcers has first strike and trample as long as an instant card and a sorcery card are in your graveyard. +mana={3}{R} +type=Creature +subtype=Human Monk +power=5 +toughness=2 +[/card] +[card] +name=Bloodfire Expert +auto=@movedTo(*[-creature]|mystack):1/1 ueot +text=Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) +mana={2}{R} +type=Creature +subtype=Efreet Monk +power=3 +toughness=1 +[/card] +[card] name=Bloodfire Infusion target=creature|mybattlefield auto=teach(creature) {R}{S}:all(creature) damage:storedpower @@ -9239,6 +10495,16 @@ power=2 toughness=2 [/card] [card] +name=Bloodfire Mentor +auto={2}{U}{T}:draw:1 && transforms((,newability[target(*|myhand) reject])) forever +text={2}{U}{T}: Draw a card, then discard a card. +mana={2}{R} +type=Creature +subtype=Efreet Shaman +power=0 +toughness=5 +[/card] +[card] name=Bloodflow Connoisseur auto={S(creature|myBattlefield)}:counter(1/1,1) text=Sacrifice a creature: Put a +1/+1 counter on Bloodflow Connoisseur. @@ -9424,6 +10690,17 @@ power=3 toughness=3 [/card] [card] +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. +mana={B} +type=Creature +subtype=Human Warrior +power=2 +toughness=1 +[/card] +[card] name=Bloodscale Prowler auto=bloodthirst:1 text=Bloodthirst 1 (If an opponent was dealt damage this turn, this creature enters the battlefield with a +1/+1 counter on it.) @@ -9499,7 +10776,7 @@ type=Artifact [card] name=Bloodthirsty Ogre auto={T}:counter(0/0,1,Devotion) -auto=aslongas(demon|myBattlefield) {T}:target(creature) counter{0%0.1.Devotion}/counter{0%0.1.Devotion} ueot +auto=aslongas(demon|myBattlefield) {T}:target(creature) -counter{0%0.1.Devotion}/-counter{0%0.1.Devotion} ueot text={T}: Put a devotion counter on Bloodthirsty Ogre. -- {T}: Target creature gets -X/-X until end of turn, where X is the number of devotion counters on Bloodthirsty Ogre. Activate this ability only if you control a Demon. mana={2}{B} type=Creature @@ -9529,6 +10806,18 @@ power=1 toughness=1 [/card] [card] +name=Blood-Toll Harpy +abilities=Flying +auto=life:-1 controller +auto=life:-1 opponent +text=Flying. -- When Blood-Toll Harpy enters the battlefield, each player loses 1 life. +mana={2}{B} +type=Creature +subtype=Harpy +power=2 +toughness=1 +[/card] +[card] name=Bloom Tender auto={T}:aslongas(*[white]|myBattlefield) add{W} && aslongas(*[blue]|myBattlefield) add{U} && aslongas(*[black]|myBattlefield) add{B} && aslongas(*[red]|myBattlefield) add{R} && aslongas(*[green]|myBattlefield) add{G} text={T}: For each color among permanents you control, add one mana of that color to your mana pool. @@ -9539,6 +10828,15 @@ power=1 toughness=1 [/card] [card] +name=Blossoming Sands +auto=tap +auto=life:1 +auto={T}:Add{G} +auto={T}:Add{W} +text=Blossoming Sands enters the battlefield tapped. -- When Blossoming Sands enters the battlefield, you gain 1 life. -- {T}: Add {G} or {W} to your mana pool. +type=Land +[/card] +[card] name=Blossoming Wreath auto=life:type:creature:mygraveyard controller text=You gain life equal to the number of creature cards in your graveyard. @@ -9598,6 +10896,7 @@ type=Instant [/card] [card] name=Blue Ward +abilities=auraward target=creature auto=protection from blue text=Enchant creature -- Enchanted creature has protection from blue. This effect doesn't remove Blue Ward. @@ -9614,6 +10913,16 @@ mana={3}{G} type=Instant [/card] [card] +name=Blur Sliver +auto=lord(sliver|mybattlefield) haste +text=All Sliver creatures you control have haste. +mana={2}{R} +type=Creature +subtype=Sliver +power=2 +toughness=2 +[/card] +[card] name=Blurred Mongoose abilities=shroud,nofizzle text=Blurred Mongoose can't be countered. -- Shroud (This permanent can't be the target of spells or abilities.) @@ -9624,6 +10933,17 @@ power=2 toughness=1 [/card] [card] +name=Blustersquall +alias=11000 +other={3}{U} name(Overload) +target=creature|opponentbattlefield +auto=overload tap all(creature|opponentbattlefield) +auto=paidmana tap +text=Tap target creature you don't control. -- Overload {3}{U} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") +mana={U} +type=Instant +[/card] +[card] name=Boa Constrictor auto={T}:3/3 text={T}: Boa Constrictor gets +3/+3 until end of turn. @@ -9868,6 +11188,16 @@ power=3 toughness=4 [/card] [card] +name=Bogbrew Witch +auto={2}{T}:moveTo(myBattlefield) and!(tap)! target(Festering Newt,Bubbling Cauldron|mylibrary) +text={2}{T}: Search your library for a card named Festering Newt or Bubbling Cauldron, put it onto the battlefield tapped, then shuffle your library. +mana={3}{B} +type=Creature +subtype=Human Wizard +power=1 +toughness=3 +[/card] +[card] name=Boggart Arsonists abilities=plainswalk auto={2}{R}{S}:destroy target(scarecrow,plains) @@ -10057,6 +11387,17 @@ power=5 toughness=5 [/card] [card] +name=Boltwing Marauder +abilities=flying +auto=@movedto(other creature|mybattlefield):target(creature) 2/0 ueot +text=Flying -- Whenever another creature enters the battlefield under your control, target creature gets +2/+0 until end of turn. +mana={3}{B}{R} +type=Creature +subtype=Dragon +power=5 +toughness=4 +[/card] +[card] name=Bomb Squad auto={T}:target(creature) counter(0/0,1,Fuse) auto=@each my upkeep:counter(0/0,1,Fuse) all(creature[counter{0/0.1.Fuse}]) @@ -10091,6 +11432,16 @@ power=0 toughness=1 [/card] [card] +name=Bonded Construct +auto=@combat(attacking) source(this) restriction{type(creature[attacking]|myBattlefield)~equalto~1}:all(this) removefromcombat && untap +text=Bonded Construct can't attack alone. +mana={1} +type=Artifact Creature +subtype=Construct +power=2 +toughness=1 +[/card] +[card] name=Bonded Fetch abilities=defender,haste auto={T}:draw:1 && transforms((,newability[target(*|myhand) reject])) forever @@ -10206,6 +11557,16 @@ power=1 toughness=1 [/card] [card] +name=Bonescythe Sliver +auto=lord(sliver|mybattlefield) double strike +text=All Sliver creatures you control have double strike. +mana={3}{W} +type=Creature +subtype=Sliver +power=2 +toughness=2 +[/card] +[card] name=Boneshard Slasher abilities=flying auto=aslongas(*|mygraveyard) 2/2 >6 @@ -10238,7 +11599,8 @@ toughness=2 [/card] [card] name=Boneyard Wurm -auto=foreach(creature|mygraveyard) 1/1 +alias=1111 +anyzone=type:creature:mygraveyard/type:creature:mygraveyard cdaactive text=Boneyard Wurm's power and toughness are each equal to the number of creature cards in your graveyard. mana={1}{G} type=Creature @@ -10247,6 +11609,26 @@ power=* toughness=* [/card] [card] +name=Boon of Erebos +target=creature +auto=2/0 +auto=regenerate +auto=life:-2 controller +text=Target creature gets +2/+0 until end of turn. Regenerate it. You lose 2 life. +mana={B} +type=Instant +[/card] +[card] +name=Boonweaver Giant +auto=may name(attach an aura) target(aura|myhand,mylibrary,mygraveyard) newtarget +text=When Boonweaver Giant enters the battlefield, you may search your graveyard, hand and/or library for an Aura card and put it onto the battlefield attached to Boonweaver Giant. If you search your library this way, shuffle it. +mana={6}{W} +type=Creature +subtype=Giant Monk +power=4 +toughness=4 +[/card] +[card] name=Book of Rass auto={L:2}{2}:draw:1 text={2}, Pay 2 life: Draw a card. @@ -10302,6 +11684,24 @@ power=4 toughness=4 [/card] [card] +name=Borderland Marauder +auto=@combat(attacking) source(this):2/0 ueot +text=Whenever Borderland Marauder attacks, it gets +2/+0 until end of turn. +mana={1}{R} +type=Creature +subtype=Human Warrior +power=1 +toughness=2 +[/card] +[card] +name=Borderland Minotaur +mana={2}{R}{R} +type=Creature +subtype=Minotaur Warrior +power=4 +toughness=3 +[/card] +[card] name=Borderland Ranger auto=may moveTo(myHand) target(basic|myLibrary) text=When Borderland Ranger enters the battlefield, you may search your library for a basic land card, reveal it, and put it into your hand. If you do, shuffle your library. @@ -10489,7 +11889,7 @@ toughness=7 [/card] [card] name=Bosk Banneret -auto=lord(*[treefolk;shaman]|myhand) altercost(colorless, -1) +auto=lord(*[treefolk;shaman]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) text=Treefolk spells and Shaman spells you cast cost {1} less to cast. mana={1}{G} type=Creature @@ -10542,6 +11942,18 @@ text=Bottomless Vault enters the battlefield tapped. -- You may choose not to un type=Land [/card] [card] +name=Boulderfall +target=creature,player +auto=damage:1 +auto=damage:1 target(creature,player) +auto=ability$!name(damage) choice target(creature,player) damage:1!$ controller +auto=ability$!name(damage) choice target(creature,player) damage:1!$ controller +auto=ability$!name(damage) choice target(creature,player) damage:1!$ controller +text=Boulderfall deals 5 damage divided as you choose among any number of target creatures and/or players. +mana={6}{R}{R} +type=Sorcery +[/card] +[card] name=Bouncing Beebles auto=aslongas(artifact|opponentBattlefield) unblockable text=Bouncing Beebles is unblockable as long as defending player controls an artifact. @@ -10562,6 +11974,18 @@ type=Tribal Enchantment subtype=Rebel Aura [/card] [card] +name=Bounding Krasis +abilities=flash +auto=may target(creature) tap +auto=may target(creature) untap +text=Flash (You may cast this spell any time you could cast an instant.) -- When Bounding Krasis enters the battlefield, you may tap or untap target creature. +mana={1}{G}{U} +type=Creature +subtype=Fish Lizard +power=3 +toughness=3 +[/card] +[card] name=Boundless Realms auto=moveTo(mybattlefield) and!(tap)! notatarget(land|mylibrary) text=Search your library for up to X basic land cards, where X is the number of lands you control, and put them onto the battlefield tapped. Then shuffle your library. @@ -10609,6 +12033,17 @@ power=2 toughness=2 [/card] [card] +name=Bow of Nylea +auto=lord(creature[attacking]|mybattlefield) deathtouch +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. +mana={1}{G}{G} +type=Legendary Enchantment Artifact +[/card] +[card] name=Bower Passage auto=lord(creature[flying]) cantbeblockerof(creature|mybattlefield) text=Creatures with flying can't block creatures you control. @@ -10687,6 +12122,16 @@ mana={1}{U} type=Instant [/card] [card] +name=Brain Maggot +auto=choice name(target opponent) target(opponent) donothing && all(this) transforms((,newability[if type(*[-land]|targetedpersonshand)~lessthan~1 then name(look) donothing notatarget(*|targetedpersonshand) else hand(blink)forsrc notatarget(*[-land]|targetedpersonshand)])) forever +text=When Brain Maggot enters the battlefield, target opponent reveals his or her hand and you choose a nonland card from it. Exile that card until Brain Maggot leaves the battlefield. +mana={1}{B} +type=Enchantment Creature +subtype=Insect +power=1 +toughness=1 +[/card] +[card] name=Brain Weevil abilities=intimidate auto={S}:target(player) ability$!name(discard 2 cards) target(<2>*|myhand) reject!$ targetedplayer asSorcery @@ -10806,7 +12251,7 @@ type=Instant [card] name=Brand of Ill Omen target=creature -auto=cumulativeupcost[{R}] sacrifice +auto=cumulativeupcostmulti[{R}] sacrifice all(this) auto=transforms((,newability[maxCast(creature)0 controller])) text=Enchant creature -- Cumulative upkeep {R} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.) -- Enchanted creature's controller can't cast creature spells. mana={3}{R} @@ -10858,7 +12303,7 @@ toughness=1 [/card] [card] name=Brass Squire -auto={T}:target(equipment|mybattlefield) transforms((,newability[retarget target(creature|mybattlefield)])) forever +auto={T}:target(equipment|mybattlefield) transforms((,newability[rehook target(creature|mybattlefield)])) forever text={T}: Attach target Equipment you control to target creature you control. mana={3} type=Artifact Creature @@ -10916,6 +12361,16 @@ mana={3}{R}{R} type=Instant [/card] [card] +name=Brawler's Plate +auto=teach(creature) 2/2 +auto=teach(creature) trample +auto={4}:equip +text=Equipped creature gets +2/+2 and has trample. (If it 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.) -- Equip 4 (4: Attach to target creature you control. Equip only as a sorcery.) +mana={3} +type=Artifact +subtype=Equipment +[/card] +[card] name=Brawn abilities=trample autograveyard=aslongas(forest|myBattlefield) lord(creature|myBattlefield) trample @@ -10943,6 +12398,17 @@ mana={2}{B} type=Instant [/card] [card] +name=Breaching Hippocamp +abilities=flash +auto=untap target(other creature|mybattlefield) +text=Flash. -- When Breaching Hippocamp enters the battlefield, untap another target creature you control. +mana={3}{U} +type=Creature +subtype=Horse Fish +power=3 +toughness=2 +[/card] +[card] name=Break Asunder target=artifact,enchantment auto=destroy @@ -10960,6 +12426,13 @@ mana={1}{W} type=Instant [/card] [card] +name=Break Through the Line +auto={R}:target(creature[power<=2]) transforms((,newability[haste ueot],newability[unblockable ueot])) ueot +text={R}:Target creature with power 2 or less gains haste until end of turn and can't be blocked this turn. +mana={1}{R} +type=Enchantment +[/card] +[card] name=Breath of Darigaaz kicker={2} auto=damage:1 all(creature[-flying]) @@ -11105,6 +12578,14 @@ power=3 toughness=3 [/card] [card] +name=Briber's Purse +auto=counter(0/0,X,gem) +auto={1}{T}{C(0/0,-1,gem)}:target(creature) transforms((,newability[cantattack ueot],newability[cantblock ueot])) ueot +text=Briber's Purse enters the battlefield with X gem counters on it. -- 1, Tap, Remove a gem counter from Briber's Purse: Target creature can't attack or block this turn. +mana={X} +type=Artifact +[/card] +[card] name=Bribery target=creature|opponentLibrary auto=moveTo(myBattlefield) @@ -11122,7 +12603,7 @@ type=Enchantment [/card] [card] name=Brighthearth Banneret -auto=lord(*[elemental;warrior]|myhand) altercost(colorless, -1) +auto=lord(*[elemental;warrior]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) autohand={1}{R}{discard}:counter(1/1,1) target(creature) text=Elemental spells and Warrior spells you cast cost {1} less to cast. -- Reinforce 1 - {1}{R} ({1}{R}, Discard this card: Put a +1/+1 counter on target creature.) mana={1}{R} @@ -11245,6 +12726,14 @@ power=1 toughness=1 [/card] [card] +name=Bring Low +target=creature|battlefield +auto=if cantargetcard(creature[counter{1/1.1}]) then damage:5 else damage:3 +text=Bring Low deals 3 damage to target creature. -- If that creature has a +1/+1 counter on it, Bring Low deals 5 damage to it instead. +mana={3}{R} +type=Instant +[/card] +[card] name=Bringer of the Black Dawn other={W}{U}{B}{R}{G} name(Spend WUBRG to Cast) auto=@each my upkeep:may name(search for a card) life:-2 controller && moveTo(library) target(*|mylibrary) @@ -11338,6 +12827,14 @@ mana={1} type=Artifact [/card] [card] +name=Bronze Sable +mana={2} +type=Artifact Creature +subtype=Sable +power=2 +toughness=1 +[/card] +[card] name=Bronzebeak Moa auto=@movedTo(creature|mybattlefield):3/3 ueot text=Whenever another creature enters the battlefield under your control, Bronzebeak Moa gets +3/+3 until end of turn. @@ -11370,6 +12867,27 @@ mana={1}{R} type=Sorcery [/card] [card] +name=Brood Keeper +auto=@targeted(this) from(aura|hand,graveyard):token(-383198) controller +text=Whenever an Aura becomes attached to Brood Keeper, put a 2/2 red Dragon creature token with flying onto the battlefield. It has "{R}: This creature gets +1/+0 until end of turn". +mana={3}{R} +type=Creature +subtype=Human Shaman +power=2 +toughness=3 +[/card] +[card] +name=Brood Keeper Dragon +abilities=flying +auto={R}:1/0 ueot +text=Flying -- {R}: This creature gets +1/+0 until end of turn. +type=Creature +subtype=Dragon +color=red +power=2 +toughness=2 +[/card] +[card] name=Brood of Cockroaches auto=@movedTo(mygraveyard) from(this|battlefield):phaseaction[endofturn once] life:-1 controller auto=@movedTo(mygraveyard) from(this|battlefield):phaseaction[endofturn once] moveTo(myhand) @@ -11382,8 +12900,8 @@ toughness=1 [/card] [card] name=Brood Sliver -auto=@combatdamaged(opponent) from(sliver):may token(Sliver,Creature Sliver,1/1) -auto=@combatdamaged(controller) from(sliver):may token(Sliver,Creature Sliver,1/1) +auto=@combatdamagefoeof(player) from(sliver|mybattlefield):token(Sliver,Creature Sliver,1/1) controller +auto=@combatdamageof(player) from(sliver|opponentbattlefield):token(Sliver,Creature Sliver,1/1) opponent text=Whenever a Sliver deals combat damage to a player, its controller may put a 1/1 colorless Sliver creature token onto the battlefield. mana={4}{G} type=Creature @@ -11428,7 +12946,7 @@ toughness=4 [card] name=Broodstar abilities=affinityartifacts,flying -auto=foreach(artifact|mybattlefield) 1/1 +anyzone=type:artifact:mybattlefield/type:artifact:mybattlefield cdaactive text=Affinity for artifacts (This spell costs {1} less to cast for each artifact you control.) -- Flying -- Broodstar's power and toughness are each equal to the number of artifacts you control. mana={8}{U}{U} type=Creature @@ -11552,6 +13070,14 @@ subtype=Beeble power=3 toughness=3 [/card] +[card] +name=Bubbling Cauldron +auto={1}{S(creature|mybattlefield)}{T}:name(sacrifice creature) life:4 controller +auto={1}{S(festering newt|mybattlefield)}{T}:name(sacrifice newt) life:-4 opponent && life:4 controller +text={1}, {T}, Sacrifice a creature: You gain 4 life. {1}, {T}, Sacrifice a creature named Festering Newt: Each opponent loses 4 life. You gain life equal to the life lost this way. +mana={2} +type=Artifact +[/card] ###The 2 cards below should stay together (Flip Card)### [card] name=Budoka Gardener @@ -11713,6 +13239,14 @@ mana={G} type=Enchantment [/card] [card] +name=Burn Away +auto=target(creature|battlefield) damage:6 +auto=@movedTo(mytgt|graveyard) from(battlefield):all(trigger[to]) moveTo(exile) all(*|ownergraveyard) +text=Burn Away deals 6 damage to target creature. When that creature dies this turn, exile all cards from its controller's graveyard +mana={4}{R} +type=Instant +[/card] +[card] name=Burn the Impure target=creature auto=damage:3 @@ -11732,6 +13266,15 @@ mana={3}{R} type=Sorcery [/card] [card] +name=Burning Anger +target=creature +auto=teach(creature) transforms((,newability[{T}:name(Target Creature) target(creature) dynamicability],newability[{T}:name(Target Player) target(player) dynamicability])) +text=Enchant creature. -- Enchanted creature has "{T}: This creature deals damage equal to its power to target creature or player." +mana={4}{R} +type=Enchantment +subtype=Aura +[/card] +[card] name=Burning Cloak target=creature auto=2/0 @@ -11741,6 +13284,14 @@ mana={R} type=Sorcery [/card] [card] +name=Burning Earth +auto=@tappedformana(land[-basic]|opponentBattlefield):damage:1 opponent +auto=@tappedformana(land[-basic]|myBattlefield):damage:1 controller +text=Whenever a player taps a nonbasic land for mana, Burning Earth deals 1 damage to that player. +mana={3}{R} +type=Enchantment +[/card] +[card] name=Burning Fields auto=Damage:5 opponent text=Burning Fields deals 5 damage to target opponent. @@ -11812,6 +13363,16 @@ power=2 toughness=2 [/card] [card] +name=Burnished Hart +auto={3}{S}:notatarget(land[basic]|mylibrary) and!(tap)! moveTo(mybattlefield) +text={3},Sacrifice Burnished Hart: Search your library for up to two basic land cards, put them onto the battlefield tapped, then shuffle your library. +mana={3} +type=Artifact Creature +subtype=Elk +power=2 +toughness=2 +[/card] +[card] name=Burnout target=instant|stack auto=teach(instant[blue]) fizzle @@ -11964,6 +13525,19 @@ power=5 toughness=4 [/card] [card] +name=Butcher of the Horde +abilities=flying +auto={S(other creature|mybattlefield)}:name(vigilance) vigilance ueot +auto={S(other creature|mybattlefield)}:name(lifelink) lifelink ueot +auto={S(other creature|mybattlefield)}:name(haste) haste ueot +text=Flying. -- Sacrifice another creature: Butcher of the Horde gains your choice of Vigilance, lifelink, or haste until end of turn. +mana={1}{R}{W}{B} +type=Creature +subtype=Demon +power=5 +toughness=4 +[/card] +[card] name=Butcher's Cleaver auto={3}:equip auto=3/0 @@ -11974,6 +13548,16 @@ type=Artifact subtype=Equipment [/card] [card] +name=Butcher's Glee +target=creature|battlefield +auto=3/0 ueot +auto=lifelink ueot +auto=regenerate +text=Target creature gets +3/+0 and gains lifelink until end of turn. Regenerate it. (Damage dealt by a creature with lifelink also causes its controller to gain that much life.) +mana={2}{B} +type=Instant +[/card] +[card] name=Cabal Archon auto={B}{S(cleric|myBattlefield)}:life:-2 target(player) && life:2 controller text={B}, Sacrifice a Cleric: Target player loses 2 life and you gain 2 life. @@ -11991,7 +13575,8 @@ type=Land [/card] [card] name=Cabal Executioner -auto=@combatdamaged(player) from(this):ability$!name(sacrifice) notatarget(creature|mybattlefield) sacrifice!$ opponent +auto=@combatdamagefoeof(player) from(this):ability$!name(sacrifice) notatarget(creature|mybattlefield) sacrifice!$ opponent +auto=@combatdamageof(player) from(this):ability$!name(sacrifice) notatarget(creature|mybattlefield) sacrifice!$ controller facedown={3} autofacedown={3}{B}{B}:morph text=Whenever Cabal Executioner deals combat damage to a player, that player sacrifices a creature. -- Morph {3}{B}{B} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) @@ -12039,7 +13624,8 @@ type=Instant [/card] [card] name=Cabal Slaver -auto=@combatdamaged(opponent) from(goblin|mybattlefield):ability$!name(discard) target(*|mybattefield) sacrifice !$ opponent +auto=@combatdamagefoeof(player) from(goblin|mybattlefield):ability$!name(discard) notatarget(*|myhand) reject!$ opponent +auto=@combatdamageof(player) from(goblin|opponentbattlefield):ability$!name(discard) notatarget(*|myhand) reject!$ controller text=Whenever a Goblin deals combat damage to a player, that player discards a card. mana={2}{B} type=Creature @@ -12089,6 +13675,13 @@ power=4 toughness=4 [/card] [card] +name=Cached Defenses +auto=ability$!name(Bolster) notatarget(creature[toughness=toughness:lowest:creature:mybattlefield]|mybattlefield) counter(1/1,3)!$ controller +text=Bolster 3. (Choose a creature with the least toughness among creatures you control and put three +1/+1 counters on it.) +mana={2}{G} +type=Sorcery +[/card] +[card] name=Cackling Counterpart target=creature|mybattlefield auto=clone @@ -12278,6 +13871,17 @@ mana={G}{W} type=Sorcery [/card] [card] +name=Call of the Full Moon +target=creature +auto=teach(creature) 3/2 +auto=teach(creature) trample +auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:sacrifice all(this) +text=Enchant creature -- Enchanted creature gets +3/+2 and has trample. (It can deal excess combat damage to defending player or planeswalker while attacking.) -- At the beginning of each upkeep, if a player cast two or more spells last turn, sacrifice Call of the Full Moon. +mana={1}{R} +type=Enchantment +subtype=Aura +[/card] +[card] name=Call of the Herd auto=token(Elephant,creature elephant, 3/3,green) flashback={3}{G} @@ -12358,6 +13962,7 @@ subtype=Elf power=2 toughness=2 [/card] +#chosentype and chosencolor not compatible with cdaactive... [card] name=Caller of the Hunt auto=chooseatype foreach(creature[chosentype]|battlefield) 1/1 chooseend @@ -12408,6 +14013,17 @@ mana={3} type=Artifact [/card] [card] +name=Calvary Pegasus +abilities=flying +auto=@combat(attacking) source(this):all(human[attacking]) flying ueot +text=Flying. -- Whenever Cavalry Pegasus attacks, each attacking Human gains flying until end of turn. +mana={1}{W} +type=Creature +subtype=Pegasus +power=1 +toughness=1 +[/card] +[card] name=Cancel target=*|stack auto=fizzle @@ -12501,8 +14117,9 @@ type=Sorcery [/card] [card] name=Cantivore +alias=1111 abilities=vigilance -auto=foreach(enchantment|graveyard) 1/1 +anyzone=type:enchantment:graveyard/type:enchantment:graveyard cdaactive text=Vigilance -- Cantivore's power and toughness are each equal to the number of enchantment cards in all graveyards. mana={1}{W}{W} type=Creature @@ -12522,6 +14139,17 @@ power=1 toughness=2 [/card] [card] +name=Canyon Lurkers +facedown={3} +autofacedown={3}{R}:morph +text=Morph {3}{R} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) +mana={4}{R} +type=Creature +subtype=Human Rogue +power=5 +toughness=2 +[/card] +[card] name=Canyon Minotaur mana={3}{R} type=Creature @@ -12869,6 +14497,16 @@ mana={1}{B} type=Enchantment [/card] [card] +name=Carnivorous Moss-Beast +auto={5}{G}{G}:counter(1/1,1) +text={5}{G}{G}: Put a +1/+1 counter on Carnivorous Moss-Beast +mana={4}{G}{G} +type=Creature +subtype=Plant Elemental Beast +power=4 +toughness=5 +[/card] +[card] name=Carnivorous Plant abilities=defender text=Defender @@ -12935,6 +14573,17 @@ mana={3}{G} type=Instant [/card] [card] +name=Carrion Crow +abilities=flying +auto=tap +text=Flying (This creature can't be blocked except by creatures with flying or reach.) -- Carrion Crow enters the battlefield tapped. +mana={2}{B} +type=Creature +subtype=Zombie Bird +power=2 +toughness=2 +[/card] +[card] name=Carrion Feeder abilities=cantblock auto={S(creature|myBattlefield)}:all(this) counter(1/1,1) @@ -13021,6 +14670,16 @@ text={T}: Add {1} to your mana pool. -- {(u/r)}, {T}: Add {U}{U}, {U}{R}, or {R} type=Land [/card] [card] +name=Cast into Darkness +target=creature +auto=teach(creature) cantblock +auto=teach(creature) -2/0 +text=Enchant creature -- Enchanted creature gets -2/-0 and can't block. +mana={1}{B} +type=Enchantment +subtype=Aura +[/card] +[card] name=Castigate target=opponent auto=if type(*[-land]|targetedpersonshand)~lessthan~1 then name(look) donothing notatarget(*|targetedpersonshand) else moveto(exile) notatarget(*[-land]|targetedpersonshand) @@ -13281,6 +14940,16 @@ mana={5} type=Artifact [/card] [card] +name=Caustic Caterpillar +auto={1}{G}{S}:target(artifact,enchantment) destroy +text={1}{G}, Sacrifice Caustic Caterpillar: Destroy target artifact or enchantment. +mana={G} +type=Creature +subtype=Insect +power=1 +toughness=1 +[/card] +[card] name=Caustic Crawler auto=@movedTo(land|myBattlefield):may -1/-1 target(creature) ueot text=Landfall - Whenever a land enters the battlefield under your control, you may have target creature get -1/-1 until end of turn. @@ -13320,7 +14989,8 @@ subtype=Aura [card] name=Caustic Wasps abilities=flying -auto=@combatdamaged(player) from(this):may destroy target(artifact|opponentbattlefield) +auto=@combatdamagefoeof(player) from(this):may destroy target(artifact|opponentbattlefield) +auto=@combatdamageof(player) from(this):may destroy target(artifact|mybattlefield) text=Flying -- Whenever Caustic Wasps deals combat damage to a player, you may destroy target artifact that player controls. mana={2}{G} type=Creature @@ -13472,6 +15142,14 @@ text=Celestial Colonnade enters the battlefield tapped. -- {T}: Add {W} or {U} t type=Land [/card] [card] +name=Celestial Flare +target=player +auto=ability$!name(sacrifice creature) notatarget(creature[attacking;blocking]|mybattlefield) sacrifice!$ targetedplayer +text=Target player sacrifices an attacking or blocking creature. +mana={W}{W} +type=Instant +[/card] +[card] name=Celestial Force auto=@each upkeep:life:3 controller text=At the beginning of each upkeep, you gain 3 life. @@ -13519,7 +15197,7 @@ toughness=3 name=Celestial Mantle target=creature auto=3/3 -auto=@combatdamaged(player) from(mytgt):life:lifetotal owner +auto=teach(creature) transforms((,newability[@combatdamaged(player) from(this):life:lifetotal controller])) text=Enchant creature -- Enchanted creature gets +3/+3. -- Whenever enchanted creature deals combat damage to a player, double its controller's life total. mana={3}{W}{W}{W} type=Enchantment @@ -13601,6 +15279,16 @@ power=3 toughness=2 [/card] [card] +name=Centaur Battlemaster +auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):counter(1/1,3) +text=Heroic - Whenever you cast a spell that targets Centaur Battlemaster, put three +1/+1 counters on Centaur Battlemaster. +mana={3}{G}{G} +type=Creature +subtype=Centaur Warrior +power=3 +toughness=3 +[/card] +[card] name=Centaur Chieftain abilities=haste auto=aslongas(*|mygraveyard) 1/1 all(creature|mybattlefield) ueot >6 oneshot @@ -13646,7 +15334,7 @@ toughness=3 [/card] [card] name=Centaur Omenreader -auto=this(tapped) lord(*|myhand) altercost(colorless, -2) ueot +auto=this(tapped) lord(*|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -2) ueot auto=@untapped(this):all(*|myhand) moveto(myhand) text=As long as Centaur Omenreader is tapped, creature spells you cast cost {2} less to cast. mana={3}{G} @@ -13725,7 +15413,8 @@ type=Land [/card] [card] name=Cephalid Constable -auto=@combatdamaged(opponent) from(this):name(bounce) ability$!name(bounce) target(*|opponentbattlefield) moveto(ownerhand) !$ controller +auto=@combatdamagefoeof(player) from(this):name(bounce) ability$!name(bounce) target(*|opponentbattlefield) moveto(ownerhand) !$ controller +auto=@combatdamageof(player) from(this):name(bounce) ability$!name(bounce) target(*|mybattlefield) moveto(ownerhand) !$ controller text=Whenever Cephalid Constable deals combat damage to a player, return up to that many target permanents that player controls to their owners' hands. mana={1}{U}{U} type=Creature @@ -13949,6 +15638,15 @@ power=3 toughness=3 [/card] [card] +name=Chained to the Rocks +target=mountain|mybattlefield +auto=(blink)forsrc target(creature|opponentbattlefield) +text=Enchant Mountain you control. -- When Chained to the Rocks enters the battlefield, exile target creature an opponent controls until Chained to the Rocks leaves the battlefield. That creature returns under its owner's control.) +mana={W} +type=Enchantment +subtype=Aura +[/card] +[card] name=Chained Throatseeker abilities=infect auto=this(variable{opponentpoisoncount} <1) cantattack @@ -14055,7 +15753,11 @@ toughness=4 [/card] [card] name=Chameleon Spirit -auto=chooseacolor foreach(*[chosencolor]|opponentBattlefield) 1/1 chooseend +auto=choice name(green) activate type:*[green]:opponentBattlefield/type:*[green]:opponentBattlefield cdaactive +auto=choice name(red) activate type:*[red]:opponentBattlefield/type:*[red]:opponentBattlefield cdaactive +auto=choice name(blue) activate type:*[blue]:opponentBattlefield/type:*[blue]:opponentBattlefield cdaactive +auto=choice name(white) activate type:*[white]:opponentBattlefield/type:*[white]:opponentBattlefield cdaactive +auto=choice name(black) activate type:*[black]:opponentBattlefield/type:*[black]:opponentBattlefield cdaactive text=As Chameleon Spirit enters the battlefield, choose a color. -- Chameleon Spirit's power and toughness are each equal to the number of permanents of the chosen color your opponents control. mana={3}{U} type=Creature @@ -14074,6 +15776,16 @@ power=3 toughness=3 [/card] [card] +name=Champion of Arashin +abilities=lifelink +text=Lifelink (Damage dealt by this creature also causes you to gain that much life.) +mana={3}{W} +type=Creature +subtype=Hound Warrior +power=3 +toughness=2 +[/card] +[card] name=Champion of the Parish auto=@movedTo(other creature[human]|mybattlefield):counter(1/1,1) text=Whenever another Human enters the battlefield under your control, put a +1/+1 counter on Champion of the Parish. @@ -14128,7 +15840,7 @@ name=Chandra Ablaze auto=counter(0/0,5,loyalty) auto={C(0/0,1,Loyalty)}:name(discard a card) all(this) transforms((,newability[reject notatarget(*|myhand)],newability[@discarded(*[red]|myhand) once:damage:4 target(*[creature;player])])) ueot auto={C(0/0,-2,Loyalty)}:name(discard hand) reject all(*|hand) && draw:3 all(player) -auto={C(0/0,-7,Loyalty)}:name(cast cards) castcard(normal) target(*[instant;sorcery]|mygraveyard) +auto={C(0/0,-7,Loyalty)}:name(cast cards) castcard(restricted) target(*[instant;sorcery]|mygraveyard) text=+1: Discard a card. If a red card is discarded this way, Chandra Ablaze deals 4 damage to target creature or player. -- -2: Each player discards his or her hand, then draws three cards. -- -7: Cast any number of red instant and/or sorcery cards from your graveyard without paying their mana costs. mana={4}{R}{R} type=Planeswalker @@ -14163,6 +15875,15 @@ mana={4}{R} type=Instant [/card] [card] +name=Chandra's Ignition +target=creature|mybattlefield +auto=transforms((,newability[all(other creature) dynamicability])) forever +auto=transforms((,newability[all(opponent) dynamicability])) forever +text=Target creature you control deals damage equal to its power to each other creature and each opponent. +mana={3}{R}{R} +type=Sorcery +[/card] +[card] name=Chandra's Outrage target=creature auto=damage:4 @@ -14174,8 +15895,9 @@ type=Instant [card] name=Chandra's Phoenix abilities=flying,haste -autograveyard=@damaged(opponent) from(instant[red]|mystack):moveTo(ownerhand) -autograveyard=@damaged(opponent) from(sorcery[red]|mystack):moveTo(ownerhand) +autograveyard=@damagefoeof(player) from(instant[red]|mystack):moveTo(ownerhand) +autograveyard=@damagefoeof(player) from(sorcery[red]|mystack):moveTo(ownerhand) +autograveyard=@damagefoeof(player) from(planeswalker[red]|mybattlefield):moveTo(ownerhand) text=Flying -- Haste -- Whenever an opponent is dealt damage by a red instant or sorcery spell you control or by a red planeswalker you control, return Chandra's Phoenix from your graveyard to your hand. mana={1}{R}{R} type=Creature @@ -14186,7 +15908,7 @@ toughness=2 [card] name=Chandra's Spitfire abilities=flying -auto=@noncombatdamaged(opponent):3/0 ueot +auto=@noncombatdamagefoeof(player):3/0 ueot text=Flying -- Whenever an opponent is dealt noncombat damage, Chandra's Spitfire gets +3/+0 until end of turn. mana={2}{R} type=Creature @@ -14399,6 +16121,17 @@ power=3 toughness=3 [/card] [card] +name=Charging Griffin +abilities=flying +auto=@combat(attacking) source(this):1/1 ueot +text=Whenever Charging Griffin attacks, it gets +1/+1 until end of turn. +mana={3}{W} +type=Creature +subtype=Griffin +power=2 +toughness=2 +[/card] +[card] name=Charging Rhino abilities=oneblocker text=Charging Rhino can't be blocked by more than one creature. @@ -14449,6 +16182,17 @@ mana={3} type=Artifact [/card] [card] +name=Chariot of Victory +auto={1}:equip +auto=first strike +auto=trample +auto=haste +text=Equipped creature has first strike, trample, and haste. +mana={3} +type=Artifact +subtype=Equipment +[/card] +[card] name=Charmbreaker Devils auto=@each my upkeep:moverandom(instant,sorcery) from(mygraveyard) to(myhand) auto=@movedTo(instant,sorcery|mystack):4/0 ueot @@ -14462,7 +16206,7 @@ toughness=4 [card] name=Charnelhoard Wurm abilities=trample -auto=@damaged(opponent) from(this):may moveTo(myhand) target(*|mygraveyard) +auto=@damagefoeof(player) from(this):may moveTo(myhand) target(*|mygraveyard) text=Trample -- Whenever Charnelhoard Wurm deals damage to an opponent, you may return target card from your graveyard to your hand. mana={4}{B}{R}{G} type=Creature @@ -14493,6 +16237,17 @@ power=3 toughness=3 [/card] [card] +name=Chasm Skulker +auto=@drawof(player):counter(1/1,1) +auto=@movedTo(this|Graveyard) from(myBattlefield):thisforeach(counter{1/1.1}):token(Squid,Creature Squid,1/1,islandwalk,blue) +text=Whenever you draw a card, put a +1/+1 counter on Chasm Skulker. -- When Chasm Skulker dies, put X 1/1 blue Squid creature tokens with islandwalk onto the battlefield, where X is the number of +1/+1 counters on Chasm Skulker. +mana={2}{U} +type=Creature +subtype=Squid Horror +power=1 +toughness=1 +[/card] +[card] name=Chastise target=creature[attacking] auto=destroy @@ -14510,6 +16265,49 @@ mana={G} type=Sorcery [/card] [card] +name=Chemister's Trick +alias=11000 +other={3}{U}{R} name(Overload) +target=creature|opponentbattlefield +auto=paidmana -2/0 +auto=paidmana mustattack +auto=overload -2/0 all(creature|opponentbattlefield) +auto=overload mustattack all(creature|opponentbattlefield) +text=Target creature you don't control gets -2/-0 until end of turn and attacks this turn if able. -- Overload {3}{U}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") +mana={U}{R} +type=Instant +[/card] +[card] +name=Chief of the Edge +auto=lord(other warrior|myBattlefield) 1/0 +text=Other Warrior creatures you control get +1/+0. +mana={W}{B} +type=Creature +subtype=Human Warrior +power=3 +toughness=2 +[/card] +[card] +name=Chief of the Foundry +auto=lord(other creature[artifact]|mybattlefield) 1/1 +text=Other artifact creatures you control get +1/+1. +mana={3} +type=Artifact Creature +subtype=Construct +power=2 +toughness=3 +[/card] +[card] +name=Chief of the Scale +auto=lord(other warrior|myBattlefield) 0/1 +text=Other Warrior creatures you control get +0/+1. +mana={W}{B} +type=Creature +subtype=Human Warrior +power=2 +toughness=3 +[/card] +[card] name=Chieftain en-Dal auto=@combat(attacking) source(this):all(creature[attacking]) first strike ueot text=Whenever Chieftain en-Dal attacks, attacking creatures gain first strike until end of turn. @@ -14586,8 +16384,8 @@ toughness=1 [/card] [card] name=Chill -auto=lord(*[red]|myhand) altercost(colorless, +2) -auto=lord(*[red]|opponenthand) altercost(colorless, +2) +auto=lord(*[red]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, +2) +auto=lord(*[red]|opponenthand,opponentlibrary,opponentgraveyard,opponentexile) altercost(colorless, +2) text=Red spells cost {2} more to cast. mana={1}{U} type=Enchantment @@ -14612,7 +16410,8 @@ type=Instant [card] name=Chilling Apparition auto={B}:regenerate -auto=@combatdamaged(opponent) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@combatdamagefoeof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@combatdamageof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ controller text={B}: Regenerate Chilling Apparition. -- Whenever Chilling Apparition deals combat damage to a player, that player discards a card. mana={2}{B} type=Creature @@ -14765,6 +16564,8 @@ toughness=2 [/card] [card] name=Cho-Manno's Blessing +alias=1000 +abilities=auraward target=creature abilities=flash auto=chooseacolor teach(creature) protection from(*[chosencolor]) chooseend @@ -14796,6 +16597,16 @@ text=Creatures you control get +1/+0 until end of turn. mana={B} type=Sorcery [/card] +[card] +name=Chosen by Heliod +target=creature +auto=0/2 +auto=draw:1 targetcontroller +text=Enchant creature. -- When Chosen by Heliod enters the battlefield, draw a card. -- Enchanted creature gets +0/+2. +mana={1}{W} +type=Enchantment +subtype=Aura +[/card] ###The 2 cards below should stay together (Flip Card)### [card] name=Chosen of Markov @@ -14902,6 +16713,16 @@ type=Enchantment subtype=Aura [/card] [card] +name=Chronicler of Heroes +auto=aslongas(creature[counter{1/1.1}]|mybattlefield) draw:1 controller +text=When Chronicler of Heroes enters the battlefield, draw a card if you control a creature with a +1/+1 counter on it. +mana={1}{G}{W} +type=Creature +subtype=Centaur Wizard +power=3 +toughness=3 +[/card] +[card] name=Chronomaton auto={1}{T}:counter(1/1,1) text={1}, {T}: Put a +1/+1 counter on Chronomaton. @@ -15054,6 +16875,17 @@ power=3 toughness=2 [/card] [card] +name=Circle of Elders +abilities=vigilance +auto={T}:Add{3} restriction{compare(powertotalinplay)~morethan~7} +text=Vigilance -- Formidable — {T}: Add {3} to your mana pool. Activate this ability only if creatures you control have total power 8 or greater. +mana={2}{G}{G} +type=Creature +subtype=Human Shaman +power=2 +toughness=4 +[/card] +[card] name=Circle of Flame auto=@each opponent blockers:damage:1 all(creature[-flying&attacking]) text=Whenever a creature without flying attacks you or a planeswalker you control, Circle of Flame deals 1 damage to that creature. @@ -15110,6 +16942,17 @@ mana={3}{W} type=Enchantment [/card] [card] +name=Citadel Castellan +abilities=vigilance +auto=this(cantargetcard(*[-renown]) transforms((,newability[@combatdamaged(player) from(this):counter(1/1.2) && becomes(renown) forever])) +text=Vigilance (Attacking doesn't cause this creature to tap.) -- Renown 2 (When this creature deals combat damage to a player, if it isn't renowned, put two +1/+1 counters on it and it becomes renowned.) +mana={1}{G}{W} +type=Creature +subtype=Human Knight +power=2 +toughness=3 +[/card] +[card] name=Citadel of Pain auto=@each my end:damage:type:land[-tapped]:mybattlefield controller auto=@each opponent end:damage:type:land[-tapped]:opponentbattlefield opponent @@ -15118,6 +16961,14 @@ mana={2}{R} type=Enchantment [/card] [card] +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. +mana={2}{W}{W} +type=Enchantment +[/card] +[card] name=Citanul Centaurs abilities=shroud auto=upcost[{3}{G};next upkeep] sacrifice @@ -15198,10 +17049,10 @@ type=Land [/card] [card] name=City of Solitude -auto=this(variable{controllerturn}) maxCast(*)0 opponent -auto=this(variable{controllerturn}) lord(*|opponentbattlefield) noactivatedability -auto=this(variable{opponentturn}) maxCast(*)0 controller -auto=this(variable{opponentturn}) lord(*|mybattlefield) noactivatedability +auto=this(variable{controllerturn}>0) maxCast(*)0 opponent +auto=this(variable{controllerturn}>0) lord(*|opponentbattlefield) noactivatedability +auto=this(variable{opponentturn}>0) maxCast(*)0 controller +auto=this(variable{opponentturn}>0) lord(*|mybattlefield) noactivatedability text=Players can cast spells and activate abilities only during their own turns. mana={2}{G} type=Enchantment @@ -15272,6 +17123,14 @@ mana={3}{R} type=Enchantment [/card] [card] +name=Clash of Wills +target=*|stack +auto=transforms((,newability[pay[[{value:storedx}]] name(pay {value} mana) donothing?fizzle])) forever +text=Counter target spell unless its controller pays {X}. +mana={X}{U} +type=Instant +[/card] +[card] name=Claustrophobia target=creature auto=tap @@ -15384,6 +17243,26 @@ power=1 toughness=1 [/card] [card] +name=Cleric of the Forward Order +auto=choice life:twicemyname controller +text=When Cleric of the Forward Order enters the battlefield, you gain 2 life for each creature you control named Cleric of the Forward Order. +mana={1}{W} +type=Creature +subtype=Human Cleric +power=2 +toughness=2 +[/card] +[card] +name=Clever Impersonator +auto=may copy NotATarget(*[-land]) +text=You may have Clever Impersonator enter the battlefield as a copy of any nonland permanent on the battlefield. +mana={2}{U}{U} +type=Creature +subtype=Shapeshifter +power=0 +toughness=0 +[/card] +[card] name=Clickslither abilities=haste auto={S(goblin|myBattlefield)}:2/2 && trample @@ -15457,7 +17336,7 @@ name=Cloak and Dagger auto={3}:equip auto=2/0 auto=shroud -auto=@movedto(creature[rogue]|battlefield):may all(trigger[to]) retarget +auto=@movedto(creature[rogue]|battlefield):may all(trigger[to]) rehook text=Equipped creature gets +2/+0 and has shroud. (It can't be the target of spells or abilities.) -- Whenever a Rogue creature enters the battlefield, you may attach Cloak and Dagger to it. -- Equip {3} mana={2} type=Tribal Artifact @@ -15501,6 +17380,16 @@ type=Enchantment subtype=Aura [/card] [card] +name=Cloaked Siren +abilities=flash,flying +text=Flash -- Flying +mana={3}{U} +type=Creature +subtype=Siren +power=3 +toughness=2 +[/card] +[card] name=Clock of Omens auto={T(artifact|myBattlefield)}{T(artifact|myBattlefield)}:untap target(artifact) text=Tap two untapped artifacts you control: Untap target artifact. @@ -15674,6 +17563,14 @@ power=0 toughness=0 [/card] [card] +name=Clone Legion +target=player +auto=clone all(creature|targetedpersonsbattlefield) +text=For each creature target player controls, put a token onto the battlefield that's a copy of that creature. +mana={7}{U}{U} +type=Sorcery +[/card] +[card] name=Close Quarters auto=@combat(blocked) source(creature|mybattlefield):damage:1 target(creature,player) text=Whenever a creature you control becomes blocked, Close Quarters deals 1 damage to target creature or player. @@ -15764,11 +17661,11 @@ auto=choice name(Creature) counter(0/0,1,CloudKeyC) all(this) auto=choice name(Enchantment) counter(0/0,1,CloudKeyE) all(this) auto=choice name(Instant) counter(0/0,1,CloudKeyI) all(this) auto=choice name(Sorcery) counter(0/0,1,CloudKeyS) all(this) -auto=this(counter{0/0.1.CloudKeyA}) lord(Artifact|myhand) altercost(colorless,-1) -auto=this(counter{0/0.1.CloudKeyC}) lord(Creature|myhand) altercost(colorless,-1) -auto=this(counter{0/0.1.CloudKeyE}) lord(Enchantment|myhand) altercost(colorless,-1) -auto=this(counter{0/0.1.CloudKeyI}) lord(Instant|myhand) altercost(colorless,-1) -auto=this(counter{0/0.1.CloudKeyS}) lord(Sorcery|myhand) altercost(colorless,-1) +auto=this(counter{0/0.1.CloudKeyA}) lord(Artifact|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) +auto=this(counter{0/0.1.CloudKeyC}) lord(Creature|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) +auto=this(counter{0/0.1.CloudKeyE}) lord(Enchantment|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) +auto=this(counter{0/0.1.CloudKeyI}) lord(Instant|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) +auto=this(counter{0/0.1.CloudKeyS}) lord(Sorcery|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) text=As Cloud Key enters the battlefield, choose artifact, creature, enchantment, instant, or sorcery. -- Spells you cast of the chosen type cost {1} less to cast. mana={3} type=Artifact @@ -16049,7 +17946,7 @@ type=Artifact [/card] [card] name=Coalition Victory -auto=aslongas(plains|myBattlefield)aslongas(island|myBattlefield)aslongas(swamp|myBattlefield)aslongas(mountain|myBattlefield)aslongas(forest|myBattlefield)aslongas(creature[white]|myBattlefield)aslongas(creature[blue]|myBattlefield)aslongas(creature[black]|myBattlefield)aslongas(creature[red]|myBattlefield)aslongas(creature[green]|myBattlefield) winGame +auto=if type(plains|mybattlefield)~morethan~0 then if type(island|mybattlefield)~morethan~0 then if type(swamp|mybattlefield)~morethan~0 then if type(mountain|mybattlefield)~morethan~0 then if type(forest|mybattlefield)~morethan~0 then if type(creature[white]|mybattlefield)~morethan~0 then if type(creature[blue]|mybattlefield)~morethan~0 then if type(creature[black]|mybattlefield)~morethan~0 then if type(creature[red]|mybattlefield)~morethan~0 then if type(creature[green]|mybattlefield)~morethan~0 then wingame controller else nothing text=You win the game if you control a land of each basic land type and a creature of each color. mana={3}{W}{U}{B}{R}{G} type=Sorcery @@ -16087,7 +17984,7 @@ toughness=3 [/card] [card] name=Coastal Piracy -auto=@combatdamaged(opponent) from(creature|myBattlefield):may draw:1 controller +auto=@combatdamagefoeof(player) from(creature|myBattlefield):may draw:1 controller text=Whenever a creature you control deals combat damage to an opponent, you may draw a card. mana={2}{U}{U} type=Enchantment @@ -16111,6 +18008,15 @@ power=1 toughness=1 [/card] [card] +name=Coat with Venom +target=creature|battlefield +auto=1/2 ueot +auto=deathtouch ueot +text=Target creature gets +1/+2 and gains deathtouch until end of turn. (Any amount of damage it deals to a creature is enough to destroy it.) +mana={B} +type=Instant +[/card] +[card] name=Cobalt Golem auto={1}{U}:flying text={1}{U}: Cobalt Golem gains flying until end of turn. @@ -16193,8 +18099,9 @@ type=Instant [/card] [card] name=Cognivore +alias=1111 abilities=flying -auto=foreach(instant|graveyard) 1/1 +anyzone=type:instant:graveyard/type:instant:graveyard cdaactive text=Flying -- Cognivore's power and toughness are each equal to the number of instant cards in all graveyards. mana={6}{U}{U} type=Creature @@ -16214,7 +18121,7 @@ toughness=1 [/card] [card] name=Coiling Woodworm -auto=foreach(forest|battlefield) 1/0 +anyzone=type:forest:battlefield/1 cdaactive text=Coiling Woodworm's power is equal to the number of Forests on the battlefield. mana={2}{G} type=Creature @@ -16252,6 +18159,7 @@ type=Artifact [/card] [card] name=Coldsteel Heart +alias=1000 auto=tap auto=chooseacolor {T}:add{chosencolor} chooseend text=Coldsteel Heart enters the battlefield tapped. -- As Coldsteel Heart enters the battlefield, choose a color. -- {T}: Add one mana of the chosen color to your mana pool. @@ -16277,6 +18185,14 @@ mana={3}{R} type=Enchantment [/card] [card] +name=Collateral Damage +target=creature,player +auto=damage:3 +text=As an additional cost to cast Collateral Damage, sacrifice a creature. -- Reckless Abandon deals 3 damage to target creature or player. +mana={R}{S(creature|mybattlefield)} +type=Instant +[/card] +[card] name=Collective Blessing auto=lord(creature|mybattlefield) 3/3 text=Creatures you control get +3/+3. @@ -16311,6 +18227,37 @@ mana={R}{G} type=Instant [/card] [card] +name=Colossal Whale +abilities=islandwalk +auto=@combat(attacking) source(this):may (blink)forsrc target(creature|opponentbattlefield) +text=Islandwalk. -- Whenever Colossal Whale attacks, you may exile target creature defending player controls until Colossal Whale leaves the battlefield. +mana={5}{U}{U} +type=Creature +subtype=Whale +power=5 +toughness=5 +[/card] +[card] +name=Colossodon Yearling +text=null +mana={2}{G} +type=Creature +subtype=Beast +power=2 +toughness=4 +[/card] +[card] +name=Colossus of Akros +abilities=defender,indestructible +auto=this(cantargetcard(*[-monstrous]) {10}:becomes(monstrous) forever && counter(1/1,10) && transforms((,newAbility[-defender],newability[trample])) forever +text=Defender, indestructible -- {10}: Monstrosity 10. (If this creature isn't monstrous, put ten +1/+1 counters on it and it becomes monstrous.) -- As long as Colossus of Akros is monstrous, it has trample and can attack as though it didn't have defender. +mana={8} +type=Artifact Creature +subtype=Golem +power=10 +toughness=10 +[/card] +[card] name=Colossus of Sardia abilities=doesnotuntap,trample auto={9}:untap myUpkeepOnly @@ -16400,7 +18347,7 @@ color=white [card] name=Commando Raid target=creature|mybattlefield -auto=transforms((,newability[@combatdamaged(opponent) from(this):may dynamicability target(creature|opponentbattlefield)])) ueot +auto=transforms((,newability[@combatdamageof(player) from(this):may dynamicability target(creature|mybattlefield)],newability[@combatdamagefoeof(player) from(this):may dynamicability target(creature|opponentbattlefield)])) ueot text=Until end of turn, target creature you control gains "When this creature deals combat damage to a player, you may have it deal damage equal to its power to target creature that player controls." mana={2}{R} type=Instant @@ -16494,6 +18441,16 @@ mana={2} type=Artifact [/card] [card] +name=Conclave Naturalists +auto=may destroy target(artifact,enchantment) +text=When Conclave Naturalists enters the battlefield, you may destroy target artifact or enchantment. +mana={4}{G} +type=Creature +subtype=Dryad +power=4 +toughness=4 +[/card] +[card] name=Concordant Crossroads auto=lord(creature) haste auto=@movedTo(enchantment[world]|battlefield):sacrifice all(this) @@ -16564,6 +18521,16 @@ mana={G}{G}{W} type=Instant [/card] [card] +name=Conifer Strider +abilities=opponentshroud +text=Hexproof (This creature can't be the target of spells or abilities your opponents control.) +mana={3}{G} +type=Creature +subtype=Elemental +power=5 +toughness=1 +[/card] +[card] name=Conjurer's Bauble auto={T}{S}:bottomoflibrary target(*|mygraveyard) && draw:1 controller text={T}, Sacrifice Conjurer's Bauble: Put up to one target card from your graveyard on the bottom of your library. Draw a card. @@ -16589,7 +18556,7 @@ subtype=Aura [card] name=Conquering Manticore abilities=flying -auto=target(creature|opponentbattlefield) transforms((,newability[moveTo(opponentbattlefield)],newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot once +auto=name(gain control) target(creature|opponentbattlefield) transforms((,newability[moveTo(opponentbattlefield)],newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot once text=Flying -- When Conquering Manticore enters the battlefield, gain control of target creature an opponent controls until end of turn. Untap that creature. It gains haste until end of turn. mana={4}{R}{R} type=Creature @@ -16617,9 +18584,20 @@ type=Enchantment subtype=Aura [/card] [card] +name=Consecrated by Blood +target=creature +auto=teach(creature) 2/2 +auto=teach(creature) flying +auto=teach(creature) {S(other creature|mybattlefield)}{S(other creature|mybattlefield)}:regenerate +text=Enchant creature -- Enchanted creature gets +2/+2 and has flying and "Sacrifice two other creatures: Regenerate this creature." (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.) +mana={2}{B}{B} +type=Enchantment +subtype=Aura +[/card] +[card] name=Consecrated Sphinx abilities=flying -auto=@drawn(opponent):may draw:2 controller +auto=@drawfoeof(player):may draw:2 controller text=Flying -- Whenever an opponent draws a card, you may draw two cards. mana={4}{U}{U} type=Creature @@ -16652,6 +18630,17 @@ mana={1}{G} type=Instant [/card] [card] +name=Constricting Sliver +auto=(blink)forsrc target(creature|opponentbattlefield) +auto=@movedto(sliver|mybattlefield):all(trigger[to]) transforms((,newability[(blink)forsrc target(creature|opponentbattlefield)])) forever +text=Sliver creatures you control have "When this creature enters the battlefield, you may exile target creature an opponent controls until this creature leaves the battlefield." +mana={5}{W} +type=Creature +subtype=Sliver +power=3 +toughness=3 +[/card] +[card] name=Constricting Tendrils target=creature auto=-3/-0 @@ -16669,6 +18658,18 @@ mana={1}{U}{B} type=Sorcery [/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])) +auto=this(cantargetcard(*[renown]) transforms((,newability[@combat(attacking) source(this):all(other creature[attacking]|mybattlefield) 1/1 ueot])) +text=First strike -- Renown 1 (When this creature deals combat damage to a player, if it isn't renowned, put a +1/+1 counter on it and it becomes renowned.) -- Whenever Consul's Lieutenant attacks, if it's renowned, other attacking creatures you control get +1/+1 until end of turn. +mana={W}{W} +type=Creature +subtype=Human Soldier +power=2 +toughness=1 +[/card] +[card] name=Consume Spirit target=creature,player auto=damage:castx @@ -16803,6 +18804,15 @@ text=Whenever a creature deals combat damage to you, that creature's controller type=Land [/card] [card] +name=Contradict +target=*|stack +auto=fizzle +auto=draw:1 controller +text=Counter target spell. Draw a card. +mana={3}{U}{U} +type=Instant +[/card] +[card] name=Control Magic target=creature alias=1194 @@ -16903,6 +18913,15 @@ mana={2}{U} type=Instant [/card] [card] +name=Coordinated Assault +target=creature +auto=1/0 ueot +auto=first strike ueot +text=Up to two target creatures each get +1/+0 and gain first strike until end of turn. +mana={R} +type=Instant +[/card] +[card] name=Coordinated Barrage target=creature[attacking;blocking] auto=chooseatype damage:type:*[chosentype]:mybattlefield chooseend @@ -17014,6 +19033,17 @@ text=Coral Atoll enters the battlefield tapped. -- When Coral Atoll enters the b type=Land [/card] [card] +name=Coral Barrier +abilities=defender +auto=token(Squid,Creature Squid,1/1,islandwalk,blue) controller +text=Defender (This creature can't attack.) -- When Coral Barrier enters the battlefield, put a 1/1 blue Squid creature token with islandwalk onto the battlefield. (It can't be blocked as long as defending player controls an Island.) +mana={2}{U} +type=Creature +subtype=Wall +power=1 +toughness=3 +[/card] +[card] name=Coral Eel mana={1}{U} type=Creature @@ -17155,6 +19185,16 @@ power=3 toughness=3 [/card] [card] +name=Corpse Hauler +auto={2}{B}{S}:moveTo(ownerhand) target(other creature|mygraveyard) +text={2}{B}, Sacrifice Corpse Hauler. Return another target creature card from your graveyard to your hand. +mana={3}{B} +type=Creature +subtype=Human Rogue +power=2 +toughness=1 +[/card] +[card] name=Corpse Lunge target=creature auto=damage:storedpower @@ -17358,6 +19398,18 @@ mana={3}{U}{U} type=Instant [/card] [card] +name=Counterflux +alias=11000 +other={1}{U}{U}{R} name(Overload) +abilities=nofizzle +target=*|opponentstack +auto=paidmana fizzle +auto=overload fizzle all(*|opponentstack) +text=Counterflux can't be countered by spells or abilities. -- Counter target spell you don't control. -- Overload {1}{U}{U}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") +mana={U}{U}{R} +type=Instant +[/card] +[card] name=Counterintelligence target=creature auto=moveTo(ownerhand) @@ -17366,6 +19418,14 @@ mana={2}{U}{U} type=Sorcery [/card] [card] +name=Countermand +target=*|stack +auto=fizzle && deplete:4 targetcontroller +text=Counter target spell. Its controller puts the top four cards of his or her library into his or her graveyard. +mana={2}{U}{U} +type=Instant +[/card] +[card] name=Counterspell target=*|stack auto=fizzle @@ -17533,6 +19593,16 @@ mana={1}{R} type=Enchantment [/card] [card] +name=Crackling Triton +auto={2}{R}{S}:damage:2 target(creature,player) +text={2}{R}, Sacrifice Crackling Triton: Crackling Triton deals 2 damage to target creature or player. +mana={2}{U} +type=Creature +subtype=Merfolk Wizard +power=2 +toughness=3 +[/card] +[card] name=Cradle Guard abilities=trample auto=upcost[{1}{G}{G};next upkeep] sacrifice @@ -17545,7 +19615,7 @@ toughness=4 [/card] [card] name=Cradle of Vitality -auto=@lifed(controller):pay({1}{W}) counter(1/1,thatmuch) target(creature) +auto=@lifeof(player):pay({1}{W}) counter(1/1,thatmuch) target(creature) text=Whenever you gain life, you may pay {1}{W}. If you do, put a +1/+1 counter on target creature for each 1 life you gained. mana={3}{W} type=Enchantment @@ -17590,9 +19660,16 @@ power=4 toughness=4 [/card] [card] +name=Cranial Archive +auto={2}{E}:name(shuffle graveyard) target(player) donothing && moveto(ownerlibrary) and!(shuffle && draw:1 controller)! all(*|targetedpersonsgraveyard) +text={2}, Exile Cranial Archive: Target player shuffles his or her graveyard into his or her library. Draw a card. +mana={2} +type=Artifact +[/card] +[card] name=Cranial Plating auto=foreach(artifact|mybattlefield) 1/0 -auto={B}{B}:name(attach) retarget target(creature|mybattlefield) +auto={B}{B}:name(attach) rehook target(creature|mybattlefield) auto={1}:equip text=Equipped creature gets +1/+0 for each artifact you control. -- {B}{B}: Attach Cranial Plating to target creature you control. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) mana={2} @@ -17640,6 +19717,17 @@ power=3 toughness=4 [/card] [card] +name=Crater Elemental +auto={R}{T}{S}:damage:4 target(creature) +auto={2}{R}:name(formidable) transforms((,setpower=8)) restriction{compare(powertotalinplay)~morethan~7} ueot +text={R}, {T}, Sacrifice Crater Elemental: Crater Elemental deals 4 damage to target creature. -- Formidable — {2}{R}: Crater Elemental has base power 8 until end of turn. Activate this ability only if creatures you control have total power 8 or greater. +mana={2}{R} +type=Creature +subtype=Elemental +power=0 +toughness=6 +[/card] +[card] name=Crater Hellion auto=damage:4 all(other creature) auto=upcost[{4}{R}{R};next upkeep] sacrifice @@ -17651,6 +19739,15 @@ power=6 toughness=6 [/card] [card] +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. +mana={R}{X} +type=Sorcery +[/card] +[card] name=Craterhoof Behemoth abilities=haste auto=all(creature|mybattlefield) type:creature:mybattlefield/type:creature:mybattlefield && trample all(creature|mybattlefield) @@ -18048,7 +20145,8 @@ type=Instant [card] name=Crosis, the Purger abilities=flying -auto=@combatdamaged(player) from(this):pay({2}{B}) activatechooseacolor all(*[chosencolor]|opponenthand) reject activatechooseend +auto=@combatdamagefoeof(player) from(this):pay({2}{B}) activatechooseacolor all(*[chosencolor]|opponenthand) reject activatechooseend +auto=@combatdamageof(player) from(this):pay({2}{B}) activatechooseacolor all(*[chosencolor]|myhand) reject activatechooseend text=Flying -- Whenever Crosis, the Purger deals combat damage to a player, you may pay {2}{B}. If you do, choose a color, then that player reveals his or her hand and discards all cards of that color. mana={3}{U}{B}{R} type=Legendary Creature @@ -18105,7 +20203,8 @@ toughness=1 [/card] [card] name=Crosstown Courier -auto=@combatdamaged(player) from(this):deplete:thatmuch opponent +auto=@combatdamagefoeof(player) from(this):deplete:thatmuch opponent +auto=@combatdamageof(player) from(this):deplete:thatmuch controller text=Whenever Crosstown Courier deals combat damage to a player, that player puts that many cards from the top of his or her library into his or her graveyard. mana={1}{U} type=Creature @@ -18168,7 +20267,7 @@ toughness=4 [card] name=Crowd of Cinders abilities=fear -auto=foreach(*[black]|myBattlefield) 1/1 +anyzone=type:*[black]:myBattlefield/type:*[black]:myBattlefield cdaactive text=Fear (This creature can't be blocked except by artifact creatures and/or black creatures.) -- Crowd of Cinders's power and toughness are each equal to the number of black permanents you control. mana={3}{B} type=Creature @@ -18308,6 +20407,36 @@ mana={4}{B} type=Instant [/card] [card] +name=Cruel Sadist +auto={L}{B}{T}:counter(1/1,1) +auto={2}{B}{T}{C(1/1,-1)}:name(Remove 1 Counters) damage:1 target(creature) +auto={2}{B}{T}{C(1/1,-2)}:name(Remove 2 Counters) damage:2 target(creature) +auto={2}{B}{T}{C(1/1,-3)}:name(Remove 3 Counters) damage:3 target(creature) +auto={2}{B}{T}{C(1/1,-4)}:name(Remove 4 Counters) damage:4 target(creature) +auto={2}{B}{T}{C(1/1,-5)}:name(Remove 5 Counters) damage:5 target(creature) +auto={2}{B}{T}{C(1/1,-6)}:name(Remove 6 Counters) damage:6 target(creature) +auto={2}{B}{T}{C(1/1,-7)}:name(Remove 7 Counters) damage:7 target(creature) +auto={2}{B}{T}{C(1/1,-8)}:name(Remove 8 Counters) damage:8 target(creature) +auto={2}{B}{T}{C(1/1,-9)}:name(Remove 9 Counters) damage:9 target(creature) +auto={2}{B}{T}{C(1/1,-10)}:name(Remove 10 Counters) damage:10 target(creature) +auto={2}{B}{T}{C(1/1,-11)}:name(Remove 11 Counters) damage:11 target(creature) +auto={2}{B}{T}{C(1/1,-12)}:name(Remove 12 Counters) damage:12 target(creature) +auto={2}{B}{T}{C(1/1,-13)}:name(Remove 13 Counters) damage:13 target(creature) +auto={2}{B}{T}{C(1/1,-14)}:name(Remove 14 Counters) damage:14 target(creature) +auto={2}{B}{T}{C(1/1,-15)}:name(Remove 15 Counters) damage:15 target(creature) +auto={2}{B}{T}{C(1/1,-16)}:name(Remove 16 Counters) damage:16 target(creature) +auto={2}{B}{T}{C(1/1,-17)}:name(Remove 17 Counters) damage:17 target(creature) +auto={2}{B}{T}{C(1/1,-18)}:name(Remove 18 Counters) damage:18 target(creature) +auto={2}{B}{T}{C(1/1,-19)}:name(Remove 19 Counters) damage:19 target(creature) +auto={2}{B}{T}{C(1/1,-20)}:name(Remove 20 Counters) damage:20 target(creature) +text={B}{T} Pay 1 life: Put a +1/+1 counter on Cruel Sadist. -- {2}{B}{T} Remove X +1/+1 counters from Cruel Sadist: Cruel Sadist deals X damage to target creature. +mana={B} +type=Creature +subtype=Human Assassin +power=1 +toughness=1 +[/card] +[card] name=Cruel Tutor auto=moveTo(ownerlibrary) notatarget(*|mylibrary) auto=life:-2 controller @@ -18373,7 +20502,7 @@ type=Enchantment [/card] [card] name=Crusader of Odric -auto=foreach(creature|mybattlefield) 1/1 +anyzone=type:creature:mybattlefield/type:creature:mybattlefield cdaactive text=Crusader of Odric's power and toughness are each equal to the number of creatures you control. mana={2}{W} type=Creature @@ -18445,6 +20574,14 @@ type=Tribal Instant subtype=Giant [/card] [card] +name=Crux of Fate +auto=choice name(destroy dragons) destroy all(creature[dragon]) +auto=choice name(destroy non-dragons) destroy all(creature[-dragon]) +text=Choose one: -- Destroy all Dragon creatures. -- Destroy all non-Dragon creatures. +mana={3}{B}{B} +type=Sorcery +[/card] +[card] name=Cryoclasm target=plains,island auto=destroy @@ -18509,7 +20646,7 @@ toughness=1 [card] name=Crypt Ghast auto=@movedto(*|mystack):pay({WB}) life:-1 opponent && life:1 controller -auto=@tappedformana(swamp|mybattlefield):Add{B} +auto=lord(swamp|mybattlefield) transforms((,newability[produceextra:{B}])) text=Extort (Whenever you cast a spell, you may pay {WB}. If you do, each opponent loses 1 life and you gain that much life.) -- Whenever you tap a Swamp for mana, add {B} to your mana pool (in addition to the mana the land produces). mana={3}{B} type=Creature @@ -18756,6 +20893,17 @@ toughness=2 [/card] ###The 2 cards above should stay together (Flip Card)### [card] +name=Cunning Breezedancer +abilities=flying +auto=@movedto(*[-creature]|mystack):2/2 ueot +text=Flying -- Whenever you cast a noncreature spell, Cunning Breezedancer gets +2/+2 until end of turn. +mana={4}{W}{U} +type=Creature +subtype=Dragon +power=4 +toughness=4 +[/card] +[card] name=Cunning Giant auto=@combat(notblocked,turnlimited) source(this):may name(assign combat damage to a creature defending player controls) thisforeach(power>=1) damage:1 target(creature) && fog from(this) text=If Cunning Giant is unblocked, you may have it assign its combat damage to a creature defending player controls. @@ -18777,6 +20925,16 @@ power=0 toughness=1 [/card] [card] +name=Cunning Strike +target=creature +auto=damage:2 +auto=damage:2 target(player) +auto=draw:1 +text=Cunning Strike deals 2 damage to target creature and 2 damage to target player. -- Draw a card. +mana={3}{U}{R} +type=Instant +[/card] +[card] name=Cuombajj Witches auto={T}:damage:1 target(creature,player) && ability$!target(creature,player|mybattlefield) damage:1!$ opponent text={T}: Cuombajj Witches deals 1 damage to target creature or player and 1 damage to target creature or player of an opponent's choice. @@ -18797,7 +20955,7 @@ type=Instant [card] name=Curiosity target=creature -auto=@damaged(player) from(mytgt):may draw:1 controller +auto=@damagefoeof(player) from(mytgt):may draw:1 controller text=Enchant creature -- Whenever enchanted creature deals damage to an opponent, you may draw a card. mana={U} type=Enchantment @@ -18893,6 +21051,14 @@ type=Enchantment subtype=Aura Curse [/card] [card] +name=Curse of the Swine +target=creature|battlefield +auto=moveto(exile) && token(Boar,Creature Boar,2/2,green) targetcontroller +text=Exile X target creatures. For each creature exiled this way, its controller puts a 2/2 green Boar creature token onto the battlefield. +mana={X}{U}{U} +type=Sorcery +[/card] +[card] name=Curse of Thirst target=player auto=@each targetedplayer upkeep:damage:targetedcurses @@ -18903,6 +21069,7 @@ subtype=Aura Curse [/card] [card] name=Curse of Wizardry +alias=1000 auto=chooseacolor transforms((,newability[@movedto(*[chosencolor]|mystack):life:-1 controller],newability[@movedto(*[chosencolor]|opponentstack):life:-1 opponent])) chooseend text=As Curse of Wizardry enters the battlefield, choose a color. -- Whenever a player casts a spell of the chosen color, that player loses 1 life. mana={2}{B}{B} @@ -18976,8 +21143,21 @@ mana={2} type=Artifact [/card] [card] +name=Custodian of the Trove +abilities=defender +auto=tap +text=Defender -- Custodian of the Trove enters the battlefield tapped. +mana={3} +type=Artifact Creature +subtype=Golem +power=2 +toughness=5 +[/card] +#opponent not targetted +[card] name=Custody Battle target=creature +auto=teach(creature) transforms((,newability[@each my upkeep:ability$!name(sacrifice or exchange) if type(land|mybattlefield)~morethan~0 then choice sacrifice notatarget(land|mybattlefield) _ choice name(exchange controller) moveto(opponentbattlefield) all(mystored)!$ controller])) text=Enchant creature -- Enchanted creature has "At the beginning of your upkeep, target opponent gains control of this creature unless you sacrifice a land." mana={1}{R} type=Enchantment @@ -19017,6 +21197,26 @@ power=4 toughness=1 [/card] [card] +name=Cutthroat Maneuver +target=creature +auto=1/1 ueot +auto=lifelink ueot +text=Up to two target creatures each get +1/+1 and gain lifelink until end of turn. +mana={3}{B} +type=Instant +[/card] +[card] +name=Cyclonic Rift +alias=11000 +other={6}{U} name(Overload) +target=*[-land]|opponentbattlefield +auto=overload moveto(ownerhand) all(*[-land]|opponentbattlefield) +auto=paidmana moveto(ownerhand) +text=Return target nonland permanent you don't control to its owner's hand. -- Overload {6}{U} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") +mana={1}{U} +type=Instant +[/card] +[card] name=Cyclopean Mummy auto=@movedTo(this|graveyard) from(battlefield):moveto(exile) text=When Cyclopean Mummy dies, exile Cyclopean Mummy. @@ -19052,6 +21252,16 @@ power=4 toughness=4 [/card] [card] +name=Cyclops of Eternal Fury +auto=lord(creature|mybattlefield) haste +text=Creatures you control have haste. +mana={4}{R}{R} +type=Enchantment Creature +subtype=Cyclops +power=5 +toughness=3 +[/card] +[card] name=Cyclops of One-Eyed Pass text= mana={2}{R}{R} @@ -19061,6 +21271,17 @@ power=5 toughness=2 [/card] [card] +name=Cyclops Tyrant +abilities=intimidate +auto=cantbeblockerof(creature[power>=2]) +text=Intimidate. -- Cyclops Tyrant can't block creatures with power 2 or less. +mana={5}{R} +type=Creature +subtype=Cyclops +power=3 +toughness=4 +[/card] +[card] name=Cylian Elf mana={1}{G} type=Creature @@ -19175,7 +21396,7 @@ subtype=Aura [/card] [card] name=Dakkon Blackblade -auto=foreach(land|myBattlefield) 1/1 +anyzone=type:land:myBattlefield/type:land:myBattlefield cdaactive text=Dakkon Blackblade's power and toughness are each equal to the number of lands you control. mana={2}{W}{U}{U}{B} type=Legendary Creature @@ -19238,7 +21459,7 @@ toughness=1 [/card] [card] name=Dakmor Sorceress -auto=foreach(swamp|myBattlefield) 1/0 +anyzone=type:swamp:myBattlefield/4 cdaactive text=Dakmor Sorceress's power is equal to the number of Swamps you control. mana={5}{B} type=Creature @@ -19265,6 +21486,15 @@ power=4 toughness=4 [/card] [card] +name=Damnable Pact +target=player +auto=draw:X targetedplayer +auto=life:-X targetedplayer +text=Target player draws X cards and loses X life. +mana={X}{B}{B} +type=Sorcery +[/card] +[card] name=Damnation auto=bury all(creature) text=Destroy all creatures. They can't be regenerated. @@ -19300,6 +21530,17 @@ type=Sorcery subtype=Arcane [/card] [card] +name=Dance of the Skywise +target=creature|mybattlefield +auto=ueot loseabilities +auto=flying ueot +auto=ueot transforms((,setpower=4,settoughness=4)) +auto=ueot transforms((Dragon Illusion,blue)) +text=Until end of turn, target creature you control becomes a blue Dragon Illusion with base power and toughness 4/4, loses all abilities, and gains flying. +mana={1}{U} +type=Instant +[/card] +[card] name=Dancing Scimitar abilities=flying text=Flying (This creature can't be blocked except by creatures with flying or reach.) @@ -19350,7 +21591,7 @@ toughness=4 [/card] [card] name=Darien, King of Kjeldor -auto=@damaged(controller):may token(Soldier,Creature Soldier,1/1,white)*thatmuch +auto=@damageof(player):may token(Soldier,Creature Soldier,1/1,white)*thatmuch text=Whenever you're dealt damage, you may put that many 1/1 white Soldier creature tokens onto the battlefield. mana={4}{W}{W} type=Legendary Creature @@ -19438,6 +21679,14 @@ mana={2}{B} type=Instant [/card] [card] +name=Dark Betrayal +target=creature[black] +auto=destroy +text=Destroy target black creature. +mana={B} +type=Instant +[/card] +[card] name=Darkblast target=creature auto=-1/-1 @@ -19504,6 +21753,24 @@ mana={4}{B}{B} type=Sorcery [/card] [card] +name=Dark Dabbling +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. +mana={2}{B} +type=Instant +[/card] +[card] +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. +mana={3}{B}{B} +type=Sorcery +[/card] +[card] name=Dark Privilege target=creature auto=1/1 @@ -19514,6 +21781,13 @@ type=Enchantment subtype=Aura [/card] [card] +name=Dark Prophecy +auto=@movedTo(creature|mygraveyard) from(battlefield):draw:1 controller && life:-1 +text=Whenever a creature you control dies, you draw a card and lose 1 life. +mana={B}{B}{B} +type=Enchantment +[/card] +[card] name=Dark Revenant autograveyard=moveTo(ownerlibrary) text=Flying -- When Dark Revenant dies, put it on top of its owner's library. @@ -19651,8 +21925,7 @@ type=Artifact Land [/card] [card] name=Darksteel Colossus -abilities=trample,indestructible -autograveyard=moveTo(ownerlibrary) && shuffle +abilities=trample,indestructible,shufflelibrarydeath text=Trample -- Darksteel Colossus is indestructible. -- If Darksteel Colossus would be put into a graveyard from anywhere, reveal Darksteel Colossus and shuffle it into its owner's library instead. mana={11} type=Artifact Creature @@ -19702,7 +21975,7 @@ type=Artifact [card] name=Darksteel Juggernaut abilities=mustattack,indestructible -auto=foreach(artifact|mybattlefield) 1/1 +anyzone=type:artifact:mybattlefield/type:artifact:mybattlefield cdaactive text=Darksteel Juggernaut's power and toughness are equal to the number of artifacts you control. -- Darksteel Juggernaut is indestructible and attacks each turn if able. mana={5} type=Artifact Creature @@ -19877,7 +22150,7 @@ toughness=1 [/card] [card] name=Daru Warchief -auto=lord(soldier|myhand) altercost(colorless, -1) +auto=lord(soldier|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) auto=lord(soldier|myBattlefield) 1/2 text=Soldier spells you cast cost {1} less to cast. -- Soldier creatures you control get +1/+2. mana={2}{W}{W} @@ -19898,8 +22171,7 @@ toughness=3 [/card] [card] name=Dauntless Dourbark -auto=foreach(forest|myBattlefield) 1/1 -auto=foreach(treefolk|myBattlefield) 1/1 +anyzone=pdauntless/pdauntless cdaactive auto=aslongas(other treefolk|myBattlefield) trample text=Dauntless Dourbark's power and toughness are each equal to the number of Forests you control plus the number of Treefolk you control. -- Dauntless Dourbark has trample as long as you control another Treefolk. mana={3}{G} @@ -19919,6 +22191,25 @@ power=3 toughness=3 [/card] [card] +name=Dauntless Onslaught +target=creature +auto=2/2 ueot +text=Up to two target creatures each get +2/+2 until end of turn. +mana={2}{W} +type=Instant +[/card] +[card] +name=Dauntless River Marshal +auto=aslongas(Island|myBattlefield) 1/1 +auto={3}{U}:tap target(creature) +text=Dauntless River Marshal gets +1/+1 as long as you control an Island. -- {3}{U}: Tap target creature. +mana={1}{W} +type=Creature +subtype=Human Soldier +power=2 +toughness=1 +[/card] +[card] name=Dauthi Cutthroat abilities=shadow auto={1}{B}{T}:destroy target(creature[shadow]) @@ -20024,7 +22315,7 @@ toughness=1 [card] name=Dauthi Warlord abilities=shadow -auto=foreach(creature[shadow]|battlefield) 1/0 +anyzone=type:creature[shadow]:battlefield/1 cdaactive text=Shadow (This creature can block or be blocked by only creatures with shadow.) -- Dauthi Warlord's power is equal to the number of creatures with shadow on the battlefield. mana={1}{B} type=Creature @@ -20051,6 +22342,7 @@ text=At the beginning of your upkeep, you lose 1 life. -- At the beginning of yo mana={2}{B}{B}{B} type=Enchantment [/card] +#tappedformana stack...produceextra:selectmana don't support combination of mana at the moment since it a mayability not a menuability [card] name=Dawn's Reflection target=land @@ -20061,6 +22353,17 @@ type=Enchantment subtype=Aura [/card] [card] +name=Dawnbringer Charioteers +abilities=flying,lifelink +auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):counter(1/1,1) +text=Flying, lifelink -- Heroic —- Whenever you cast a spell that targets Dawnbringer Charioteers, put a +1/+1 counter on Dawnbringer Charioteers. +mana={2}{W}{W} +type=Creature +subtype=Human Soldier +power=2 +toughness=4 +[/card] +[card] name=Dawnfluke abilities=flash other={W} name(Evoke) @@ -20097,7 +22400,8 @@ type=Sorcery name=Dawning Purist facedown={3} autofacedown={1}{W}:morph -auto=@combatdamaged(opponent) from(this):may destroy target(enchantment|opponentbattlefield) +auto=@combatdamagefoeof(player) from(this):may destroy target(enchantment|opponentbattlefield) +auto=@combatdamageof(player) from(this):may destroy target(enchantment|mybattlefield) text=Whenever Dawning Purist deals combat damage to a player, you may destroy target enchantment that player controls. -- Morph {1}{W} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) mana={2}{W} type=Creature @@ -20127,6 +22431,16 @@ power=1 toughness=1 [/card] [card] +name=Dawnstrike Paladin +abilities=vigilance,lifelink +text=Vigilance. -- Lifelink. +mana={3}{W}{W} +type=Creature +subtype=Human Knight +power=2 +toughness=4 +[/card] +[card] name=Dawntreader Elk auto={G}{S}:moveTo(myBattlefield) and!(tap)! target(basic|mylibrary) && shuffle text={G}, Sacrifice Dawntrader Elk: Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. @@ -20204,6 +22518,17 @@ mana={1}{U} type=Instant [/card] [card] +name=Dazzling Ramparts +abilities=defender +auto={1}{W}{T}:tap target(creature) +text=Defender -- {1}{W}, {T}: Tap target creature. +mana={4}{W} +type=Creature +subtype=Wall +power=0 +toughness=7 +[/card] +[card] name=Dead Reveler auto=may counter(1/1,1) auto=this(counter{1/1.1}>=1) cantblock @@ -20252,6 +22577,16 @@ power=5 toughness=5 [/card] [card] +name=Deadbridge Shaman +auto=@movedto(mygraveyard) from(this|mybattlefield):choice target(opponent) ability$!name(discard) notatarget(*|myhand) reject !$ targetedplayer +text=When Deadbridge Shaman dies, target opponent discards a card. +mana={2}{B} +type=Creature +subtype=Elf Shaman +power=3 +toughness=1 +[/card] +[card] name=Deadeye Navigator auto=soulbond {1}{U}:(blink) abilities=soulbond @@ -20301,6 +22636,15 @@ power=1 toughness=2 [/card] [card] +name=Deadly Wanderings +auto=aslongas(creature|mybattlefield) lord(creature|mybattlefield) 2/0 <2 +auto=aslongas(creature|mybattlefield) lord(creature|mybattlefield) deathtouch <2 +auto=aslongas(creature|mybattlefield) lord(creature|mybattlefield) lifelink <2 +text=As long as you control exactly one creature, that creature gets +2/+0 and has deathtouch and lifelink. +mana={3}{B}{B} +type=Enchantment +[/card] +[card] name=Deadshot target=creature auto=tap @@ -20479,6 +22823,14 @@ type=Instant subtype=Arcane [/card] [card] +name=Death Frenzy +auto=emblem transforms((,newability[@movedto(creature|graveyard) from(battlefield):life:1 controller])) ueot +auto=all(creature) -2/-2 ueot +text=All creatures get -2/-2 until end of turn. Whenever a creature dies this turn, you gain 1 life. +mana={3}{B}{G} +type=Sorcery +[/card] +[card] name=Death Grasp target=creature,player auto=damage:X @@ -20630,6 +22982,17 @@ power=13 toughness=13 [/card] [card] +name=Deathbellow Raider +abilities=mustattack +auto={2}{B}:regenerate +text=Deathbellow Raider attacks each turn if able. --{2}{B}: Regenerate Deathbellow Raider. +mana={1}{R} +type=Creature +subtype=Minotaur Berserker +power=2 +toughness=3 +[/card] +[card] name=Deathbringer Liege auto=lord(other creature[black]|myBattlefield) 1/1 auto=lord(other creature[white]|myBattlefield) 1/1 @@ -20643,6 +23006,17 @@ power=3 toughness=4 [/card] [card] +name=Deathbringer Regent +abilities=flying +auto=if type(other creature|battlefield)~morethan~4 then destroy all(other creature|battlefield) +text=Flying -- When Deathbringer Regent enters the battlefield, if you cast it from your hand and there are five or more other creatures on the battlefield, destroy all other creatures. +mana={5}{B}{B} +type=Creature +subtype=Dragon +power=5 +toughness=6 +[/card] +[card] name=Deathbringer Thoctar text=Whenever another creature dies, you may put a +1/+1 counter on Deathbringer Thoctar. -- Remove a +1/+1 counter from Deathbringer Thoctar: Deathbringer Thoctar deals 1 damage to target creature or player. mana={4}{B}{R} @@ -20675,6 +23049,16 @@ power=4 toughness=3 [/card] [card] +name=Deathgaze Cockatrice +abilities=flying,deathtouch +text=Flying. -- Deathtouch. +mana={2}{B}{B} +type=Creature +subtype=Cockatrice +power=2 +toughness=2 +[/card] +[card] name=Deathgreeter auto=@movedTo(graveyard) from(other creature|battlefield):may life:1 text=Whenever another creature dies, you may gain 1 life. @@ -20741,7 +23125,7 @@ toughness=5 [card] name=Deathrender auto=+2/+2 -auto=@movedto(mytgt|graveyard):may moveto(mybattlefield) target(creature|myhand) && all(this) retarget +auto=@movedto(mytgt|graveyard):may moveto(mybattlefield) target(creature|myhand) and!(rehook)! auto={2}:equip text=Equipped creature gets +2/+2. -- Whenever equipped creature is put into a graveyard, you may put a creature card from your hand onto the battlefield and attach Deathrender to it. -- Equip {2} mana={4} @@ -20780,8 +23164,17 @@ power=1 toughness=1 [/card] [card] +name=Debilitating Injury +target=creature +auto=-2/-2 +text=Enchant creature (Target a creature as you cast this. This card enters the battlefield attached to that creature.) -- Enchanted creature gets -2/-2. +mana={1}{B} +type=Enchantment +subtype=Aura +[/card] +[card] name=Debt to the Deathless -auto=@lifeloss(opponent):life:thatmuch controller +auto=@lifelostfoeof(player):life:thatmuch controller auto=life:-twiceX opponent text=Each opponent loses two times X life. You gain life equal to the life lost this way. mana={X}{W}{W}{B}{B} @@ -21002,6 +23395,16 @@ power=5 toughness=5 [/card] [card] +name=Deep-Sea Terror +auto=aslongas(*|mygraveyard) cantattack <7 +text=Deep-Sea Terror can't attack unless there are seven or more cards in your graveyard. +mana={4}{U}{U} +type=Creature +subtype=Serpent +power=6 +toughness=6 +[/card] +[card] name=Deep-Slumber Titan abilities=doesnotuntap auto=tap @@ -21167,6 +23570,22 @@ type=Enchantment subtype=Aura [/card] [card] +name=Defeat +target=creature[power<=2]|battlefield +auto=destroy +text=Destroy target creature with power 2 or less. +mana={1}{B} +type=Sorcery +[/card] +[card] +name=Defend the Hearth +auto=preventAllcombatDamage controller ueot +auto=preventAllcombatDamage opponent ueot +text=Prevent all combat damage that would be dealt to players this turn. +mana={1}{G} +type=Instant +[/card] +[card] name=Defender en-Vec auto=fading:4 text=Fading 4 (This creature enters the battlefield with four fade counters on it. At the beginning of your upkeep, remove a fade counter from it. If you can't, sacrifice it.) -- Remove a fade counter from Defender en-Vec: Prevent the next 2 damage that would be dealt to target creature or player this turn. @@ -21254,6 +23673,17 @@ power=1 toughness=1 [/card] [card] +name=Defiant Ogre +auto=choice name(+1/+1 counter) counter(1/1,1) +auto=choice name(destroy artifact) target(artifact) destroy +text=When Defiant Ogre enters the battlefield, choose one: -- Put a +1/+1 counter on Defiant Ogre. -- Destroy target artifact. +mana={5}{R} +type=Creature +subtype=Ogre Warrior +power=3 +toughness=5 +[/card] +[card] name=Defiant Stand target=creature auto=1/3 @@ -21264,6 +23694,15 @@ mana={1}{W} type=Instant [/card] [card] +name=Defiant Strike +target=creature +auto=1/0 ueot +auto=draw:1 controller +text=Target creature gets +1/+0 until end of turn. -- Draw a card. +mana={W} +type=Instant +[/card] +[card] name=Defiant Vanguard auto=@combat(blocking) source(this):all(trigger[to]) phaseaction[combatends once] destroy auto=@combat(blocking) source(this) from(creature):all(trigger[from]) phaseaction[combatends once] destroy @@ -21362,6 +23801,17 @@ type=Enchantment subtype=Aura [/card] [card] +name=Deicide +target=enchantment|battlefield +auto=moveTo(exile) +auto=if cantargetcard(*[god]|battlefield) then all(*[share!name!]|targetcontrollerhand) moveto(exile) +auto=if cantargetcard(*[god]|battlefield) then all(*[share!name!]|targetcontrollerlibrary) moveto(exile) +auto=if cantargetcard(*[god]|battlefield) then all(*[share!name!]|targetcontrollergraveyard) moveto(exile) +text=Exile target enchantment. If the exiled card is a God card, search its controller's graveyard, hand, and library for any number of cards with the same name as that card and exile them, then that player shuffles his or her library. +mana={1}{W} +type=Instant +[/card] +[card] name=Deity of Scars abilities=trample auto=counter(-1/-1,2) @@ -21606,6 +24056,20 @@ mana={W} type=Instant [/card] [card] +name=Den Protector +abilities=strong +facedown={3} +autofacedown={1}{G}:morph +autofaceup=counter(1/1,1) +autofaceup=moveto(ownerhand) target(*|mygraveyard) +text=Creatures with power less than Den Protector's power can't block it. Megamorph {1}{G} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) -- When Den Protector is turned face up, return target card from your graveyard to your hand. +mana={1}{G} +type=Creature +subtype=Human Warrior +power=2 +toughness=1 +[/card] +[card] name=Denizen of the Deep auto=moveto(ownerHand) all(other creature|myBattlefield) text=When Denizen of the Deep enters the battlefield, return each other creature you control to its owner's hand. @@ -21683,7 +24147,7 @@ toughness=1 [/card] [card] name=Derelor -auto=lord(*[black]|myhand) altercost(black, +1) +auto=lord(*[black]|myhand,mylibrary,mygraveyard,myexile) altercost(black, +1) text=Black spells you cast cost {B} more to cast. mana={3}{B} type=Creature @@ -21702,6 +24166,15 @@ power=1 toughness=1 [/card] [card] +name=Descent of the Dragons +target=creature|battlefield +auto=token(Dragon,Creature Dragon,4/4,red,flying) targetcontroller +auto=destroy +text=Destroy any number of target creatures. For each creature destroyed this way, its controller puts a 4/4 red Dragon creature token with flying onto the battlefield. +mana={4}{R}{R} +type=Sorcery +[/card] +[card] name=Desecration Elemental abilities=fear auto=@movedto(*|stack):moveTo(ownergraveyard) notatarget(creature|myBattlefield) @@ -21713,6 +24186,14 @@ power=8 toughness=8 [/card] [card] +name=Desecration Plague +target=enchantment,land +auto=destroy +text=Destroy target enchantment, or land. +mana={3}{G} +type=Sorcery +[/card] +[card] name=Desecrator Hag auto=moveTo(ownerhand) target(creature[power=power:highest:creature:mygraveyard]|mygraveyard) oneshot text=When Desecrator Hag enters the battlefield, return to your hand the creature card in your graveyard with the greatest power. If two or more cards are tied for greatest power, you choose one of them. @@ -21848,6 +24329,17 @@ mana={3}{B} type=Sorcery [/card] [card] +name=Despoiler of Souls +abilities=cantblock +autograveyard={B}{B}{E(other creature|mygraveyard)}{E(other creature|mygraveyard)}:moveto(mybattlefield) +text=Despoiler of Souls can't block. -- {B}{B}, Exile two other creature cards from your graveyard: Return Despoiler of Souls from your graveyard to the battlefield. +mana={B}{B} +type=Creature +subtype=Horror +power=3 +toughness=1 +[/card] +[card] name=Despondency target=creature autograveyard=@movedTo(this|graveyard) from(battlefield):moveTo(ownerhand) @@ -21882,6 +24374,15 @@ mana={5}{R}{R} type=Sorcery [/card] [card] +name=Destructive Revelry +target=artifact,enchantment +auto=destroy +auto=damage:2 targetcontroller +text=Destroy target artifact or enchantment. -- Destructive Revelry does 2 damage to that permanent's controller. +mana={R}{G} +type=Instant +[/card] +[card] name=Destructive Urge target=creature auto=@combatdamaged(player) from(mytgt):ability$!name(sacrifice land) notatarget(land|mybattlefield) sacrifice!$ opponent @@ -21891,6 +24392,17 @@ type=Enchantment subtype=Aura [/card] [card] +name=Destructor Dragon +abilities=flying +auto=@movedTo(this|graveyard) from(Battlefield):destroy target(*[-creature]) +text=Flying -- When Destructor Dragon dies, destroy target noncreature permanent. +mana={4}{G}{G} +type=Creature +subtype=Dragon +power=4 +toughness=4 +[/card] +[card] name=Detainment Spell target=creature auto=noactivatedability @@ -21917,7 +24429,8 @@ text=Destroy target artifact with converted mana cost X. It can't be regenerated [/card] [card] name=Detritivore -auto=type:land[-basic]:opponentgraveyard/type:land[-basic]:opponentgraveyard nonstatic +alias=1111 +anyzone=type:land[-basic]:opponentgraveyard/type:land[-basic]:opponentgraveyard cdaactive autoexile=@counterremoved(0/0,1,Time) from(sourcecard) suspended:destroy target(land[-basic]) suspend(0)={X}{3}{R} text=Detritivore's power and toughness are each equal to the number of nonbasic land cards in your opponents' graveyards. -- Suspend X - {X}{3}{R}. X can't be 0. (Rather than cast this card from your hand, you may pay {X}{3}{R} and exile it with X time counters on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost. It has haste.) -- Whenever a time counter is removed from Detritivore while it's exiled, destroy target nonbasic land. @@ -21930,7 +24443,7 @@ toughness=* [card] name=Deus of Calamity abilities=trample -auto=@damaged(opponent) from(this) restriction{compare(thatmuch)~morethan~5}:destroy target(land|opponent) +auto=@damagefoeof(player) from(this) restriction{compare(thatmuch)~morethan~5}:destroy target(land|opponent) text=Trample -- Whenever Deus of Calamity deals 6 or more damage to an opponent, destroy target land that player controls. mana={RG}{RG}{RG}{RG}{RG} type=Creature @@ -21957,7 +24470,7 @@ type=Sorcery [card] name=Devastation Tide auto=moveTo(ownerhand) all(*[-land]) -autohand=restriction{miracle} pay[[{1}{U}]] name(Miracle) activate name(Miracle) castcard(normal) +autohand=restriction{miracle} pay[[{1}{U}]] name(Miracle) activate name(Miracle) castcard(restricted) text=Return all nonland permanents to their owners' hands. -- Miracle {1}{U} (You may cast this card for its miracle cost when you draw it if it's the first card you drew this turn.) mana={3}{U}{U} type=Sorcery @@ -22090,6 +24603,14 @@ power=2 toughness=2 [/card] [card] +name=Devout Invocation +target=creature[-tapped]|mybattlefield +auto=tap && token(Angel, Creature Angel,4/4,flying,white) +text=Tap any number of untapped creatures you control. -- Put a 4/4 white Angel creature token with flying onto the battlefield for each creature tapped this way. +mana={6}{W} +type=Sorcery +[/card] +[card] name=Devout Lightcaster abilities=protection from black auto=moveTo(exile) target(*[black]) @@ -22188,6 +24709,31 @@ text={T}, Sacrifice a creature: You gain life equal to the sacrificed creature's type=Land [/card] [card] +name=Dictate of Erebos +abilities=flash +auto=@movedTo(creature|mygraveyard) from(mybattlefield):ability$!name(sacrifice) notatarget(creature|mybattlefield) sacrifice!$ opponent +text=Flash -- Whenever a creature you control dies, each opponent sacrifices a creature. +mana={3}{B}{B} +type=Enchantment +[/card] +[card] +name=Dictate of Heliod +abilities=flash +auto=lord(creature|mybattlefield) 2/2 +text=Flash -- Creatures you control get +2/+2. +mana={3}{W}{W} +type=Enchantment +[/card] +[card] +name=Dictate of Kruphix +abilities=flash +auto=@each my draw:draw:1 controller +auto=@each opponent draw:draw:1 opponent +text=Flash -- At the beginning of each player's draw step, that player draws an additional card. +mana={1}{U}{U} +type=Enchantment +[/card] +[card] name=Didgeridoo auto={3}:moveTo(myBattlefield) target(minotaur|myhand) text={3}: You may put a Minotaur permanent card from your hand onto the battlefield. @@ -22207,7 +24753,7 @@ toughness=1 [card] name=Diluvian Primordial abilities=flying -auto=may target(*[instant;sorcery]|opponentgraveyard) castcard(normal) and!(transforms((,newability[exiledeath])) forever)! +auto=may target(*[instant;sorcery]|opponentgraveyard) castcard(restricted) and!(transforms((,newability[exiledeath])) forever)! text=Flying -- When Diluvian Primordial enters the battlefield, for each opponent, you may cast up to one target instant or sorcery card from that player's graveyard without paying its mana cost. If a card cast this way would be put into a graveyard this turn, exile it instead. mana={5}{U}{U} type=Creature @@ -22242,7 +24788,8 @@ type=Artifact [/card] [card] name=Dimir Cutpurse -auto=@combatdamaged(opponent) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent && draw:1 controller +auto=@combatdamagefoeof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent && draw:1 controller +auto=@combatdamageof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ controller && draw:1 controller text=Whenever Dimir Cutpurse deals combat damage to a player, that player discards a card and you draw a card. mana={1}{U}{B} type=Creature @@ -22345,6 +24892,15 @@ power=4 toughness=4 [/card] [card] +name=Diplomacy of the Wastes +target=opponent +auto=if type(*[-land]|targetedpersonshand)~lessthan~1 then name(look) donothing notatarget(*|targetedpersonshand) else reject notatarget(*[-land]|targetedpersonshand) +auto=if type(*[warrior]|mybattlefield)~morethan~0 then life:-2 targetedplayer +text=Target opponent reveals his or her hand. You choose a nonland card from it. That player discards that card. If you control a Warrior, that player loses 2 life. +mana={2}{B} +type=Sorcery +[/card] +[card] name=Diplomatic Immunity abilities=shroud target=creature @@ -22404,6 +24960,19 @@ mana={2}{B} type=Sorcery [/card] [card] +name=Dirgur Nemesis +abilities=defender +facedown={3} +autofacedown={6}{U}:morph +autofaceup=counter(1/1,1) +text=Defender -- Megamorph {6}{U} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) +mana={5}{U} +type=Creature +subtype=Serpent +power=6 +toughness=5 +[/card] +[card] name=Dirtcowl Wurm auto=@movedTo(land|opponentbattlefield) from(opponenthand):counter(1/1,1) text=Whenever an opponent plays a land, put a +1/+1 counter on Dirtcowl Wurm. @@ -22530,6 +25099,19 @@ power=2 toughness=2 [/card] [card] +name=Disciple of the Ring +auto={1}{E(*[instant;sorcery]|mygraveyard)}:name(counter noncreature unless pay 2) target(*[-creature]|stack) transforms((,newability[pay[[{2}]] name(pay 2 mana) donothing?fizzle])) forever +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. +mana={3}{U}{U} +type=Creature +subtype=Human Wizard +power=3 +toughness=4 +[/card] +[card] name=Disciple of the Vault auto=@movedTo(graveyard) from(artifact|battlefield):may target(opponent) life:-1 text=Whenever an artifact is put into a graveyard from the battlefield, you may have target opponent lose 1 life. @@ -22542,18 +25124,8 @@ toughness=1 [card] name=Discordant Dirge auto=@each my upkeep:may counter(0/0,1,Verse) -auto=this(counter{0/0.1.Verse}=) {B}{S}:reject target(*|opponenthand) -auto=this(counter{0/0.2.Verse}=) {B}{S}:reject target(*|opponenthand) -auto=this(counter{0/0.3.Verse}=) {B}{S}:reject target(*|opponenthand) -auto=this(counter{0/0.4.Verse}=) {B}{S}:reject target(*|opponenthand) -auto=this(counter{0/0.5.Verse}=) {B}{S}:reject target(*|opponenthand) -auto=this(counter{0/0.6.Verse}=) {B}{S}:reject target(*|opponenthand) -auto=this(counter{0/0.7.Verse}=) {B}{S}:reject target(*|opponenthand) -auto=this(counter{0/0.8.Verse}=) {B}{S}:reject target(*|opponenthand) -auto=this(counter{0/0.9.Verse}=) {B}{S}:reject target(*|opponenthand) -auto=this(counter{0/0.10.Verse}=) {B}{S}:reject target(*|opponenthand) -auto=this(counter{0/0.11.Verse}=) {B}{S}:reject target(*|opponenthand) -auto=this(counter{0/0.12.Verse}=) {B}{S}:reject target(*|opponenthand) +auto=this(counter{0/0.1.Verse}<1) {B}{S}:name(look) donothing target(*|opponenthand) +auto=this(counter{0/0.1.Verse}>0) {B}{S}:reject target(*|opponenthand) text=At the beginning of your upkeep, you may put a verse counter on Discordant Dirge. -- {B}, Sacrifice Discordant Dirge: Look at target opponent's hand and choose up to X cards from it, where X is the number of verse counters on Discordant Dirge. That player discards those cards. mana={3}{B}{B} type=Enchantment @@ -22570,6 +25142,14 @@ power=2 toughness=2 [/card] [card] +name=Disdainful Stroke +target=*[manacost>=4]|stack +auto=fizzle +text=Counter target spell with converted mana cost 4 or greater. +mana={1}{U} +type=Instant +[/card] +[card] name=Disease Carriers auto=@movedTo(this|graveyard) from(battlefield):-2/-2 target(creature) text=When Disease Carriers dies, target creature gets -2/-2 until end of turn. @@ -22651,6 +25231,15 @@ mana={X}{R} type=Sorcery [/card] [card] +name=Dismal Backwater +auto=tap +auto=life:1 +auto={T}:Add{U} +auto={T}:Add{B} +text=Dismal Backwater enters the battlefield tapped. -- When Dismal Backwater enters the battlefield, you gain 1 life. -- {T}: Add {U} or {B} to your mana pool. +type=Land +[/card] +[card] name=Dismal Failure target=*|stack auto=fizzle @@ -22688,6 +25277,13 @@ mana={2}{U}{U} type=Instant [/card] [card] +name=Dismiss into Dream +auto=lord(creature|opponentbattlefield) transforms((Illusion,newability[@targeted(this):sacrifice])) +text=Enchantment. -- Each creature your opponents control is an Illusion in addition to its other types and has "When this creature becomes the target of a spell or ability, sacrifice it." +mana={6}{U} +type=Enchantment +[/card] +[card] name=Disorder auto=damage:2 all(creature[white]) auto=aslongas(creature[white]|myBattlefield) damage:2 controller @@ -22705,6 +25301,16 @@ mana={3}{U} type=Instant [/card] [card] +name=Disowned Ancestor +auto={1}{B}{T}:counter(1/1,1) asSorcery +text=Outlast {1}{B}, {T}: Put a +1/+1 counter on this creature. Outlast only as a sorcery.) +mana={B} +type=Creature +subtype=Spirit Warrior +power=0 +toughness=4 +[/card] +[card] name=Dispatch target=creature auto=tap @@ -22760,9 +25366,16 @@ mana={3}{U}{U} type=Enchantment [/card] [card] +name=Displacement Wave +auto=moveto(ownerhand) all(*[manacost<=X;-land]|battlefield) +text=Return all nonland permanents with converted mana cost X or less to their owners' hands. +mana={X}{U}{U} +type=Sorcery +[/card] +[card] name=Dissipation Field mana={2}{U}{U} -auto=@damaged(controller) from(*|battlefield):all(trigger[from]) moveto(ownerhand) +auto=@damageof(player) from(*|battlefield):all(trigger[from]) moveto(ownerhand) type=Enchantment text=Whenever a permanent deals damage to you, return it to its owner's hand. [/card] @@ -22805,6 +25418,14 @@ power=1 toughness=1 [/card] [card] +name=Dissipate +target=*|stack +auto=fizzleto(exile) +text=Counter target spell. If that spell is countered this way, exile it instead of putting it into its owner's graveyard. +mana={1}{U}{U} +type=Instant +[/card] +[card] name=Distant Melody auto=chooseatype foreach(*[chosentype]|mybattlefield) draw:1 controller chooseend text=Choose a creature type. Draw a card for each permanent you control of that type. @@ -22970,10 +25591,10 @@ type=Instant [card] name=Diviner's Wand auto={3}:equip -auto=@drawn(controller):1/1 ueot -auto=@drawn(controller):flying ueot +auto=@drawof(player):1/1 ueot +auto=@drawof(player):flying ueot auto=teach(creature) {4}:draw:1 controller -auto=@movedto(creature[wizard]|battlefield):may all(trigger[to]) retarget +auto=@movedto(creature[wizard]|battlefield):may all(trigger[to]) rehook text=Equipped creature has "Whenever you draw a card, this creature gets +1/+1 and gains flying until end of turn" and "{4}: Draw a card." -- Whenever a Wizard creature enters the battlefield, you may attach Diviner's Wand to it. -- Equip {3} mana={3} type=Tribal Artifact @@ -23157,7 +25778,8 @@ toughness=1 [card] name=Doomsday Specter abilities=flying -auto=@combatdamaged(player) from(this|mybattlefield):reject target(*|opponenthand) +auto=@combatdamagefoeof(player) from(this):reject target(*|opponenthand) +auto=@combatdamageof(player) from(this):reject target(*|myhand) auto=moveTo(ownerhand) notatarget(creature[blue;black]|myBattlefield) text=Flying -- When Doomsday Specter enters the battlefield, return a blue or black creature you control to its owner's hand. -- Whenever Doomsday Specter deals combat damage to a player, look at that player's hand and choose a card from it. The player discards that card. mana={2}{U}{B} @@ -23178,6 +25800,17 @@ power=10 toughness=10 [/card] [card] +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. +mana={4}{B} +type=Enchantment Creature +subtype=Giant +power=4 +toughness=6 +[/card] +[card] name=Door of Destinies auto=chooseatype transforms((,newability[@movedTo(creature[chosentype]|mystack)}:counter(0/0.1.Charge)],newability[thisforeach(counter{0/0.1.Charge}) lord(creature[chosentype]|mybattlefield) 1/1])) chooseend text=As Door of Destinies enters the battlefield, choose a creature type. -- Whenever you cast a spell of the chosen type, put a charge counter on Door of Destinies. -- Creatures you control of the chosen type get +1/+1 for each charge counter on Door of Destinies. @@ -23226,8 +25859,8 @@ type=Land [/card] [card] name=Dosan the Falling Leaf -auto=this(variable{controllerturn}) maxCast(*)0 opponent -auto=this(variable{opponentturn}) maxCast(*)0 controller +auto=this(variable{controllerturn}>0) maxCast(*)0 opponent +auto=this(variable{opponentturn}>0) maxCast(*)0 controller text=Players can cast spells only during their own turns. mana={1}{G}{G} type=Legendary Creature @@ -23270,7 +25903,7 @@ type=Artifact [card] name=Doubtless One auto=spiritlink -auto=foreach(cleric) 1/1 +anyzone=type:cleric:battlefield/type:cleric:battlefield cdaactive text=Doubtless One's power and toughness are each equal to the number of Clerics on the battlefield. -- Whenever Doubtless One deals damage, you gain that much life. mana={3}{W} type=Creature @@ -23360,6 +25993,17 @@ mana={1}{U} type=Instant [/card] [card] +name=Downsize +alias=11000 +other={2}{U} name(Overload) +target=creature|opponentbattlefield +auto=overload -4/0 all(creature|opponentbattlefield) +auto=paidmana -4/0 +text=Target creature you don't control gets -4/-0 until end of turn. -- Overload {2}{U} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") +mana={U} +type=Instant +[/card] +[card] name=Dowsing Shaman auto={2}{G}{T}:moveTo(myhand) target(enchantment|mygraveyard) text={2}{G}, {T}: Return target enchantment card from your graveyard to your hand. @@ -23377,6 +26021,15 @@ mana={3} type=Artifact [/card] [card] +name=Draconic Roar +target=creature|battlefield +auto=damage:3 +auto=if type(dragon|mybattlefield)~morethan~0 then damage:3 targetcontroller else if type(dragon|myhand)~morethan~0 then damage:3 targetcontroller +text=As an additional cost to cast Draconic Roar, you may reveal a Dragon card from your hand. -- Draconic Roar deals 3 damage to target creature. If you revealed a Dragon card or controlled a Dragon as you cast Draconic Roar, Draconic Roar deals 3 damage to that creature's controller. +mana={1}{R} +type=Instant +[/card] +[card] name=Drag Down target=creature auto=aslongas(forest|myBattlefield) -1/-1 @@ -23399,7 +26052,7 @@ type=Sorcery [card] name=Dragon Appeasement auto=phasealter(remove,draw,controller) -auto=@sacrificed(creature|mybattlefield):may draw:1 controller +auto=@sacrificed(creature|mybattlefield):name(draw) ability$!may draw:1!$ controller text=Skip your draw step. -- Whenever you sacrifice a creature, you may draw a card. mana={3}{B}{R}{G} type=Enchantment @@ -23412,6 +26065,17 @@ mana={5} type=Artifact [/card] [card] +name=Dragon Bell Monk +abilities=vigilance +auto=@movedTo(*[-creature]|mystack):1/1 ueot +text=Vigilance. -- Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) +mana={2}{W} +type=Creature +subtype=Human Monk +power=2 +toughness=2 +[/card] +[card] name=Dragon Blood auto={3}{T}:counter(1/1,1) target(creature) text={3}, {T}: Put a +1/+1 counter on target creature. @@ -23452,6 +26116,28 @@ toughness=1 color=Red,Green [/card] [card] +name=Dragon Egg +abilities=defender +auto=@movedTo(this|graveyard) from(mybattlefield):token(-370660) +text=Defender. -- When Dragon Egg dies, put a 2/2 red Dragon creature token with flying onto the battlefield. It has "{R}: This creature gets +1/+0 until end of turn". +mana={2}{R} +type=Creature +subtype=Dragon +power=0 +toughness=2 +[/card] +[card] +name=Dragon Egg Dragon +abilities=flying +auto={R}:1/0 ueot +text=Flying -- {R}: This creature gets +1/+0 until end of turn. +type=Creature +subtype=Dragon +color=red +power=2 +toughness=2 +[/card] +[card] name=Dragon Engine auto={2}:1/0 text={2}: Dragon Engine gets +1/+0 until end of turn. @@ -23480,6 +26166,19 @@ mana={1}{R} type=Sorcery [/card] [card] +name=Dragon Grip +other={2}{R} name(cast anytime) +otherrestriction=type(creature[power>=4]|mybattlefield)~morethan~0 +abilities=spellmastery +target=creature +auto=2/0 +auto=first strike +text=Ferocious. -- If you control a creature with power 4 or greater, you may cast Dragon Grip as though it had flash. (You may cast it any time you could cast an instant.) -- Enchant creature. -- Enchanted creature gets +2/+0 and has first strike. +mana={2}{R} +type=Enchantment +subtype=Aura +[/card] +[card] name=Dragon Hatchling auto={R}:1/0 abilities=flying @@ -23502,6 +26201,16 @@ power=5 toughness=5 [/card] [card] +name=Dragon Mantle +target=creature +auto=draw:1 controller +auto=teach(creature) {R}:1/0 ueot +text=Enchant creature -- When Dragon Mantle enters the battlefield, draw a card. -- Enchanted creature has "{R}: This creature gets +1/+0 until end of turn." +mana={R} +type=Enchantment +subtype=Aura +[/card] +[card] name=Dragon Mask auto={3}{T}:target(creature|mybattlefield) transforms((,newability[2/2],newability[phaseaction[endofturn sourceinplay] moveTo(ownerhand)])) ueot text={3}, {T}: Target creature you control gets +2/+2 until end of turn. Return it to its owner's hand at the beginning of the next end step. (Return it only if it's on the battlefield.) @@ -23538,6 +26247,14 @@ type=Enchantment subtype=Aura [/card] [card] +name=Dragon Tempest +auto=@movedto(creature[flying]|mybattlefield):all(trigger[to]) haste ueot +auto=@movedto(creature[dragon]|mybattlefield):all(trigger[to]) transforms((,newability[damage:type:dragon:mybattlefield target(creature;player)])) forever +text=Whenever a creature with flying enters the battlefield under your control, it gains haste until end of turn. -- Whenever a Dragon enters the battlefield under your control, it deals X damage to target creature or player, where X is the number of Dragons you control. +mana={1}{R} +type=Enchantment +[/card] +[card] name=Dragon Tyrant abilities=flying,trample,double strike auto=upcost[{R}{R}{R}{R}] sacrifice @@ -23561,6 +26278,18 @@ power=2 toughness=3 [/card] [card] +name=Dragon Whisperer +auto={R}:flying +auto={1}{R}:1/0 +auto={4}{R}{R}:token(Dragon,creature dragon, 4/4,flying red) restriction{compare(powertotalinplay)~morethan~7} +text={R}: Dragon Whisperer gains flying until end of turn. -- {1}{R}: Dragon Whisperer gets +1/+0 until end of turn. -- Formidable — {4}{R}{R}: Put a 4/4 red Dragon creature token with flying onto the battlefield. Activate this ability only if creatures you control have total power 8 or greater. +mana={R}{R} +type=Creature +subtype=Human Shaman +power=2 +toughness=2 +[/card] +[card] name=Dragon Wings target=creature auto=flying @@ -23573,6 +26302,27 @@ type=Enchantment subtype=Aura [/card] [card] +name=Dragon-Scarred Bear +auto={1}{G}:regenerate restriction{compare(powertotalinplay)~morethan~7} +text=Formidable — {1}{G}: Regenerate Dragon-Scarred Bear. Activate this ability only if creatures you control have total power 8 or greater. +mana={2}{G} +type=Creature +subtype=Bear +power=3 +toughness=2 +[/card] +[card] +name=Dragon-Style Twins +abilities=double strike +auto=@movedTo(*[-creature]|mystack):1/1 ueot +text=Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) -- Whenever Jeskai Elder deals combat damage to a player, you may draw a card. If you do, discard a card. +mana={3}{R}{R} +type=Creature +subtype=Human Monk +power=3 +toughness=3 +[/card] +[card] name=Dragon's Claw auto=@movedTo(*[red]|stack):may life:1 controller text=Whenever a player casts a red spell, you may gain 1 life. @@ -23580,6 +26330,16 @@ mana={2} type=Artifact [/card] [card] +name=Dragon's Eye Sentry +abilities=defender,first strike +text=Defender, first strike +mana={W} +type=Creature +subtype=Human Monk +power=1 +toughness=3 +[/card] +[card] name=Dragon's Herald auto={2}{R}{T}{S(creature[black]|myBattlefield)}{S(creature[red]|myBattlefield)}{S(creature[green]|myBattlefield)}:moveTo(mybattlefield) target(hellkite overlord|mylibrary) text={2}{R}, {T}, Sacrifice a black creature, a red creature, and a green creature: Search your library for a card named Hellkite Overlord and put it onto the battlefield. Then shuffle your library. @@ -23591,6 +26351,7 @@ toughness=1 [/card] [card] name=Dragonlair Spider +abilities=reach auto=@movedTo(*|opponentstack):token(Insect,Creature Insect, 1/1,green) text=Reach -- Whenever an opponent casts a spell, put a 1/1 green Insect creature token onto the battlefield. mana={2}{R}{R}{G}{G} @@ -23600,6 +26361,51 @@ power=5 toughness=6 [/card] [card] +name=Dragonloft Idol +auto=aslongas(dragon|mybattlefield) 1/1 +auto=aslongas(dragon|mybattlefield) flying +auto=aslongas(dragon|mybattlefield) trample +text=As long as you control a Dragon, Dragonloft Idol gets +1/+1 and has flying and trample. +mana={4} +type=Artifact Creature +subtype=Gargoyle +power=3 +toughness=3 +[/card] +[card] +name=Dragonlord Dromoka +abilities=nofizzle,flying,lifelink +auto=this(variable{controllerturn}) maxCast(*)0 opponent +text=Dragonlord Dromoka can't be countered. -- Flying, lifelink -- Your opponents can't cast spells during your turn. +mana={4}{G}{W} +type=Legendary Creature +subtype=Elder Dragon +power=5 +toughness=7 +[/card] +[card] +name=Dragonlord Kolaghan +abilities=flying,haste +auto=lord(other creature|mybattlefield) haste +auto=@movedto(*[creature;planeswalker]|opponentstack):all(trigger[to]) transforms((,newability[if type(*[share!name!]|mygraveyard)~morethan~0 then life:-10 controller])) oneshot +text=Flying, haste -- Other creatures you control have haste. -- Whenever an opponent casts a creature or planeswalker spell with the same name as a card in his or her graveyard, that player loses 10 life. +mana={4}{B}{R} +type=Legendary Creature +subtype=Elder Dragon +power=6 +toughness=5 +[/card] +[card] +name=Dragonlord's Servant +auto=lord(dragon|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) +text=Dragon spells you cast cost {1} less to cast. +mana={1}{R} +type=Creature +subtype=Goblin Shaman +power=1 +toughness=3 +[/card] +[card] name=Dragonmaster Outcast auto=@each my upkeep restriction{type(land|myBattlefield)~morethan~5}:token(Dragon,creature dragon, 5/5,flying red) text=At the beginning of your upkeep, if you control six or more lands, put a 5/5 red Dragon creature token with flying onto the battlefield. @@ -23610,6 +26416,33 @@ power=1 toughness=1 [/card] [card] +name=Dragonrage +auto=foreach(creature[attacking}|mybattlefield) add{R} +auto=emblem transforms((,newability[lord(creature[attacking]|mybattlefield) {R}:1/0 ueot])) ueot +text=Add {R} to your mana pool for each attacking creature you control. Until end of turn, attacking creatures you control gain "{R}: This creature gets +1/+0 until end of turn." +mana={2}{R} +type=Instant +[/card] +[card] +name=Dragonscale Boon +target=creature +auto=counter(1/1,2) +auto=untap +text=Put two +1/+1 counters on target creature and untap it. +mana={3}{G} +type=Instant +[/card] +[card] +name=Dragonscale General +auto=@each my end:ability$!name(Bolster) counter(1/1,type:creature[tapped]:mybattlefield) notatarget(creature[toughness=toughness:lowest:creature:mybattlefield])!$ controller +text=At the beginning of your end step, bolster X, where X is the number of tapped creatures you control. (Choose a creature with the least toughness among creatures you control and put X +1/+1 counters on it.) +mana={3}{W} +type=Creature +subtype=Human Warrior +power=2 +toughness=3 +[/card] +[card] name=Dragonskull Summit auto=tap auto=aslongas(mountain,swamp|myBattlefield) untap @@ -23631,7 +26464,7 @@ toughness=2 [/card] [card] name=Dragonspeaker Shaman -auto=lord(dragon|myhand) altercost(colorless,-2) +auto=lord(dragon|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) text=Dragon spells you cast cost {2} less to cast. mana={1}{R}{R} type=Creature @@ -23676,6 +26509,18 @@ mana={1}{B}{X:black} type=Sorcery [/card] [card] +name=Draining Whelk +abilities=flash,flying +auto=target(*|stack) fizzle +alias=111057 +text=Flash (You may cast this spell any time you could cast an instant.) -- Flying -- When Draining Whelk enters the battlefield, counter target spell. Put X +1/+1 counters on Draining Whelk, where X is that spell's converted mana cost. +mana={4}{U}{U} +type=Creature +subtype=Illusion +power=1 +toughness=1 +[/card] +[card] name=Drainpipe Vermin auto=@movedto(this|graveyard) from(battlefield):pay({B}) name(discard) target(player) ability$!name(discard) target(*|myhand) reject!$ targetedplayer text=When Drainpipe Vermin dies, you may pay {B}. If you do, target player discards a card. @@ -23785,7 +26630,7 @@ type=Sorcery [card] name=Dread abilities=fear -auto=@damaged(controller) from(creature):all(trigger[from]) destroy +auto=@damageof(player) from(creature):all(trigger[from]) destroy autograveyard=moveTo(ownerlibrary) && shuffle text=Fear (This creature can't be blocked except by artifact creatures and/or black creatures.) -- Whenever a creature deals damage to you, destroy it. -- When Dread is put into a graveyard from anywhere, shuffle it into its owner's library. mana={3}{B}{B}{B} @@ -23919,6 +26764,17 @@ mana={B}{R} type=Sorcery [/card] [card] +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.) +mana={4}{B} +type=Enchantment Creature +subtype=Nymph +power=4 +toughness=2 +[/card] +[card] name=Dreadwaters target=player auto=deplete:type:land:mybattlefield @@ -24190,7 +27046,7 @@ toughness=5 [card] name=Drift of the Dead abilities=defender -auto=foreach(land[snow]|myBattlefield) 1/1 +anyzone=type:land[snow]:myBattlefield/type:land[snow]:myBattlefield cdaactive text=Defender (This creature can't attack.) -- Drift of the Dead's power and toughness are each equal to the number of snow lands you control. mana={3}{B} type=Creature @@ -24254,8 +27110,7 @@ toughness=1 [card] name=Drinker of Sorrow abilities=cantblock -auto=@combatdamaged(player) from(this):moveto(graveyard) notatarget(*|myBattlefield) -auto=@combatdamaged(creature) from(this):moveto(graveyard) notatarget(*|myBattlefield) +auto=@combatdamaged(creature,player) from(this):sacrifice notatarget(*|myBattlefield) text=Drinker of Sorrow can't block. -- Whenever Drinker of Sorrow deals combat damage, sacrifice a permanent. mana={2}{B} type=Creature @@ -24309,7 +27164,7 @@ toughness=2 [card] name=Drogskol Reaver abilities=flying,double strike,lifelink -auto=@lifed(controller):draw:1 controller +auto=@lifeof(player):draw:1 controller text=Flying, doublestrike, lifelink -- Whenever you gain life, draw a card. mana={5}{W}{U} type=Creature @@ -24369,6 +27224,62 @@ mana={W}{U}{B} type=Instant [/card] [card] +name=Dromoka, the Eternal +abilities=flying +auto=@combat(attacking) source(dragon|mybattlefield):ability$!name(Bolster) notatarget(creature[toughness=toughness:lowest:creature:mybattlefield]|mybattlefield) counter(1/1,2)!$ controller +text=Flying -- Whenever a Dragon you control attacks, bolster 2. (Choose a creature with the least toughness among creatures you control and put two +1/+1 counters on it.) +mana={3}{G}{W} +type=Legendary Creature +subtype=Dragon +power=5 +toughness=5 +[/card] +[card] +name=Dromoka Captain +abilities=first strike +auto=@combat(attacking) source(this):ability$!name(Bolster) notatarget(creature[toughness=toughness:lowest:creature:mybattlefield]|mybattlefield) counter(1/1,1)!$ controller +text=First strike -- Whenever Dromoka Captain attacks, bolster 1. (Choose a creature with the least toughness among creatures you control and put a +1/+1 counter on it.) +mana={2}{W} +type=Creature +subtype=Human Soldier +power=1 +toughness=1 +[/card] +[card] +name=Dromoka Dunecaster +auto={1}{W}{T}:tap target(creature[-flying]|battlefield) +text={1}{W},{T}: Tap target creature without flying. +mana={W} +type=Creature +subtype=Human Wizard +power=0 +toughness=2 +[/card] +[card] +name=Dromoka Monument +auto={T}:add{G} +auto={T}:add{W} +auto={4}{G}{W}:becomes(Artifact Creature Dragon,4/4,flying,green,white) ueot +text={T}: Add {G} or {W} to your mana pool. -- {4}{G}{W}: Dromoka Monument becomes a 4/4 green and white Dragon artifact creature with flying until end of turn. +mana={3} +type=Artifact +[/card] +[card] +name=Dromoka Warrior +mana={1}{W} +type=Creature +subtype=Human Warrior +power=3 +toughness=1 +[/card] +[card] +name=Dromoka's Gift +auto=ability$!name(Bolster) notatarget(creature[toughness=toughness:lowest:creature:mybattlefield]|mybattlefield) counter(1/1,4)!$ controller +text=Bolster 4. (Choose a creature with the least toughness among creatures you control and put four +1/+1 counters on it.) +mana={4}{G} +type=Instant +[/card] +[card] name=Dromosaur auto=@combat(blocking,blocked,turnlimited) source(this):2/-2 ueot text=Whenever Dromosaur blocks or becomes blocked, it gets +2/-2 until end of turn. @@ -24494,7 +27405,7 @@ toughness=1 [card] name=Drove of Elves abilities=opponentshroud -auto=foreach(*[green]|myBattlefield) 1/1 +anyzone=type:*[green]:myBattlefield/type:*[green]:myBattlefield cdaactive text=Drove of Elves's power and toughness are each equal to the number of green permanents you control. -- Drove of Elves can't be the target of spells or abilities your opponents control. mana={3}{G} type=Creature @@ -24792,6 +27703,14 @@ power=2 toughness=1 [/card] [card] +name=Duneblast +auto=choice name(Save a creature) notatarget(creature) transforms((,newability[destroy all(other creature)])) +auto=choice name(destroy all creatures) destroy all(creature) +text=Choose up to one creature. Destroy the rest. +mana={4}{W}{B}{G} +type=Sorcery +[/card] +[card] name=Dune-Brood Nephilim auto=@combatdamaged(player) from(this):foreach(land|myBattlefield) token(Sand,creature sand,1/1) text=Whenever Dune-Brood Nephilim deals combat damage to a player, put a 1/1 colorless Sand creature token onto the battlefield for each land you control. @@ -24804,7 +27723,7 @@ toughness=3 [card] name=Dunerider Outlaw abilities=protection from green -auto=@damaged(opponent) from(this):all(trigger[from]) phaseaction[endofturn once] counter(1/1,1) +auto=@damagefoeof(player) from(this):all(trigger[from]) phaseaction[endofturn once] counter(1/1,1) text=Protection from green -- At the beginning of each end step, if Dunerider Outlaw dealt damage to an opponent this turn, put a +1/+1 counter on it. mana={B}{B} type=Creature @@ -24837,7 +27756,7 @@ toughness=1 [card] name=Dungrove Elder abilities=opponentshroud -auto=foreach(forest|mybattlefield) 1/1 +anyzone=type:forest:mybattlefield/type:forest:mybattlefield cdaactive text=Hexproof (This creature can't be the target of spells or abilities your opponents control.) -- Dungrove Elder's power and toughness are each equal to the number of Forests you control. mana={2}{G} type=Creature @@ -25032,6 +27951,24 @@ mana={1}{W}{W} type=Sorcery [/card] [card] +name=Dutiful Attendant +auto=@movedTo(this|graveyard) from(battlefield):moveTo(myhand) target(other creature|mygraveyard) +text=When Dutiful Attendant dies, return another target creature card from your graveyard to your hand. +mana={2}{B} +type=Creature +subtype=Human Warrior +power=1 +toughness=2 +[/card] +[card] +name=Dutiful Return +target=creature|mygraveyard +auto=moveTo(ownerhand) +text=Return up to two target creature cards from your graveyard to your hand. +mana={3}{B} +type=Sorcery +[/card] +[card] name=Dutiful Thrull auto={B}:regenerate text={B}: Regenerate Dutiful Thrull. @@ -25306,6 +28243,28 @@ mana={G} type=Sorcery [/card] [card] +name=Dwynen's Elite +auto=if type(other elf|mybattlefield)~morethan~0 then choice token(Elf Warrior,Creature Elf Warrior,1/1,green) controller +text=When Dwynen's Elite enters the battlefield, if you control another Elf, put a 1/1 green Elf Warrior creature token onto the battlefield. +mana={1}{G} +type=Creature +subtype=Elf Warrior +power=2 +toughness=2 +[/card] +[card] +name=Dwynen, Gilt-Leaf Daen +abilities=reach +auto=lord(other creature[elf]|mybattlefield) 1/1 +auto=@combat(attacking) source(this):life:type:elf[attacking]:mybattlefield controller +text=Reach -- Other Elf creatures you control get +1/+1. -- Whenever Dwynen, Gilt-Leaf Daen attacks, you gain 1 life for each attacking Elf you control. +mana={2}{G}{G} +type=Legendary Creature +subtype=Elf Warrior +power=3 +toughness=4 +[/card] +[card] name=Dying Wail target=creature auto=@movedTo(mytgt|graveyard) from(battlefield):target(player) ability$!name(discard 2 cards) target(<2>*|myhand) reject!$ targetedplayer @@ -25324,6 +28283,17 @@ type=Enchantment subtype=Aura [/card] [card] +name=Dynacharge +alias=11000 +other={2}{R} name(Overload) +target=creature|mybattlefield +auto=paidmana 2/0 +auto=overload all(creature|mybattlefield) 2/0 +text=Target creature you control gets +2/+0 until end of turn. -- Overload {2}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") +mana={R} +type=Instant +[/card] +[card] name=Dystopia auto=cumulativeupcost[{L}] sacrifice auto=@each opponent upkeep:ability$!name(sacrifice) notatarget(creature[green;white]|mybattlefield) sacrifice !$ opponent @@ -25341,6 +28311,16 @@ power=1 toughness=1 [/card] [card] +name=Eagle of the Watch +abilities=flying,vigilance +text=Flying, vigilance +mana={2}{W} +type=Creature +subtype=Bird +power=2 +toughness=1 +[/card] +[card] name=Early Frost target=land auto=tap @@ -25560,7 +28540,8 @@ toughness=4 [card] name=Ebonblade Reaper auto=@combat(attacking) source(this):life:-halfuplifetotal controller -auto=@combatdamaged(opponent) from(this):life:-halfupopponentlifetotal opponent +auto=@combatdamagefoeof(player) from(this):life:-halfupopponentlifetotal opponent +auto=@combatdamageof(player) from(this):life:-halfuplifetotal controller facedown={3} autofacedown={3}{b}{b}:morph text=Whenever Ebonblade Reaper attacks, you lose half your life, rounded up. -- Whenever Ebonblade Reaper deals combat damage to a player, that player loses half his or her life, rounded up. -- Morph {3}{B}{B} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) @@ -25674,6 +28655,13 @@ power=2 toughness=2 [/card] [card] +name=Echoes of the Kin Tree +auto={2}{W}:ability$!name(Bolster) notatarget(creature[toughness=toughness:lowest:creature:mybattlefield]|mybattlefield) counter(1/1,1)!$ controller +text={2}{W}: Bolster 1. (Choose a creature with the least toughness among creatures you control and put a +1/+1 counter on it.) +mana={1}{W} +type=Enchantment +[/card] +[card] name=Echoing Calm target=enchantment auto=destroy @@ -25718,8 +28706,8 @@ type=Instant [/card] [card] name=Edgewalker -auto=lord(cleric|myhand) altercost(white,-1) -auto=lord(cleric|myhand) altercost(black, -1) +auto=lord(cleric|myhand,mylibrary,mygraveyard,myexile) altercost(white,-1) +auto=lord(cleric|myhand,mylibrary,mygraveyard,myexile) altercost(black, -1) text=Cleric spells you cast cost {W}{B} less to cast. This effect reduces only the amount of colored mana you pay. (For example, if you cast a Cleric spell with mana cost {1}{W}, it costs {1} to cast.) mana={1}{W}{B} type=Creature @@ -25747,7 +28735,7 @@ subtype=Aura [/card] [card] name=Edric, Spymaster of Trest -auto=@combatdamaged(opponent) from(creature|mybattlefield):may draw:1 controller +auto=@combatdamagefoeof(player) from(creature|mybattlefield):may draw:1 controller text=Whenever a creature deals combat damage to one of your opponents, that creature's controller may draw a card. mana={1}{G}{U} type=Legendary Creature @@ -25764,6 +28752,20 @@ type=Sorcery subtype=Arcane [/card] [card] +name=Efreet Weaponmaster +abilities=first strike +auto=target(other creature|mybattlefield) 3/0 ueot +facedown={3} +autofacedown={2}{U}{R}{W}:morph +autofaceup=target(other creature|mybattlefield) 3/0 +text=Morph {2}{U}{R}{W} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) -- When Efreet Weaponmaster enters the battlefield or is turned face up, another target creature you control gets +3/+0 until end of turn. +mana={3}{U}{R}{W} +type=Creature +subtype=Efreet Monk +power=4 +toughness=3 +[/card] +[card] name=Ego Erasure abilities=changeling target=player @@ -25774,6 +28776,39 @@ type=Tribal Instant subtype=Shapeshifter [/card] [card] +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. +mana={2}{G}{G} +type=Enchantment Creature +subtype=Spirit +power=2 +toughness=2 +[/card] +[card] +name=Eidolon of Rhetoric +auto=maxCast(*)1 +auto=maxCast(*)1 opponent +text=Each player can't cast more than one spell each turn. +mana={2}{W} +type=Enchantment Creature +subtype=Spirit +power=1 +toughness=4 +[/card] +[card] +name=Eidolon of the Great Revel +auto=@movedTo(*[manacost<=3]|mystack):damage:2 controller +auto=@movedTo(*[manacost<=3]|opponentstack):damage:2 opponent +text=Whenever a player casts a spell with converted mana cost 3 or less, Eidolon of the Great Revel deals 2 damage to that player. +mana={R}{R} +type=Enchantment Creature +subtype=Spirit +power=2 +toughness=2 +[/card] +[card] name=Eiganjo Castle auto={T}:Add{W} auto={W}{T}:prevent:2 target(creature[legendary]) @@ -25926,7 +28961,8 @@ name=Elder Mastery target=creature auto=3/3 auto=flying -auto=@damaged(player) from(mytgt):ability$!name(discard 2 cards) target(<2>*|myhand) reject!$ opponent +auto=@damagefoeof(player) from(mytgt):ability$!name(discard 2 cards) target(<2>*|myhand) reject!$ opponent +auto=@damageof(player) from(mytgt):ability$!name(discard 2 cards) target(<2>*|myhand) reject!$ controller text=Enchant creature -- Enchanted creature gets +3/+3 and has flying. -- Whenever enchanted creature deals damage to a player, that player discards two cards. mana={3}{U}{B}{R} type=Enchantment @@ -25957,7 +28993,7 @@ toughness=6 name=Elderscale Wurm abilities=trample auto=if compare(lifetotal)~lessthan~7 then lifeset:7 controller -auto=this(controllerlife > 6) transforms((,newability[@damaged(controller):if compare(lifetotal)~lessthan~7 then lifeset:7 controller])) +auto=this(controllerlife >= 7) transforms((,newability[reduceto:7])) text=Trample. -- When Elderscale Wurm enters the battlefield, if your life total is less than 7, your life total becomes 7. -- As long as you have 7 or more life, damage that would reduce your life total to less than 7 reduces it to 7 instead. mana={4}{G}{G}{G} type=Creature @@ -26007,6 +29043,17 @@ power=1 toughness=1 [/card] [card] +name=Electrickery +alias=11000 +other={1}{R} name(Overload) +target=creature|opponentbattlefield +auto=paidmana damage:1 +auto=overload damage:1 all(creature|opponentbattlefield) +text=Electrickery deals 1 damage to target creature you don't control. -- Overload {1}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") +mana={R} +type=Instant +[/card] +[card] name=Electrolyze target=creature,player auto=damage:1 @@ -26027,7 +29074,7 @@ type=Instant [/card] [card] name=Electryte -auto=@combatdamaged(player) from(this):all(creature[blocking]) dynamicability +auto=@combatdamagefoeof(player) from(this):all(creature[blocking]) dynamicability text=Whenever Electryte deals combat damage to defending player, it deals damage equal to its power to each blocking creature. mana={3}{R}{R} type=Creature @@ -26036,6 +29083,13 @@ power=3 toughness=3 [/card] [card] +name=Elemental Bond +auto=@movedto(creature[power>=3]|mybattlefield):draw:1 controller +text=Whenever a creature with power 3 or greater enters the battlefield under your control, draw a card. +mana={2}{G} +type=Enchantment +[/card] +[card] name=Elemental Mastery target=creature auto=teach(creature) {T}:token(Elemental,Creature Elemental,1/1,red,haste,unearth)*power @@ -26089,7 +29143,7 @@ type=Sorcery name=Elephant T1 type=Creature subtype=Elephant -auto=foreach(creature|mygraveyard) 1/1 +anyzone=type:creature:mygraveyard/type:creature:mygraveyard cdaactive text=This creature's power and toughness are each equal to the number of creature cards in its controller's graveyard. power=* toughness=* @@ -26176,6 +29230,17 @@ power=2 toughness=2 [/card] [card] +name=Elite Scaleguard +auto=ability$!name(Bolster) notatarget(creature[toughness=toughness:lowest:creature:mybattlefield]|mybattlefield) counter(1/1,2)!$ controller +auto=@combat(attacking) source(creature[counter{1/1.1}]|mybattlefield):tap target(creature|opponentbattlefield) +text=When Elite Scaleguard enters the battlefield, bolster 2. (Choose a creature with the least toughness among creatures you control and put two +1/+1 counters on it.) -- Whenever a creature you control with a +1/+1 counter on it attacks, tap target creature defending player controls. +mana={4}{W} +type=Creature +subtype=Human Soldier +power=2 +toughness=3 +[/card] +[card] name=Elite Skirmisher auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):may tap target(creature) text=Heroic -- Whenever you cast a spell that targets Elite Skirmisher, you may tap target creature. @@ -26254,6 +29319,17 @@ type=Planeswalker subtype=Elspeth [/card] [card] +name=Elspeth, Sun's Champion +auto=counter(0/0,4,loyalty) +auto={C(0/0,1,Loyalty)}:name(+1: Creature Soldier tokens) token(Soldier,Creature Soldier,1/1,white)*3 +auto={C(0/0,-3,Loyalty)}:name(-3: Destroy all power 4 or more) Destroy all(creature[power>=4]|battlefield) +auto={C(0/0,-7,Loyalty)}:name(-7: Emblem) emblem transforms((,newability[lord(creature|mybattlefield) 2/2],newability[lord(creature|mybattlefield) flying])) forever dontremove +text=+1: Put three 1/1 white Soldier creature tokens onto the battlefield. -- -3: Destroy all creature with power 4 or greater -- -7: You get an emblem with "Creatures you control get +2/+2 and have flying." -- Starting Loyalty 4 +mana={4}{W}{W} +type=Planeswalker +subtype=Elspeth +[/card] +[card] name=Elsewhere Flask auto=draw:1 auto={S}:name(plains) all(land|mybattlefield) loseabilities && all(land|mybattlefield) losesubtypesof(land) && transforms((plains)) ueot all(land|mybattlefield) @@ -26277,6 +29353,17 @@ power=0 toughness=4 [/card] [card] +name=Elusive Spellfist +auto=@movedto(*[-creature]|mystack):1/0 ueot +auto=@movedto(*[-creature]|mystack):unblockable ueot +text=Whenever you cast a noncreature spell, Elusive Spellfist gets +1/+0 until end of turn and can't be blocked this turn. +mana={1}{U} +type=Creature +subtype=Human Monk +power=1 +toughness=3 +[/card] +[card] name=Elven Cache target=*|myGraveyard auto=moveTo(myHand) @@ -26452,7 +29539,7 @@ type=Instant [card] name=Elvish Guidance target=land -auto=@tappedformana(mytgt):foreach(elf|myBattlefield) Add{G} targetcontroller +auto=transforms((,newability[foreach(elf|battlefield) produceextra:{G}])) text=Enchant land -- Whenever enchanted land is tapped for mana, its controller adds {G} to his or her mana pool for each Elf on the battlefield (in addition to the mana the land produces). mana={2}{G} type=Enchantment @@ -26546,6 +29633,16 @@ power=1 toughness=1 [/card] [card] +name=Elvish Mystic +auto={T}:Add{G} +text={T}: Add {G} to your mana pool. +mana={G} +type=Creature +subtype=Elf Druid +power=1 +toughness=1 +[/card] +[card] name=Elvish Pathcutter auto={2}{G}:forestwalk target(elf) text={2}{G}: Target Elf creature gains forestwalk until end of turn. @@ -26728,6 +29825,16 @@ mana={6}{R} type=Instant [/card] [card] +name=Ember Swallower +auto=this(cantargetcard(*[-monstrous]) {5}{R}{R}:becomes(monstrous) forever && counter(1/1,3) && transforms((,newAbility[sacrifice notatarget(<3>land|mybattlefield)],newAbility[ability$! sacrifice notatarget(<3>land|mybattlefield) !$ opponent])) forever +text={5}{R}{R}: Monstrosity 3. (If this creature isn't monstrous, put three +1/+1 counters on it and it becomes monstrous.) -- When Ember Swallower becomes monstrous, each player sacrifices three lands. +mana={2}{R}{R} +type=Creature +subtype=Elemental +power=4 +toughness=5 +[/card] +[card] name=Ember Weaver abilities=reach auto=aslongas(*[red]|myBattlefield) 1/0 @@ -26784,8 +29891,7 @@ toughness=1 [card] name=Emberwilde Caliph abilities=flying,trample,mustattack -auto=@damaged(creature) from(this):life:-thatmuch controller -auto=@damaged(opponent) from(this):life:-thatmuch controller +auto=@damaged(creature,player) from(this):life:-thatmuch controller text=Flying, trample -- Emberwilde Caliph attacks each turn if able. -- Whenever Emberwilde Caliph deals damage, you lose that much life. mana={2}{U}{R} type=Creature @@ -26813,6 +29919,16 @@ type=Enchantment subtype=Aura [/card] [card] +name=Embodiment of Spring +auto={1}{G}{T}{S}:moveTo(myBattlefield) and!(tap)! target(basic|mylibrary) +text={1}{G}{T}:Sacrifice Embodiment of Spring: Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. +mana={U} +type=Creature +subtype=Elemental +power=0 +toughness=3 +[/card] +[card] name=Emerald Charm auto=aslongas(*|battlefield) choice untap target(*) auto=aslongas(enchantment[-aura]|battlefield) choice destroy target(enchantment[-aura]) @@ -26834,7 +29950,7 @@ toughness=1 [/card] [card] name=Emerald Medallion -auto=lord(*[green]|myhand) altercost(colorless,-1) +auto=lord(*[green]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) text=Green spells you cast cost {1} less to cast. mana={2} type=Artifact @@ -26888,7 +30004,8 @@ type=Artifact [card] name=Emissary of Despair abilities=flying -auto=@combatdamaged(player) from(this):life:-type:artifact:opponentbattlefield opponent +auto=@combatdamagefoeof(player) from(this):life:-type:artifact:opponentbattlefield opponent +auto=@combatdamageof(player) from(this):life:-type:artifact:mybattlefield controller text=Flying -- Whenever Emissary of Despair deals combat damage to a player, that player loses 1 life for each artifact he or she controls. mana={1}{B}{B} type=Creature @@ -26899,7 +30016,8 @@ toughness=1 [card] name=Emissary of Hope abilities=flying -auto=@combatdamaged(player) from(this):life:type:artifact:opponentbattlefield controller +auto=@combatdamagefoeof(player) from(this):life:type:artifact:opponentbattlefield controller +auto=@combatdamageof(player) from(this):life:type:artifact:mybattlefield controller text=Flying -- Whenever Emissary of Hope deals combat damage to a player, you gain 1 life for each artifact that player controls. mana={1}{W}{W} type=Creature @@ -26929,15 +30047,10 @@ toughness=3 [/card] [card] name=Emrakul, the Aeons Torn -abilities=nofizzle,flying +abilities=nofizzle,flying,protectionfromcoloredspells auto=if casted(this) then turns:+1 controller autograveyard=moveTo(ownerlibrary) all(*|ownergraveyard) && shuffle auto=@combat(attacking) source(this):name(Annihilate) ability$!name(sacrifice 6 permanents) notatarget(<6>*|mybattlefield) sacrifice!$ opponent -auto=protection from(*[white]|stack) -auto=protection from(*[blue]|stack) -auto=protection from(*[black]|stack) -auto=protection from(*[red]|stack) -auto=protection from(*[green]|stack) text=Emrakul, the Aeons Torn can't be countered. -- When you cast Emrakul, take an extra turn after this one. -- Flying, protection from colored spells, annihilator 6 -- When Emrakul is put into a graveyard from anywhere, its owner shuffles his or her graveyard into his or her library. mana={15} type=Legendary Creature @@ -27025,6 +30138,17 @@ power=3 toughness=5 [/card] [card] +name=Encase in Ice +abilities=flash +target=creature[red;green]|battlefield +auto=tap +auto=doesnotuntap +text=Flash (You may cast this spell any time you could cast an instant.) -- Enchant red or green creature -- When Encase in Ice enters the battlefield, tap enchanted creature. -- Enchanted creature doesn't untap during its controller's untap step. +mana={1}{U} +type=Enchantment +subtype=Aura +[/card] +[card] name=Enchanted Being auto=preventAllCombatDamage from(creature[enchanted]) to(this) text=Prevent all combat damage that would be dealt to Enchanted Being by enchanted creatures. @@ -27083,6 +30207,13 @@ mana={B} type=Sorcery [/card] [card] +name=Encroaching Wastes +auto={T}:Add{1} +auto={4}{T}{S}:destroy target(land[-basic]) +text={T}: Add {1} to your mana pool. -- {4}{T}:Sacrifice Encroaching Wastes: Destroy target nonbasic land. +type=Land +[/card] +[card] name=Encrust target=artifact,creature auto=doesnotuntap @@ -27093,6 +30224,14 @@ type=Enchantment subtype=Aura [/card] [card] +name=End Hostilities +auto=destroy all(creature) +auto=all(creature) transforms((,newability[destroy all(children)])) ueot +text=Destroy all creatures and all permanents attached to creatures +mana={3}{W}{W} +type=Sorcery +[/card] +[card] name=Endangered Armodon auto=aslongas(creature[toughness<=2]|myBattlefield) sacrifice text=When you control a creature with toughness 2 or less, sacrifice Endangered Armodon. @@ -27139,6 +30278,14 @@ type=Enchantment subtype=Aura [/card] [card] +name=Endless Swarm +auto=token(Snake,Creature Snake,1/1,green)*phandcount +auto=if compare(epicactivated)~lessthan~1 then emblem transforms((,newability[epic controller],newability[@each my upkeep:castcard(copied named!:Endless Swarm:!)])) forever dontremove +text=Put a 1/1 green Snake creature token onto the battlefield for each card in your hand. -- Epic (For the rest of the game, you can't cast spells. At the beginning of each of your upkeeps, copy this spell except for its epic ability.) +mana={5}{G}{G}{G} +type=Sorcery +[/card] +[card] name=Endless Whispers auto=@each endofturn:moveto(mybattlefield) all(creature[fresh]|opponentgraveyard) auto=@each endofturn:moveto(opponentbattlefield) all(creature[fresh]|mygraveyard) @@ -27191,6 +30338,23 @@ mana={3}{W}{W} type=Instant [/card] [card] +name=Enduring Ideal +auto=notatarget(enchantment|mylibrary) castcard(putinplay) +auto=if compare(epicactivated)~lessthan~1 then emblem transforms((,newability[epic controller],newability[@each my upkeep:castcard(copied named!:Enduring Ideal:!)])) forever dontremove +text=Search your library for an enchantment card and put it onto the battlefield. Then shuffle your library. -- Epic (For the rest of the game, you can't cast spells. At the beginning of each of your upkeeps, copy this spell except for its epic ability.) +mana={5}{W}{W} +type=Sorcery +[/card] +[card] +name=Enduring Victory +target=creature[attacking;blocking]|battlefield +auto=destroy +auto=ability$!name(Bolster) notatarget(creature[toughness=toughness:lowest:creature:mybattlefield]|mybattlefield) counter(1/1,1)!$ controller +text=Destroy target attacking or blocking creature. Bolster 1. (Choose a creature with the least toughness among creatures you control and put a +1/+1 counter on it.) +mana={4}{W} +type=Instant +[/card] +[card] name=Enemy of the Guildpact auto=protection from(*[multicolor]) text=Protection from multicolored @@ -27347,6 +30511,24 @@ power=2 toughness=2 [/card] [card] +name=Enhanced Awareness +auto=draw:3 +auto=reject notatarget(*|myhand) +text=Draw three cards, then discard a card. +mana={4}{U} +type=Instant +[/card] +[card] +name=Enlightened Ascetic +auto=may destroy target(enchantment) +text=When Enlightened Ascetic enters the battlefield, you may destroy target enchantment. +mana={1}{W} +type=Creature +subtype=Cat Monk +power=1 +toughness=1 +[/card] +[card] name=Enlightened Tutor auto=moveTo(ownerlibrary) notatarget(artifact,enchantment|mylibrary) text=Search your library for an artifact or enchantment card and reveal that card. Shuffle your library, then put the card on top of it. @@ -27370,6 +30552,16 @@ mana={X}{R} type=Instant [/card] [card] +name=Enshrouding Mist +target=creature +auto=1/1 ueot +auto=prevent:9999 +auto=teach(creature[renown]) untap +text=Target creature gets +1/+1 until end of turn. Prevent all damage that would be dealt to it this turn. If it's renowned, untap it. +mana={W} +type=Instant +[/card] +[card] name=Enslave target=creature auto=teach(creature) transforms((,newability[@each my upkeep:damage:1 owner])) @@ -27444,6 +30636,15 @@ mana={3} type=Artifact [/card] [card] +name=Ensoul Artifact +target=artifact +auto=teach(artifact) becomes(Creature,5/5) +text=Enchant artifact -- Enchanted artifact is a creature with base power and toughness 5/5 in addition to its other types. +mana={1}{U} +type=Enchantment +subtype=Aura +[/card] +[card] name=Entangling Vines target=creature[tapped] auto=doesnotuntap @@ -27461,6 +30662,16 @@ mana={8}{U}{U}{U}{U} type=Sorcery [/card] [card] +name=Enthralling Victor +auto=target(creature[power<=2]|opponentbattlefield) transforms((,newability[moveTo(opponentbattlefield)],newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot once +text=When Enthralling Victor enters the battlefield, gain control of target creature an opponent controls with power 2 or less until end of turn. Untap that creature. It gains haste until end of turn. (It can attack and {T} this turn.) +mana={3}{R} +type=Creature +subtype=Human Warrior +power=3 +toughness=2 +[/card] +[card] name=Entomb auto=moveTo(myGraveyard) notatarget(*|myLibrary) text=Search your library for a card and put that card into your graveyard. Then shuffle your library. @@ -27501,9 +30712,9 @@ toughness=2 [/card] [card] name=Entropic Specter -auto=foreach(*|opponenthand) 1/1 -auto=@damaged(controller) from(this):ability$!name(discard) target(*|myhand) reject!$ controller -auto=@damaged(opponent) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent +anyzone=type:*:opponenthand/type:*:opponenthand cdaactive +auto=@damageof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ controller +auto=@damagefoeof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent text=Flying -- As Entropic Specter enters the battlefield, choose an opponent. -- Entropic Specter's power and toughness are each equal to the number of cards in the chosen player's hand. -- Whenever Entropic Specter deals damage to a player, that player discards a card. mana={3}{B}{B} type=Creature @@ -27548,6 +30759,16 @@ type=Enchantment subtype=Aura [/card] [card] +name=Ephara's Warden +auto={T}:tap target(creature[power<=3]) +text={T}:Tap target creature with power 3 or less. +mana={3}{W} +type=Creature +subtype=Human Cleric +power=1 +toughness=2 +[/card] +[card] name=Ephemeron abilities=flying auto={discard(*|myhand)}:moveTo(myhand) @@ -27567,6 +30788,16 @@ mana={4}{R} type=Sorcery [/card] [card] +name=Epic Confrontation +target=creature|mybattlefield +auto=1/2 ueot +auto=transforms((,newability[target(creature|opponentbattlefield) dynamicability])) ueot +restriction=type(creature|opponentbattlefield)~morethan~0 +text=Target creature you control gets +1/+2 until end of turn. It fights target creature you don't control. (Each deals damage equal to its power to the other.) +mana={1}{G} +type=Sorcery +[/card] +[card] name=Epic Proportions abilities=flash target=creature @@ -27640,9 +30871,19 @@ type=Legendary Enchantment [/card] ###The 2 cards above should stay together (Flip Card)### [card] +name=Erebos, God of the Dead +abilities=indestructible,nolifegainopponent +auto={1}{B}{L:2}:Draw:1 controller +auto=this(variable{type:manab}>4) transforms((Creature,setpower=5,settoughness=7)) +text=Indestructible -- As long as your devotion to black is less than five, Erebos isn't a creature. (Each {B} in the mana costs of permanents you control counts toward your devotion to black.) -- Your opponents can't gain life. -- {1}{B}, Pay 2 life: Draw a card. +mana={3}{B} +type=Legendary Enchantment +subtype=God +[/card] +[card] name=Erdwal Ripper abilities=haste -auto=@combatdamaged(opponent) from(this):counter(1/1,1) +auto=@combatdamaged(player) from(this):counter(1/1,1) text=Haste -- Whenever Erdwal Ripper deals combat damage to a player, put a +1/+1 counter on it. mana={1}{R}{R} type=Creature @@ -28030,6 +31271,15 @@ power=0 toughness=0 [/card] [card] +name=Eternal Dominion +target=opponent +auto=target(*[artifact;creature;enchantment;land]|targetedpersonslibrary) moveto(mybattlefield) +auto=if compare(epicactivated)~lessthan~1 then emblem transforms((,newability[epic controller],newability[@each my upkeep:castcard(copied named!:Eternal Dominion:!)])) forever dontremove +text=Search target opponent's library for an artifact, creature, enchantment, or land card. Put that card onto the battlefield under your control. Then that player shuffles his or her library. -- Epic (For the rest of the game, you can't cast spells. At the beginning of each of your upkeeps, copy this spell except for its epic ability. You may choose a new target for the copy.) +mana={7}{U}{U}{U} +type=Sorcery +[/card] +[card] name=Eternal Dragon abilities=flying autohand={2}{cycle}:name(plainscycling) moveTo(myhand) target(plains|mylibrary) @@ -28050,6 +31300,16 @@ mana={2}{R}{R} type=Sorcery [/card] [card] +name=Eternal Thirst +target=creature +auto=teach(creature) lifelink +auto=@movedTo(creature|graveyard) from(opponentBattlefield):counter(1/1,1) +text=Enchant creature -- Enchanted creature has lifelink and "Whenever a creature an opponent controls dies, put a +1/+1 counter on this creature." (Damage dealt by a creature with lifelink also cause its controller to gain that much life.) +mana={1}{B} +type=Enchantment +subtype=Aura +[/card] +[card] name=Eternal Warrior target=creature auto=vigilance @@ -28118,7 +31378,7 @@ toughness=4 [/card] [card] name=Ethereal Haze -auto=preventalldamage to(creature) ueot +auto=preventalldamage from(creature) ueot text=Prevent all damage that would be dealt by creatures this turn. mana={W} type=Instant @@ -28176,7 +31436,7 @@ type=Artifact [/card] [card] name=Etherium Sculptor -auto=lord(artifact|myhand) altercost(colorless,-1) +auto=lord(artifact|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) text=Artifact spells you cast cost {1} less to cast. mana={1}{U} type=Artifact Creature @@ -28235,6 +31495,16 @@ type=Enchantment subtype=Aura [/card] [card] +name=Evangel of Heliod +auto=token(Soldier,Creature Soldier,1/1,white)*type:manaW +text=When Evangel of Heliod enters the battlefield, put a number of 1/1 white Soldier creature tokens onto the battlefield equal to your devotion to white. (Each {W} in the mana costs of permanents you control counts toward your devotion to white.) +mana={4}{W}{W} +type=Creature +subtype=Human Cleric +power=1 +toughness=3 +[/card] +[card] name=Evangelize auto=ability$!name(choose a creature) target(creature|mybattlefield) moveTo(opponentbattlefield)!$ opponent buyback={4}{W}{2}{W}{W} @@ -28553,6 +31823,16 @@ mana={4}{B} type=Sorcery [/card] [card] +name=Exotic Orchard +auto=this(variable{olandg}>0) {t}:add{g} +auto=this(variable{olandu}>0) {t}:add{u} +auto=this(variable{olandr}>0) {t}:add{r} +auto=this(variable{olandb}>0) {t}:add{b} +auto=this(variable{olandw}>0) {t}:add{w} +text={T}: Add to your mana pool one mana of any color that a land an opponent controls could produce. +type=Land +[/card] +[card] name=Expedition Map auto={2}{T}{S}:moveTo(ownerhand) target(land|myLibrary) text={2}, {T}, Sacrifice Expedition Map: Search your library for a land card, reveal it, and put it into your hand. Then shuffle your library. @@ -28645,12 +31925,21 @@ type=Instant [/card] [card] name=Exquisite Blood -auto=@lifeloss(opponent):life:thatmuch controller +auto=@lifelostfoeof(player):life:thatmuch controller text=Whenever an opponent loses life, you gain that much life. mana={4}{B} type=Enchantment [/card] [card] +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. +mana={1}{R}{R} +type=Sorcery +[/card] +[card] name=Exsanguinate auto=life:-X opponent auto=life:X controller @@ -28674,6 +31963,13 @@ mana={1}{U} type=Instant [/card] [card] +name=Extinguish All Hope +auto=all(creature[-enchantment]) destroy +text=Destroy all nonenchantment creatures. +mana={4}{B}{B} +type=Sorcery +[/card] +[card] name=Extortion target=player auto=target(*|targetedpersonshand) reject @@ -28799,12 +32095,29 @@ mana={3}{W} [/card] [card] name=Eye of Ugin -auto=lord(eldrazi[iscolorless]|myhand) altercost(colorless,-2) +auto=lord(eldrazi[iscolorless]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) auto={7}{T}:moveTo(myhand) target(creature[iscolorless]|myLibrary) text=Colorless Eldrazi spells you cast cost {2} less to cast. -- {7}, {T}: Search your library for a colorless creature card, reveal it, and put it into your hand. Then shuffle your library. type=Legendary Land [/card] [card] +name=Eyeblight Assassin +auto=target(creature|opponentbattlefield) -1/-1 ueot +text=When Eyeblight Assassin enters the battlefield, target creature an opponent controls gets -1/-1 until end of turn. +mana={2}{B} +type=Creature +subtype=Elf Assassin +power=2 +toughness=2 +[/card] +[card] +name=Eyeblight Massacre +auto=all(creature[-elf]|battlefield) -2/-2 ueot +text=Non-Elf creatures get -2/-2 until end of turn. +mana={2}{B}{B} +type=Sorcery +[/card] +[card] name=Eyeblight's Ending target=creature[-elf] auto=destroy @@ -28880,6 +32193,17 @@ toughness=1 color=blue [/card] [card] +name=Fabled Hero +abilities=double strike +auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):counter(1/1,1) +text=Double strike. -- Heroic - Whenever you cast a spell that targets Fabled Hero, put a +1/+1 counter on Fabled Hero. +mana={1}{W}{W} +type=Creature +subtype=Human Soldier +power=2 +toughness=2 +[/card] +[card] name=Fabricate auto=moveTo(myHand) notatarget(artifact|myLibrary) text=Search your library for an artifact card, reveal it, and put it into your hand. Then shuffle your library. @@ -28937,6 +32261,14 @@ mana={B} type=Instant [/card] [card] +name=Fade into Antiquity +target=artifact,enchantment +auto=moveto(exile) +text=Exile target Artifact or Enchantment +mana={2}{G} +type=Sorcery +[/card] +[card] name=Faerie Conclave auto=tap auto={T}:Add{U} @@ -28989,6 +32321,17 @@ power=2 toughness=2 [/card] [card] +name=Faerie Miscreant +abilities=flying +auto=if type(Faerie Miscreant|mybattlefield)~morethan~1 then choice draw:1 controller +text=Flying (This creature can't be blocked except by creatures with flying or reach.) -- When Faerie Miscreant enters the battlefield, if you control another creature named Faerie Miscreant, draw a card. +mana={U} +type=Creature +subtype=Faerie Rogue +power=1 +toughness=1 +[/card] +[card] name=Faerie Noble abilities=flying auto=lord(other faerie|myBattlefield) 0/1 @@ -29015,7 +32358,7 @@ toughness=1 [card] name=Faerie Swarm abilities=flying -auto=foreach(*[blue]|myBattlefield) 1/1 +anyzone=type:*[blue]:myBattlefield/type:*[blue]:myBattlefield cdaactive text=Flying -- Faerie Swarm's power and toughness are each equal to the number of blue permanents you control. mana={3}{U} type=Creature @@ -29253,7 +32596,7 @@ toughness=2 #emblem ueot removes the effect, the ability acts an observer [card] name=False Cure -auto=emblem transforms((,newability[@lifed(opponent):life:-twicethatmuch opponent],newability[@lifed(controller):life:-twicethatmuch controller])) ueot +auto=emblem transforms((,newability[@lifefoeof(player):life:-twicethatmuch opponent],newability[@lifeof(player):life:-twicethatmuch controller])) ueot text=Until end of turn, whenever a player gains life, that player loses 2 life for each 1 life he or she gained. mana={B}{B} type=Instant @@ -29351,6 +32694,16 @@ mana={3}{B}{B} type=Sorcery [/card] [card] +name=Fanatic of Mogis +auto=damage:type:manaR opponent +text=When Fanatic of Mogis enters the battlefield, it deals damage to each opponent equal to your devotion to red. (Each {R} in the mana costs of permanents you control counts toward your devotion to red.) +mana={3}{R} +type=Creature +subtype=Minotaur Shaman +power=4 +toughness=2 +[/card] +[card] name=Fanatic of Xenagos abilities=trample auto=ability$!choice name(Tribute 1) all(mystored) counter(1/1) _ choice name(+1/+1 and Haste) all(mystored) haste ueot && all(mystored) 1/1 ueot!$ opponent @@ -29532,13 +32885,20 @@ type=Sorcery [/card] [card] name=Farsight Mask -auto=@damaged(controller) from(*|opponentbattlefield) sourcenottap:may draw:1 controller -auto=@damaged(controller) from(*|opponentstack) sourcenottap:may draw:1 controller +auto=@damageof(player) from(*|opponentbattlefield,opponentstack,opponentgraveyard,opponentlibrary,opponentexile) sourcenottap:may draw:1 controller text=Whenever a source an opponent controls deals damage to you, if Farsight Mask is untapped, you may draw a card. mana={5} type=Artifact [/card] [card] +name=Fascination +auto=choice name(each player draws) Draw:X all(player) +auto=choice name(each player mills) deplete:X all(player) +text=Choose one: -- Each player draws X cards. -- Each player puts the top X cards of his or her library into his or her graveyard. +mana={X}{U}{U} +type=Sorcery +[/card] +[card] name=Fastbond alias=1243 text=You may play any number of additional lands on each of your turns. -- Whenever you play a land, if it wasn't the first land you played this turn, Fastbond deals 1 damage to you. @@ -29582,8 +32942,26 @@ mana={2}{R} type=Instant [/card] [card] +name=Fate Forgotten +target=artifact,enchantment|battlefield +auto=moveto(exile) +text=Exile target artifact or enchantment. +mana={2}{W} +type=Instant +[/card] +[card] +name=Fate Foretold +target=creature +auto=draw:1 controller +auto=@movedTo(mytgt|graveyard) from(battlefield):draw:1 targetcontroller +text=Enchant creature -- When Fate Foretold enters the battlefield, draw a card. -- When enchanted creature dies, its controller draws a card. +mana={1}{U} +type=Enchantment +subtype=Aura +[/card] +[card] name=Fate Unraveler -auto=@drawn(opponent):damage:1 opponent +auto=@drawfoeof(player):damage:1 opponent text=Whenever an opponent draws a card, Fate Unraveler deals 1 damage to that player. mana={3}{B} type=Enchantment Creature @@ -29714,6 +33092,16 @@ mana={1}{U} type=Enchantment [/card] [card] +name=Favored Hoplite +auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):counter(1/1,1) && preventAllDamage to(this) ueot +text=Heroic - Whenever you cast a spell that targets Favored Hoplite, put a +1/+1 counter on Favored Hoplite and prevent all damage that would be dealt to it this turn. +mana={W} +type=Creature +subtype=Human Soldier +power=1 +toughness=2 +[/card] +[card] name=Fear target=creature auto=fear @@ -29723,6 +33111,14 @@ type=Enchantment subtype=Aura [/card] [card] +name=Fearsome Awakening +target=creature|mygraveyard +auto=moveto(mybattlefield) && transforms((,newability[if cantargetcard(dragon) then counter(1/1.2)])) oneshot +text=Return target creature card from your graveyard to the battlefield. If it's a Dragon, put two +1/+1 counters on it. +mana={4}{B} +type=Sorcery +[/card] +[card] name=Fearsome Temper target=creature auto=2/2 @@ -29743,6 +33139,14 @@ mana={1}{B} type=Sorcery [/card] [card] +name=Feast of Dreams +target=creature[enchantment],creature[enchanted] +auto=destroy +text=Destroy target enchanted creature or enchantment creature. +mana={1}{B} +type=Instant +[/card] +[card] name=Feast of Flesh target=creature auto=damage:1 @@ -29782,6 +33186,19 @@ mana={3}{B} type=Instant [/card] [card] +name=Feat of Resistance +target=creature|mybattlefield +auto=choice name(green) transforms((,newability[protection from green])) ueot +auto=choice name(red) transforms((,newability[protection from red])) ueot +auto=choice name(blue) transforms((,newability[protection from blue])) ueot +auto=choice name(black) transforms((,newability[protection from black])) ueot +auto=choice name(white) transforms((,newability[protection from white])) ueot +auto=counter(1/1) +text=Put a +1/+1 counter on target creature you control. It gains protection from the color of your choice until end of turn. +mana={1}{W} +type=Instant +[/card] +[card] name=Fecundity auto=@movedTo(creature|mygraveyard) from(battlefield):may draw:1 controller auto=@movedTo(creature|opponentgraveyard) from(battlefield):draw:1 opponent @@ -29800,6 +33217,13 @@ type=Enchantment subtype=Aura [/card] [card] +name=Feed the Clan +auto=if type(creature[power>=4]|mybattlefield)~morethan~0 then life:10 controller else life:5 controller +text=You gain 5 life. -- Ferocious - You gain 10 life instead if you control a creature with power 4 or greater. +mana={1}{G} +type=Instant +[/card] +[card] name=Feedback target=enchantment auto=@each targetController upkeep:damage:1 targetcontroller @@ -29826,7 +33250,7 @@ type=Instant [/card] [card] name=Feed the Pack -auto=@each my endofturn:may name(sacrifice a non-token creature) target(creature[-token]|mybattlefield) transforms((,newability[token(-262857)*p],newability[sacrifice])) forever +auto=@each my endofturn:may name(sacrifice a non-token creature) target(creature[-token]|mybattlefield) transforms((,newability[token(-262857)*t],newability[sacrifice])) forever text=At the beginning of your end step, you may sacrifice a nontoken creature. If you do, put X 2/2 green Wolf creature tokens onto the battlefield where X is the sacrificed creature's toughness. mana={5}{G} type=Enchantment @@ -29859,6 +33283,25 @@ power=2 toughness=2 [/card] [card] +name=Felhide Minotaur +mana={2}{B} +type=Creature +subtype=Minotaur +power=2 +toughness=3 +[/card] +[card] +name=Felhide Petrifier +abilities=deathtouch +auto=lord(creature[minotaur]|myBattlefield) deathtouch +text=Deathtouch -- Other Minotaur creatures you control have deathtouch. +mana={2}{B} +type=Creature +subtype=Minotaur Warrior +power=2 +toughness=3 +[/card] +[card] name=Felidar Sovereign abilities=vigilance,lifelink auto=@each my upkeep:this(controllerlife > 39) wingame @@ -29870,6 +33313,17 @@ power=4 toughness=6 [/card] [card] +name=Fellwar Stone +auto=this(variable{olandg}>0) {t}:add{g} +auto=this(variable{olandu}>0) {t}:add{u} +auto=this(variable{olandr}>0) {t}:add{r} +auto=this(variable{olandb}>0) {t}:add{b} +auto=this(variable{olandw}>0) {t}:add{w} +text={T}: Add to your mana pool one mana of any color that a land an opponent controls could produce. +mana={2} +type=Artifact +[/card] +[card] name=Femeref Archers auto={T}:damage:4 target(creature[attacking;flying]) text={T}: Femeref Archers deals 4 damage to target attacking creature with flying. @@ -29998,6 +33452,25 @@ mana={1}{G} type=Instant [/card] [card] +name=Feral Invocation +abilities=flash +target=creature +auto=2/2 +text=Flash (You may cast this spell any time you could cast an instant.) -- Enchant creature. -- Enchanted creature gets +2/+2. +mana={2}{G} +type=Enchantment +subtype=Aura +[/card] +[card] +name=Feral Krushok +text= +mana={4}{G} +type=Creature +subtype=Beast +power=5 +toughness=4 +[/card] +[card] name=Feral Lightning auto=token(Elemental,Creature Elemental,3/1,red,haste,unearth)*3 text=Put three 3/1 red Elemental creature tokens with haste onto the battlefield. Exile them at the beginning of the next end step. @@ -30047,7 +33520,7 @@ subtype=Aura [/card] [card] name=Feroz's Ban -auto=lord(creature|hand) altercost(colorless,+2) +auto=lord(creature|hand,library,graveyard,exile) altercost(colorless,+2) text=Creature spells cost {2} more to cast. mana={6} type=Artifact @@ -30062,10 +33535,11 @@ subtype=Beast power=2 toughness=2 [/card] +#produceextra:selectmana when used acts as an observer so the ability must be on the source since its a mayability of mana not a menuability [card] name=Fertile Ground target=land -auto=teach(land) transforms((,newability[@tappedformana(this):chooseacolor add{chosencolor} chooseend])) +auto=all(this) transforms((,newability[produceextra:selectmana])) forever text=Enchant land -- Whenever enchanted land is tapped for mana, its controller adds one mana of any color to his or her mana pool (in addition to the mana the land produces). mana={1}{G} type=Enchantment @@ -30128,6 +33602,13 @@ power=0 toughness=0 [/card] [card] +name=Festergloom +auto=all(creature[-black]|battlefield) -1/-1 ueot +text=Nonblack creatures get -1/-1 until end of turn. +mana={2}{B} +type=Sorcery +[/card] +[card] name=Festerhide Boar abilities=trample auto=if morbid then choice counter(1/1,2) @@ -30157,6 +33638,16 @@ power=1 toughness=1 [/card] [card] +name=Festering Newt +auto=@movedto(this|graveyard) from(mybattlefield):if type(Bogbrew Witch|mybattlefield)~morethan~0 then target(creature|opponentbattlefield) -4/-4 ueot else target(creature|opponentbattlefield) -1/-1 ueot +text=When Festering Newt dies, target creature an opponent controls gets -1/-1 until end of turn. That creature gets -4/-4 instead if you control a creature named Bogbrew Witch. +mana={B} +type=Creature +subtype=Salamander +power=1 +toughness=1 +[/card] +[card] name=Festering Wound target=creature auto=@each my upkeep:may counter(0/0,1,Infection) @@ -30208,6 +33699,17 @@ power=1 toughness=2 [/card] [card] +name=Fetid Imp +abilities=flying +auto={B}:deathtouch ueot +text=Flying (This creature can't be blocked except by creatures with flying or reach.) -- {B}: Fetid Imp gains deathtouch until end of turn. (Any amount of damage it deals to a creature is enough to destroy it.) +mana={1}{B} +type=Creature +subtype=Imp +power=1 +toughness=2 +[/card] +[card] name=Fettergeist abilities=flying auto=foreach(other creature|mybattlefield) upcost[{1}] sacrifice @@ -30367,6 +33869,14 @@ power=2 toughness=2 [/card] [card] +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. +mana={R} +type=Instant +[/card] +[card] name=Fiery Mantle target=creature autograveyard=@movedTo(this|graveyard) from(battlefield):moveTo(ownerhand) @@ -30545,20 +34055,13 @@ toughness=1 name=Fire at Will target=creature[attacking;blocking] auto=damage:1 -auto=may damage:1 target(creature[attacking;blocking]) -auto=token(-1111121) +auto=damage:1 target(creature[attacking;blocking]) +auto=ability$!name(damage) choice target(creature[attacking;blocking]) damage:1!$ controller text=Fire at Will deals 3 damage divided as you choose among one, two, or three target attacking or blocking creatures. mana={RW}{RW}{RW} type=Instant [/card] [card] -name=Fire at Will's 3rd Damage -auto=@movedto(exile) from(this):may damage:1 target(creature,player) -auto=moveto(exile) -id=-1111121 -type=Nothing -[/card] -[card] name=Firebolt target=creature,player auto=damage:2 @@ -30731,6 +34234,28 @@ type=Enchantment subtype=Aura [/card] [card] +name=Firedrinker Satyr +auto=@damaged(this):damage:thatmuch controller +auto={1}{R}:1/0 ueot && damage:1 controller +text=Whenever Firedrinker Satyr is dealt damage, it deals that much damage to you. -- {1}{R}:: Firedrinker Satyr gets +1/+0 until end of turn and deals 1 damage to you. +mana={R} +type=Creature +subtype=Satyr Shaman +power=2 +toughness=1 +[/card] +[card] +name=Firefiend Elemental +abilities=haste +auto=this(cantargetcard(*[-renown]) transforms((,newability[@combatdamaged(player) from(this):counter(1/1) && becomes(renown) forever])) +text=Haste (This creature can attack and {T} as soon as it comes under your control.) -- Renown 1 (When this creature deals combat damage to a player, if it isn't renowned, put a +1/+1 counter on it and it becomes renowned.) +mana={3}{R} +type=Creature +subtype=Elemental +power=3 +toughness=2 +[/card] +[card] name=Firefist Striker auto=@combat(attacking) source(this) restriction{type(other creature[attacking]|myBattlefield)~morethan~1}:cantblock target(creature) ueot text=Battalion — Whenever Firefist Striker and at least two other creatures attack, target creature can't block this turn. @@ -30762,29 +34287,14 @@ power=1 toughness=1 [/card] [card] -name=Remand -target=*|stack -auto=fizzleto(hand) -auto=draw:1 controller -text=Counter target spell. If that spell is countered this way, put it into its owner's hand instead of into that player's graveyard. -- Draw a card. -mana={1}{U} -type=Instant -[/card] -[card] -name=Memory Lapse -target=*|stack -auto=fizzleto(librarytop) -text=Counter target spell. If that spell is countered this way, put it on top of its owner's library instead of into that player's graveyard. -mana={1}{U} -type=Instant -[/card] -[card] -name=Dissipate -target=*|stack -auto=fizzleto(exile) -text=Counter target spell. If that spell is countered this way, exile it instead of putting it into its owner's graveyard. -mana={1}{U}{U} -type=Instant +name=Firehoof Calvary +auto={3}{R}:transforms((,newability[2/0],newability[trample])) ueot +text={3}{R}: Firehoof Cavalry gets +2/+0 and gains trample until end of turn. +mana={W} +type=Creature +subtype=Human Berserker +power=1 +toughness=1 [/card] [card] name=Firemane Angel @@ -30988,6 +34498,7 @@ type=Sorcery [card] name=Five-Alarm Fire auto=@combatdamaged(player) from(creature|mybattlefield):all(this) counter(0/0,1,Blaze) +auto=@combatdamaged(creature) from(creature|mybattlefield):all(this) counter(0/0,1,Blaze) auto={C(0/0,-5,Blaze)}:damage:5 target(creature,player) text=Whenever a creature you control deals combat damage, put a blaze counter on Five-Alarm Fire. -- Remove five blaze counters from Five-Alarm Fire: Five-Alarm Fire deals 5 damage to target creature or player. mana={1}{R}{R} @@ -31112,6 +34623,15 @@ power=2 toughness=3 [/card] [card] +name=Flame Wave +target=player +auto=damage:4 +auto=damage:4 all(creature|targetedpersonsbattlefield) +text=Flame Wave deals 4 damage to target player and each creature he or she controls. +mana={3}{R}{R}{R}{R} +type=Sorcery +[/card] +[card] name=Flameblast Dragon abilities=flying auto=this(attacking) {X}{R}:thisforeach(X) damage:1 target(creature,player) limit:1 @@ -31150,6 +34670,13 @@ mana={R}{R}{R} type=Sorcery [/card] [card] +name=Flamecast Wheel +auto={5}{T}{S}:damage:3 target(creature) +text={5}{T},Sacrifice Flamecast Wheel: Flamecast Wheel deals 3 damage to target creature. +mana={1} +type=Artifact +[/card] +[card] name=Flamecore Elemental auto=upcost[{2}{R}{R};next upkeep] sacrifice text=Echo {2}{R}{R} (At the beginning of your upkeep, if this came under your control since the beginning of your last upkeep, sacrifice it unless you pay its echo cost.) @@ -31200,6 +34727,23 @@ mana={2}{R} type=Sorcery [/card] [card] +name=Flameshadow Conjuring +auto=@movedto(creature[-token]|mybattlefield):all(trigger[to]) pay[[{R}]] clone with(unearth,haste) +text=Whenever a nontoken creature enters the battlefield under your control, you may pay {R}. If you do, put a token onto the battlefield that's a copy of that creature. That token gains haste. Exile it at the beginning of the next end step. +mana={3}{R} +type=Enchantment +[/card] +[card] +name=Flamespeaker's Will +target=creature|mybattlefield +auto=1/1 +auto=@combatdamaged(player) from(mytgt):may sacrifice(this) && destroy target(artifact) +text=Enchant creature you control -- Enchanted creature gets +1/+1. -- Whenever enchanted creature deals combat damage to a player, you may sacrifice Mortal Obstinacy. If you do, destroy target artifact. +mana={R} +type=Enchantment +subtype=Aura +[/card] +[card] name=Flametongue Kavu auto=damage:4 target(creature) text=When Flametongue Kavu enters the battlefield, it deals 4 damage to target creature. @@ -31210,6 +34754,17 @@ power=4 toughness=2 [/card] [card] +name=Flamewake Phoenix +abilities=Flying,haste,mustattack +autograveyard=@each my combatbegins restriction{type(creature[power>=4]|mybattlefield)~morethan~0}:pay({R}) name(Pay {R} to return phoenix) moveTo(mybattlefield) +text=Flying, haste. -- Flamewake Phoenix attacks each turn if able. -- Ferocious - At the beginning of combat on your turn, if you control a creature with power 4 or greater, you may pay {R}. If you do, return Flamewake Phoenix from your graveyard to the battlefield. +mana={1}{R}{R} +type=Creature +subtype=Phoenix +power=2 +toughness=2 +[/card] +[card] name=Flamewave Invoker auto={7}{R}:Damage:5 target(player) text={7}{R}: Flamewave Invoker deals 5 damage to target player. @@ -31313,6 +34868,14 @@ mana={1}{U} type=Instant [/card] [card] +name=Flatten +target=creature|battlefield +auto=-4/-4 ueot +text=Target creature gets -4/-4 until end of turn. +mana={3}{B} +type=Instant +[/card] +[card] name=Flay target=player auto=discard:1 @@ -31421,6 +34984,37 @@ power=1 toughness=1 [/card] [card] +name=Fleecemane Lion +auto=this(cantargetcard(*[-monstrous]) {3}{G}{W}:becomes(monstrous) forever && counter(1/1,1) && transforms((,newability[opponentshroud],newability[indestructible])) forever +text={3}{G}{W}: Monstrosity 1. (If this creature isn't monstrous, put a +1/+1 counter on it and it becomes monstrous.) -- As long as Fleecemane Lion is monstrous, it has hexproof and indestructible. +mana={G}{W} +type=Creature +subtype=Cat +power=3 +toughness=3 +[/card] +[card] +name=Fleetfeather Cockatrice +abilities=flash,flying,deathtouch +auto=this(cantargetcard(*[-monstrous]) {5}{G}{U}:becomes(monstrous) forever && counter(1/1,3) +text=Flash (You may cast this spell any time you could cast an instant.) -- Flying, deathtouch -- {5}{G}{U}: Monstrosity 3. (If this creature isn't monstrous, put three +1/+1 counters on it and it becomes monstrous.) +mana={3}{G}{U} +type=Creature +subtype=Cockatrice +power=3 +toughness=3 +[/card] +[card] +name=Fleetfeather Sandals +auto={2}:equip +auto=teach(creature) flying +auto=teach(creature) haste +text=Equipped creature has flying and haste. -- Equip {2} +mana={2} +type=Artifact +subtype=Equipment +[/card] +[card] name=Fleet-Footed Monk auto=cantbeblockedby(creature[power>=2]) text=Fleet-Footed Monk can't be blocked by creatures with power 2 or greater. @@ -31485,7 +35079,7 @@ toughness=1 [card] name=Flesh Reaver auto=@damaged(creature) from(this):damage:thatmuch controller -auto=@damaged(opponent) from(this):damage:thatmuch controller +auto=@damagefoeof(player) from(this):damage:thatmuch controller text=Whenever Flesh Reaver deals damage to a creature or opponent, Flesh Reaver deals that much damage to you. mana={1}{B} type=Creature @@ -31494,6 +35088,14 @@ power=4 toughness=4 [/card] [card] +name=Flesh to Dust +target=creature +auto=bury +text=Destroy target creature. It can't be regenerated. +mana={3}{B}{B} +type=Instant +[/card] +[card] name=Flesh-Eater Imp abilities=flying,infect auto={S(creature|mybattlefield)}:1/1 @@ -31536,6 +35138,26 @@ power=2 toughness=2 [/card] [card] +name=Fleshmad Steed +auto=@movedTo(other creature|graveyard) from(battlefield):tap +text=Whenever another creature dies, tap Fleshmad Steed +mana={1}{B} +type=Creature +subtype=Horse +power=2 +toughness=2 +[/card] +[card] +name=Fleshpulper Giant +auto=may destroy target(creature[toughness<=2]|battlefield) +text=When Fleshpulper Giant enters the battlefield, you may destroy target creature with a toughness of 2 or less. +mana={5}{R}{R} +type=Creature +subtype=Giant +power=4 +toughness=4 +[/card] +[card] name=Fleshwrither auto={1}{B}{B}{S}:moveTo(myBattlefield) target(creature[manacost=4]|mylibrary) asSorcery text=Transfigure {1}{B}{B} ({1}{B}{B}, Sacrifice this creature: Search your library for a creature card with the same converted mana cost as this creature and put that card onto the battlefield. Then shuffle your library. Transfigure only as a sorcery.) @@ -31566,6 +35188,8 @@ toughness=2 [/card] [card] name=Flickering Ward +alias=1000 +abilities=auraward target=creature auto=chooseacolor teach(creature) protection from(*[chosencolor]) chooseend auto={W}:moveTo(ownerhand) @@ -31643,6 +35267,8 @@ toughness=2 [/card] [card] name=Floating Shield +alias=1000 +abilities=auraward target=creature auto=chooseacolor teach(creature) protection from(*[chosencolor]) chooseend auto={S}:protection from white target(creature) @@ -31738,6 +35364,17 @@ text={T}, Pay 1 life, Sacrifice Flooded Strand: Search your library for a Plains type=Land [/card] [card] +name=Floodtide Serpent +abilities=cantattack +auto={H(enchantment|myBattlefield)}:-cantattack restriction{myattackersonly} +text=Floodtide Serpent can't attack unless you return an enchantment you control to its owner's hand. (This cost is paid as attackers are declared.) +mana={4}{U} +type=Creature +subtype=Serpent +power=4 +toughness=4 +[/card] +[card] name=Floodwater Dam auto={T}:name(X = 0) donothing auto={3}{T}:name(X = 1) target(land) tap @@ -31982,6 +35619,13 @@ power=3 toughness=3 [/card] [card] +name=Flurry of Horns +auto=token(Minotaur,Creature Minotaur,2/3,red,haste)*2 +text=Put two 2/3 red Minotaur creature tokens with haste onto the battlefield. +mana={4}{R} +type=Sorcery +[/card] +[card] name=Flurry of Wings auto=foreach(creature[attacking]) token(Bird Soldier,Creature Bird Soldier,1/1,white flying) text=Put X 1/1 white Bird Soldier creature tokens with flying onto the battlefield, where X is the number of attacking creatures. @@ -32017,6 +35661,15 @@ mana={4} type=Artifact [/card] [card] +name=Flying Crane Technique +auto=untap all(creature|myBattlefield) +auto=all(creature|mybattlefield) double strike ueot +auto=all(creature|mybattlefield) flying ueot +text=Untap all creatures you control. -- Creatures you control gain flying and double strike until end of turn. +mana={3}{U}{R}{W} +type=Instant +[/card] +[card] name=Flying Men abilities=flying text=Flying @@ -32140,6 +35793,27 @@ power=4 toughness=4 [/card] [card] +name=Font of Fertility +auto={1}{G}{S}:moveTo(myBattlefield) and!(tap)! target(basic|mylibrary) && shuffle +text={1}{G}, Sacrifice Font of Fertility: Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. +mana={1}{G} +type=Enchantment +[/card] +[card] +name=Font of Fortunes +auto={1}{U}{T}{S}:draw:2 +text={1}{U}, Sacrifice Font of Fortunes: Draw two cards. +mana={1}{U} +type=Enchantment +[/card] +[card] +name=Font of Ire +auto={3}{R}{T}{S}:damage:5 target(player) +text={3}{R}, Sacrifice Font of Ire: Font of Ire deals 5 damage to target player. +mana={1}{R} +type=Enchantment +[/card] +[card] name=Font of Mythos auto=@each my draw:draw:2 controller auto=@each opponent draw:draw:2 opponent @@ -32148,6 +35822,20 @@ mana={4} type=Artifact [/card] [card] +name=Font of Return +auto={3}{B}{T}{S}:target(creature|mygraveyard) moveTo(myhand) +text={3}{B}, Sacrifice Font of Return: Return up to three target creature cards from your graveyard to your hand. +mana={1}{B} +type=Enchantment +[/card] +[card] +name=Font of Vigor +auto={2}{W}{T}{S}:life:7 +text={2}{W}, Sacrifice Font of Vigor: You gain 7 life. +mana={1}{W} +type=Enchantment +[/card] +[card] name=Fool's Demise target=creature auto=@movedTo(mytgt|graveyard) from(battlefield):all(trigger[to]) moveTo(mybattlefield) @@ -32223,6 +35911,14 @@ mana={1}{U}{U} type=Instant [/card] [card] +name=Forbidden Crypt +abilities=mygraveexiler +auto=replacedraw if type(*|mygraveyard)~morethan~0 then moveto(ownerhand) notatarget(*|mygraveyard) else wingame opponent +text=If you would draw a card, return a card from your graveyard to your hand instead. If you can't, you lose the game. -- If a card would be put into your graveyard from anywhere, exile that card instead. +mana={3}{B}{B} +type=Enchantment +[/card] +[card] name=Forbidden Lore target=land auto=teach(land) {T}:2/1 target(creature) @@ -32251,6 +35947,15 @@ text=Forbidding Watchtower enters the battlefield tapped. -- {T}: Add {W} to you type=Land [/card] [card] +name=Force Away +target=creature +auto=moveTo(ownerhand) +auto=if type(creature[power>=4]|mybattlefield)~morethan~0 then may draw:1 controller && ability$!reject notatarget(*|myhand)!$ controller +text=Return target creature to its owner's hand. Ferocious - If you control a creature with power 4 or greater, you may draw a card. If you do, discard a card. +mana={1}{U} +type=Instant +[/card] +[card] name=Force of Nature abilities=trample auto=upcost[{G}{G}{G}{G}] damage:8 controller @@ -32397,6 +36102,17 @@ power=1 toughness=1 [/card] [card] +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. +mana={2}{R}{R} +type=Enchantment Creature +subtype=Nymph +power=4 +toughness=2 +[/card] +[card] name=Forgestoker Dragon abilities=flying auto=this(attacking) {1}{R}:damage:1 target(creature|battlefield) && removefromcombat @@ -32551,7 +36267,7 @@ toughness=3 name=Fortune Thief facedown={3} autofacedown={R}{R}:morph -auto=@damaged(controller) restriction{compare(lifetotal)~lessthan~1}:this(controllerlife < 1) lifeset:1 controller +auto=this(controllerlife >= 1) transforms((,newability[reduceto:1])) text=Damage that would reduce your life total to less than 1 reduces it to 1 instead. -- Morph {R}{R} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) mana={4}{R} type=Creature @@ -32610,6 +36326,24 @@ power=3 toughness=2 [/card] [card] +name=Foul-Tongue Invocation +target=player +auto=ability$!name(sacrifice a creature) notatarget(creature|mybattlefield) sacrifice!$ targetedplayer +auto=if type(dragon|mybattlefield)~morethan~0 then life:4 controller else if type(dragon|myhand)~morethan~0 then life:4 controller +text=As an additional cost to cast Foul-Tongue Invocation, you may reveal a Dragon card from your hand. -- Target player sacrifices a creature. If you revealed a Dragon card or controlled a Dragon as you cast Foul-Tongue Invocation, you gain 4 life. +mana={2}{B} +type=Instant +[/card] +[card] +name=Foul-Tongue Shriek +target=opponent +auto=life:-type:creature[attacking]:mybattlefield targetedplayer +auto=life:type:creature[attacking]:mybattlefield controller +text=Target opponent loses 1 life for each attacking creature you control. You gain that much life. +mana={B} +type=Instant +[/card] +[card] name=Foundry Champion auto=damage:type:creature:mybattlefield target(creature,player) auto={R}:1/0 ueot @@ -32622,6 +36356,13 @@ power=4 toughness=4 [/card] [card] +name=Foundry of the Consuls +auto={T}:add{1} +auto={5}{T}{S}:token(Thopter,Artifact Creature Thopter,1/1,flying)*2 controller +text={T}: Add {1} to your mana pool. -- {5}, {T}, Sacrifice Foundry of the Consuls: Put two 1/1 colorless Thopter artifact creature tokens with flying onto the battlefield. +type=Land +[/card] +[card] name=Foundry Street Denizen auto=@movedTo(other creature[red]|mybattlefield):1/0 ueot text=Whenever another red creature enters the battlefield under your control, Foundry Street Denizen gets +1/+0 until end of turn. @@ -32925,7 +36666,7 @@ toughness=2 [card] name=Frogtosser Banneret abilities=haste -auto=lord(*[goblin;rogue]|myhand) altercost(colorless, -1) +auto=lord(*[goblin;rogue]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) text=Haste -- Goblin spells and Rogue spells you cast cost {1} less to cast. mana={1}{B} type=Creature @@ -32934,6 +36675,15 @@ power=1 toughness=1 [/card] [card] +name=Frontier Bivouac +auto=tap +auto={T}:Add{G} +auto={T}:Add{U} +auto={T}:Add{R} +text=Frontier Bivouac enters the battlefield tapped. -- {T}: Add {G}, {U}, or {R} to your mana pool. +type=Land +[/card] +[card] name=Frontier Guide auto={3}{G}{T}:moveTo(myBattlefield) and!(tap)! target(land[basic]|myLibrary) text={3}{G}, {T}: Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library. @@ -32944,6 +36694,16 @@ power=1 toughness=1 [/card] [card] +name=Frontier Mastodon +auto=if type(creature[power>=4]|mybattlefield)~morethan~0 then counter(1/1,1) +text=Ferocious - Frontier Mastodon enters the battlefield with a +1/+1 counter on it if you control a creature with power 4 or greater. +mana={2}{G} +type=Creature +subtype=Elephant +power=3 +toughness=2 +[/card] +[card] name=Frontline Sage abilities=exalted auto={u}{T}:draw:1 && transforms((,newability[target(*|myhand) reject])) forever @@ -32986,6 +36746,16 @@ power=4 toughness=4 [/card] [card] +name=Frost Lynx +auto=name(Tap and Freeze) target(creature|opponentbattlefield) transforms((,newability[tap],newability[frozen])) +text=When Frost Lynx enters the battlefield, tap target creature an opponent controls. It doesn't untap during its controller's next untap step. +mana={2}{U} +type=Creature +subtype=Elemental Cat +power=2 +toughness=2 +[/card] +[card] name=Frost Marsh auto=tap auto={T}:Add{U} @@ -33002,6 +36772,16 @@ power=5 toughness=3 [/card] [card] +name=Frost Walker +auto=@targeted(this):sacrifice +text=When Frost Walker becomes the target of a spell or ability, sacrifice it. +mana={1}{U} +type=Creature +subtype=Elemental +power=4 +toughness=1 +[/card] +[card] name=Frostburn Weird auto={UR}:1/-1 text={UR}: Frostburn Weird gets +1/-1 until end of turn. @@ -33082,6 +36862,15 @@ type=Enchantment subtype=Aura [/card] [card] +name=Fruit of the First Tree +target=creature|mybattlefield +auto=@movedto(mytgt|graveyard) from(Battlefield):choice life:toughness controller && draw:toughness controller +text=Enchant creature you control -- When enchanted creature dies, you gain X life and draw X cards, where X is its toughness. +mana={3}{G} +type=Enchantment +subtype=Aura +[/card] +[card] name=Fruition auto=life:type:forest:battlefield text=You gain 1 life for each Forest on the battlefield. @@ -33164,7 +36953,7 @@ type=Sorcery [/card] [card] name=Fumiko the Lowblood -auto=bushido(type:creature[attacking]:battlefield/type:creature[attacking]:battlefield) +auto=aslongas(creature[attacking]) bushido(type:creature[attacking]:battlefield/type:creature[attacking]:battlefield) auto=lord(creature|opponentBattlefield) mustattack text=Fumiko the Lowblood has bushido X, where X is the number of attacking creatures. (When this blocks or becomes blocked, it gets +X/+X until end of turn.) -- Creatures your opponents control attack each turn if able. mana={2}{R}{R} @@ -33210,7 +36999,7 @@ auto={G}{G}:counter(0/0,1,Spore) target(fungus) [card] name=Fungal Shambler abilities=trample -auto=@damaged(opponent) from(this):draw:1 controller && ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@damagefoeof(player) from(this):draw:1 controller && ability$!name(discard) target(*|myhand) reject!$ opponent text=Trample -- Whenever Fungal Shambler deals damage to an opponent, you draw a card and that opponent discards a card. mana={4}{G}{U}{B} type=Creature @@ -33283,7 +37072,7 @@ toughness=3 [/card] [card] name=Furnace Celebration -auto=@sacrificed(other *|mybattlefield):pay({2}) damage:2 target(creature,player) +auto=@sacrificed(other *|mybattlefield):ability$!name(pay 2 for damage) pay[[{2}]] name(pay 2 for damage) damage:2 target(creature,player)!$ controller mana={1}{R}{R} type=Enchantment text=Whenever you sacrifice another permanent, you may pay {2}. If you do, Furnace Celebration deals 2 damage to target creature or player. @@ -33413,6 +37202,7 @@ toughness=3 [/card] [card] name=Fylgja +target=creature auto=all(this) counter(0/0,4,Healing) auto={C(0/0,-1,Healing)}:prevent:1 auto={2}{W}:all(this) counter(0/0,1,Healing) @@ -33588,6 +37378,16 @@ power=3 toughness=3 [/card] [card] +name=Galerider Sliver +auto=lord(sliver|mybattlefield) flying +text=Sliver creatures you control have flying. +mana={U} +type=Creature +subtype=Sliver +power=1 +toughness=1 +[/card] +[card] name=Galina's Knight abilities=protection from red text=Protection from red @@ -33770,6 +37570,18 @@ power=3 toughness=3 [/card] [card] +name=Garruk, Apex Predator +auto=counter(0/0,5,loyalty) +auto={C(0/0,1,Loyalty)}:name(destroy Planeswalker) destroy target(other planeswalker|battlefield) +auto={C(0/0,1,Loyalty)}:name(3/3 Beast) token(Beast,Creature Beast,3/3,deathtouch,black) +auto={C(0/0,-3,Loyalty)}:name(Destroy Creature) target(creature) dynamicability && destroy +auto={C(0/0,-8,Loyalty)}:name(Emblem) emblem transforms((,newability[@combat(attacking) source(creature|mybattlefield):all(trigger[to]) 5/5 ueot],newability[@combat(attacking) source(creature|mybattlefield):all(trigger[to]) trample ueot])) forever dontremove +text=+1: Destroy another target planeswalker. -- +1: Put a 3/3 black Beast creature token with deathtouch onto the battlefield. -- -3: Destroy target creature. You gain life equal to its toughness. -- -8: Target opponent gets an emblem with "Whenever a creature attacks you, it gets +5/+5 and gains trample until end of turn." -- Starting Loyalty {5} +mana={5}{B}{G} +type=Planeswalker +subtype=Garruk +[/card] +[card] name=Garruk, Primal Hunter auto=counter(0/0,3,loyalty) auto={C(0/0,1,Loyalty)}:token(Beast,Creature Beast,3/3,green) @@ -33885,6 +37697,16 @@ power=1 toughness=1 [/card] [card] +name=Gate Smasher +auto={3}:equip target(creature[toughness>=4]|mybattlefield) +auto=teach(creature) 3/0 +auto=teach(creature) trample +text=Gate Smasher can be attached only to a creature with toughness 4 or greater. -- Equipped creature gets +3/+0 and has trample. -- Equip {3} +mana={3} +type=Artifact +subtype=Equipment +[/card] +[card] name=Gate to Phyrexia auto={S(creature|myBattlefield)}:destroy target(artifact) limit:1 myUpkeepOnly text=Sacrifice a creature: Destroy target artifact. Activate this ability only during your upkeep and only once each turn. @@ -33974,26 +37796,26 @@ text=Intimidate (This creature can't be blocked except by artifact creatures and color=green type=Creature subtype=Werewolf -power=4 -toughness=4 +power=3 +toughness=3 [/card] ###The 2 cards above should stay together (Flip Card)### [card] name=Gauntlet of Might auto=lord(creature[red]) 1/1 -auto=@tappedformana(mountain|mybattlefield):Add{R} controller -auto=@tappedformana(mountain|opponentbattlefield):Add{R} opponent +auto=lord(mountain|battlefield) transforms((,newability[produceextra:{R}])) text=Red creatures get +1/+1. -- Whenever a Mountain is tapped for mana, its controller adds {R} to his or her mana pool (in addition to the mana the land produces). mana={4} type=Artifact [/card] +#producecolor looks for the color... maybe needs restriction... [card] name=Gauntlet of Power -auto=choice name(choose white) all(this) transforms((,newability[lord(creature[white]|battlefield) 1/1],newability[@tappedformana(plains[basic]|mybattlefield):add{W}],newability[@tappedformana(plains[basic]|opponentbattlefield):add{W} opponent])) forever -auto=choice name(choose blue) all(this) transforms((,newability[lord(creature[blue]|battlefield) 1/1],newability[@tappedformana(island[basic]|mybattlefield):add{U}],newability[@tappedformana(island[basic]|opponentbattlefield):add{U} opponent])) forever -auto=choice name(choose black) all(this) transforms((,newability[lord(creature[black]|battlefield) 1/1],newability[@tappedformana(swamp[basic]|mybattlefield):add{B}],newability[@tappedformana(swamp[basic]|opponentbattlefield):add{B} opponent])) forever -auto=choice name(choose red) all(this) transforms((,newability[lord(creature[red]|battlefield) 1/1],newability[@tappedformana(mountain[basic]|mybattlefield):add{R}],newability[@tappedformana(mountain[basic]|opponentbattlefield):add{R} opponent])) forever -auto=choice name(choose green) all(this) transforms((,newability[lord(creature[green]|battlefield) 1/1],newability[@tappedformana(forest[basic]|mybattlefield):add{G}],newability[@tappedformana(forest[basic]|opponentbattlefield):add{G} opponent])) forever +auto=choice name(green) all(this) transforms((,newability[lord(creature[green]|battlefield) 1/1],newability[lord(forest[basic]|battlefield) producecolor:green])) forever +auto=choice name(blue) all(this) transforms((,newability[lord(creature[blue]|battlefield) 1/1],newability[lord(island[basic]|battlefield) producecolor:blue])) forever +auto=choice name(red) all(this) transforms((,newability[lord(creature[red]|battlefield) 1/1],newability[lord(mountain[basic]|battlefield) producecolor:red])) forever +auto=choice name(black) all(this) transforms((,newability[lord(creature[black]|battlefield) 1/1],newability[lord(swamp[basic]|battlefield) producecolor:black])) forever +auto=choice name(white) all(this) transforms((,newability[lord(creature[white]|battlefield) 1/1],newability[lord(plains[basic]|battlefield) producecolor:white])) forever text=As Gauntlet of Power enters the battlefield, choose a color. -- Creatures of the chosen color get +1/+1. -- Whenever a basic land is tapped for mana of the chosen color, its controller adds one mana of that color to his or her mana pool (in addition to the mana the land produces). mana={5} type=Artifact @@ -34052,6 +37874,16 @@ power=2 toughness=2 [/card] [card] +name=Geist of the Moors +abilities=flying +text=Flying +mana={1}{W}{W} +type=Creature +subtype=Spirit +power=3 +toughness=1 +[/card] +[card] name=Geist Snatch target=creature|stack auto=fizzle @@ -34094,7 +37926,7 @@ type=Instant name=Geist-Honored Monk abilities=vigilance auto=token(Spirit,Creature Spirit,1/1,white,flying)*2 -auto=foreach(creature|mybattlefield) 1/1 +anyzone=type:creature:mybattlefield/type:creature:mybattlefield cdaactive text=Vigilance -- Geist-Honored Monk's power and toughness are each equal to the number of creatures you control. -- When Geist-Honored Monk enters the battlefield, put two 1/1 white Spirit creature tokens with flying onto the battlefield. mana={3}{W}{W} type=Creature @@ -34205,13 +38037,16 @@ type=Artifact [card] name=Gemstone Mine auto=counter(0/0,3,Mining) -auto={T}{C(0/0,-1,Mining)}:Add{W} -auto={T}{C(0/0,-1,Mining)}:Add{U} -auto={T}{C(0/0,-1,Mining)}:Add{B} -auto={T}{C(0/0,-1,Mining)}:Add{R} -auto={T}{C(0/0,-1,Mining)}:Add{G} -auto=@tapped(this):bury all(gemstone mine[-counter{0/0.1.Mining}]) -auto=this(counter{0/0.1.Mining}<1) {0}:sacrifice all(this) +auto=this(counter{0/0,1,Mining}>1) {T}{C(0/0,-1,Mining)}:Add{G} +auto=this(counter{0/0,1,Mining}>1) {T}{C(0/0,-1,Mining)}:Add{R} +auto=this(counter{0/0,1,Mining}>1) {T}{C(0/0,-1,Mining)}:Add{U} +auto=this(counter{0/0,1,Mining}>1) {T}{C(0/0,-1,Mining)}:Add{B} +auto=this(counter{0/0,1,Mining}>1) {T}{C(0/0,-1,Mining)}:Add{W} +auto=this(counter{0/0,1,Mining}=1) {T}{C(0/0,-1,Mining)}:Add{G} && sacrifice +auto=this(counter{0/0,1,Mining}=1) {T}{C(0/0,-1,Mining)}:Add{R} && sacrifice +auto=this(counter{0/0,1,Mining}=1) {T}{C(0/0,-1,Mining)}:Add{U} && sacrifice +auto=this(counter{0/0,1,Mining}=1) {T}{C(0/0,-1,Mining)}:Add{B} && sacrifice +auto=this(counter{0/0,1,Mining}=1) {T}{C(0/0,-1,Mining)}:Add{W} && sacrifice text=Gemstone Mine enters the battlefield with three mining counters on it. -- {T}, Remove a mining counter from Gemstone Mine: Add one mana of any color to your mana pool. If there are no mining counters on Gemstone Mine, sacrifice it. type=Land [/card] @@ -34389,7 +38224,7 @@ type=Artifact name=Geth's Verdict target=player auto=life:-1 -auto=ability$!name(sacrifice) target(creature|mybattlefield) sacrifice!$ targetedplayer +auto=ability$!name(sacrifice) notatarget(creature|mybattlefield) sacrifice!$ targetedplayer text=Target player sacrifices a creature and loses 1 life. mana={B}{B} type=Instant @@ -34439,7 +38274,8 @@ toughness=4 [card] name=Ghastlord of Fugue auto=unblockable -auto=@combatdamaged(player) from(this):moveTo(myexile) target(*|opponenthand) +auto=@combatdamagefoeof(player) from(this):may moveTo(myexile) target(*|opponenthand) +auto=@combatdamageof(player) from(this):may moveTo(myexile) target(*|myhand) text=Ghastlord of Fugue is unblockable. -- Whenever Ghastlord of Fugue deals combat damage to a player, that player reveals his or her hand. You choose a card from it. That player exiles that card. mana={UB}{UB}{UB}{UB}{UB} type=Creature @@ -34488,6 +38324,23 @@ power=2 toughness=2 [/card] [card] +name=Ghirapur AEther Grid +auto={T(artifact[-tapped]|mybattlefield)}{T(artifact[-tapped]|mybattlefield)}:damage:1 target(creature,player) +text=Tap two untapped artifacts you control: Ghirapur AEther Grid deals 1 damage to target creature or player. +mana={2}{R} +type=Enchantment +[/card] +[card] +name=Ghirapur Gearcrafter +auto=token(Thopter,Artifact Creature Thopter,1/1,flying) controller +text=When Ghirapur Gearcrafter enters the battlefield, put a 1/1 colorless Thopter artifact creature token with flying onto the battlefield. (A creature with flying can't be blocked except by creatures with flying or reach.) +mana={2}{R} +type=Creature +subtype=Human Artificer +power=2 +toughness=1 +[/card] +[card] name=Ghitu Encampment auto=tap auto={T}:Add{R} @@ -35098,6 +38951,13 @@ power=1 toughness=1 [/card] [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. +mana={5}{W}{W} +type=Instant +[/card] +[card] name=Gift of Estates auto=if type(land|opponentbattlefield)~morethan~type(land|mybattlefield) then target(plains|mylibrary) moveto(myhand) text=If an opponent controls more lands than you, search your library for up to three Plains cards, reveal them, and put them into your hand. Then shuffle your library. @@ -35115,6 +38975,16 @@ type=Enchantment subtype=Aura [/card] [card] +name=Gift of Immortality +target=creature +auto=@movedTo(mytgt|graveyard) from(battlefield):all(this) transforms((,newability[@next end:target(creature[gift]) retarget])) oneshot +auto=@movedTo(mytgt|graveyard) from(battlefield):all(trigger[to]) moveTo(targetcontrollerbattlefield) and!( transforms((gift)) ueot)! +text=Enchant creature -- When enchanted creature dies, return that card to the battlefield under its owner's control. Return Gift of Immortality to the battlefield attached to that creature at the beginning of the next end step. +mana={2}{W} +type=Enchantment +subtype=Aura +[/card] +[card] name=Gift of Orzhova target=creature auto=1/1 @@ -35260,6 +39130,17 @@ text=Cumulative upkeep - Pay 2 life. (At the beginning of your upkeep, put an ag type=Land [/card] [card] +name=Glacial Crasher +abilities=trample, cantattack +auto=aslongas(mountain|Battlefield) -cantattack +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 +subtype=Elemental +power=5 +toughness=5 +[/card] +[card] name=Glacial Crevasses auto={S(mountain[snow]|myBattlefield)}:fog oneshot text=Sacrifice a snow Mountain: Prevent all combat damage that would be dealt this turn. @@ -35276,6 +39157,17 @@ text=Glacial Fortress enters the battlefield tapped unless you control a Plains type=Land [/card] [card] +name=Glacial Stalker +facedown={3} +autofacedown={4}{U}:morph +text=Morph {2}{W} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) +mana={5}{U} +type=Creature +subtype=Elemental +power=4 +toughness=5 +[/card] +[card] name=Glacial Wall abilities=defender text=Defender (This creature can't attack.) @@ -35305,6 +39197,17 @@ power=4 toughness=4 [/card] [card] +name=Glade Watcher +abilities=defender +auto={G}:canattack restriction{compare(powertotalinplay)~morethan~7} ueot +text=Defender -- Formidable — {G}: Glade Watcher can attack this turn as though it didn't have defender. Activate this ability only if creatures you control have total power 8 or greater. +mana={1}{G} +type=Creature +subtype=Elemental +power=3 +toughness=3 +[/card] +[card] name=Gladecover Scout abilities=opponentshroud text=Hexproof (This creature can't be the target of spells or abilities your opponents control.) @@ -35315,6 +39218,14 @@ power=1 toughness=1 [/card] [card] +name=Glare of Heresy +target=*[white] +auto=moveto(exile) +text=Exile target white permanent. +mana={1}{W} +type=Sorcery +[/card] +[card] name=Glare of Subdual auto={T(creature|mybattlefield)}:tap target(creature,artifact) text=Tap an untapped creature you control: Tap target artifact or creature. @@ -35335,6 +39246,16 @@ power=3 toughness=1 [/card] [card] +name=Glaring Aegis +target=creature|battlefield +auto=tap target(creature|opponentbattlefield) +auto=teach(creature) 1/3 +text=Enchant creature -- When Glaring Aegis enters the battlefield, tap target creature an opponent controls. -- Enchanted creature gets +1/+3. +mana={W} +type=Enchantment +subtype=Aura +[/card] +[card] name=Glaring Spotlight auto=lord(creature|opponentbattlefield) -opponentshroud auto={3}{S}:name(hexproof & unblockable) all(creature|mybattlefield) transforms((,opponentshroud,unblockable)) ueot @@ -35474,7 +39395,7 @@ toughness=2 [card] name=Glimmerpoint Stag abilities=vigilance -auto=(blink)ueot target(*) +auto=(blink)ueot target(other *) text=Vigilance -- When Glimmerpoint Stag enters the battlefield, exile another target permanent. Return that card to the battlefield under its owner's control at the beginning of the next end step. mana={2}{W}{W} type=Creature @@ -35518,6 +39439,15 @@ mana={G} type=Sorcery [/card] [card] +name=Glint +target=creature|mybattlefield +auto=0/3 ueot +auto=opponentshroud ueot +text=Target creature you control gets +0/+3 and gains hexproof until end of turn. (It can't be the target of spells or abilities your opponents control.) +mana={1}{U} +type=Instant +[/card] +[card] name=Glint-Eye Nephilim auto=@combatdamaged(player) from(this):draw:thatmuch controller auto={1}{discard(*|myhand)}:1/1 @@ -35696,8 +39626,8 @@ toughness=3 [/card] [card] name=Glory of Warfare -auto=this(variable{controllerturn}) lord(creature|mybattlefield) 2/0 -auto=this(variable{opponentturn}) lord(creature|mybattlefield) 0/2 +auto=this(variable{controllerturn}>0) lord(creature|mybattlefield) 2/0 +auto=this(variable{opponentturn}>0) lord(creature|mybattlefield) 0/2 text=As long as it's your turn, creatures you control get +2/+0. -- As long as it's not your turn, creatures you control get +0/+2. mana={2}{R}{W} type=Enchantment @@ -35732,8 +39662,8 @@ toughness=3 [/card] [card] name=Glowrider -auto=lord(*[-creature]|myhand) altercost(colorless,+1) -auto=lord(*[-creature]|opponenthand) altercost(colorless, +1) +auto=lord(*[-creature]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,+1) +auto=lord(*[-creature]|opponenthand,opponentlibrary,opponentgraveyard,opponentexile) altercost(colorless, +1) text=Noncreature spells cost {1} more to cast. mana={2}{W} type=Creature @@ -35742,6 +39672,16 @@ power=2 toughness=1 [/card] [card] +name=Gluttonous Cyclops +auto=this(cantargetcard(*[-monstrous]) {5}{R}{R}:becomes(monstrous) forever && counter(1/1,3) +text={5}{R}{R}: Monstrosity 3. (If this creature isn't monstrous, put three +1/+1 counters on it and it becomes monstrous.) +mana={5}{R} +type=Creature +subtype=Cyclops +power=5 +toughness=4 +[/card] +[card] name=Gluttonous Slime abilities=flash auto=may target(other creature|mybattlefield) sacrifice && counter(1/1,1) all(this) @@ -35799,6 +39739,16 @@ power=3 toughness=1 [/card] [card] +name=Gnat Miser +auto=hmodifer:-1 opponent +text=Each opponent's maximum hand size is reduced by one. +mana={B} +type=Creature +subtype=Rat Shaman +power=1 +toughness=1 +[/card] +[card] name=Gnathosaur auto={S(artifact|mybattlefield)}:trample text=Sacrifice an artifact: Gnathosaur gains trample until end of turn. @@ -35827,6 +39777,16 @@ mana={2}{G} type=Instant [/card] [card] +name=Gnawing Zombie +auto={S(creature|myBattlefield)}:life:-1 target(player) && life:1 controller +text={1}{B}, Sacrifice a creature: Target player loses 1 life and you gain 1 life. +mana={1}{B} +type=Creature +subtype=Zombie +power=1 +toughness=3 +[/card] +[card] name=Gobbling Ooze auto={G}{S(other creature|mybattlefield)}:counter(1/1,1) text={G}, Sacrifice another creature: Put a +1/+1 counter on Gobbling Ooze. @@ -35941,6 +39901,14 @@ mana={1}{R} type=Enchantment [/card] [card] +name=Goblin Boom Keg +auto=@each my upkeep:sacrifice +auto=@movedTo(this|graveyard) from(battlefield):damage:3 target(creature,player) +text=At the beginning of your upkeep, sacrifice Goblin Boom Keg. -- When Goblin Boom Keg is put into a graveyard from the battlefield, it deals 3 damage to target creature or player. +mana={4} +type=Artifact +[/card] +[card] name=Goblin Brawler abilities=first strike auto=cantbetargetof(equipment) @@ -36106,6 +40074,16 @@ power=1 toughness=1 [/card] [card] +name=Goblin Diplomats +auto={T}:all(creature|battlefield) mustattack ueot +text={T}: Each creature attacks this turn if able. +mana={1}{R} +type=Creature +subtype=Goblin +power=2 +toughness=1 +[/card] +[card] name=Goblin Dirigible abilities=doesnotuntap,flying auto={4}:untap myUpkeepOnly @@ -36129,7 +40107,7 @@ toughness=4 [/card] [card] name=Goblin Electromancer -auto=lord(*[instant;sorcery]|myhand) altercost(colorless,-1) +auto=lord(*[instant;sorcery]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) text=Instant and sorcery spells you cast cost {1} less to cast. mana={U}{R} type=Creature @@ -36247,6 +40225,18 @@ mana={R}{S(goblin|mybattlefield)} type=Sorcery [/card] [card] +name=Goblin Heelcutter +auto=@combat(attacking) source(this):cantblock target(creature) ueot +other={2}{R} name(Dash) +auto=if paid(alternative) then transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveto(ownerhand) all(this)])) forever +text=Dash {2}{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.) -- Whenever Goblin Heelcutter attacks, target creature can't block this turn. +mana={3}{R} +type=Creature +subtype=Goblin Berserker +power=3 +toughness=2 +[/card] +[card] name=Goblin Hero mana={2}{R} type=Creature @@ -36255,6 +40245,22 @@ power=2 toughness=2 [/card] [card] +name=Goblin Kaboomist +auto=@each my upkeep:token(-383257) controller && flipacoin loseability damage:2 loseabilityend flipend +text=At the beginning of your upkeep, put a colorless artifact token named Land Mine onto the battlefield with "Red, Sacrifice this artifact: This artifact deals 2 damage to target attacking creature without flying." Then flip a coin. If you lose the flip, Goblin Kaboomist deals 2 damage to itself. +mana={1}{R} +type=Creature +subtype=Goblin Warrior +power=1 +toughness=2 +[/card] +[card] +name=Land Mine +auto={R}{S}:damage:2 target(creature[attacking;-flying]) +text={R}, Sacrifice this artifact: This artifact deals 2 damage to target attacking creature without flying. +type=Artifact +[/card] +[card] name=Goblin King auto=lord(other goblin) 1/1 auto=lord(other goblin) mountainwalk @@ -36440,6 +40446,18 @@ power=2 toughness=2 [/card] [card] +name=Goblin Rabblemaster +auto=lord(other goblin|mybattlefield) mustattack +auto=@each my combatbegins:token(Goblin,Creature Goblin,1/1,haste,red) +auto=@combat(attacking) source(this):all(this) foreach(other goblin[attacking]|battlefield) 1/0 ueot +text=Other Goblin creatures you control attack each turn if able. -- At the beginning of combat on your turn, put a 1/1 red Goblin creature token with haste onto the battlefield. -- Whenever Goblin Rabblemaster attacks, it gets +1/+0 until end of turn for each other attacking Goblin. +mana={2}{R} +type=Creature +subtype=Goblin Warrior +power=2 +toughness=2 +[/card] +[card] name=Goblin Rally auto=token(Goblin,Creature Goblin,1/1,red)*4 text=Put four 1/1 red Goblin creature tokens onto the battlefield. @@ -36760,7 +40778,7 @@ toughness=3 [/card] [card] name=Goblin Warchief -auto=lord(goblin|myhand) altercost(colorless,-1) +auto=lord(goblin|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=lord(goblin|myBattlefield) haste text=Goblin spells you cast cost {1} less to cast. -- Goblin creatures you control have haste. mana={1}{R}{R} @@ -36820,6 +40838,13 @@ power=1 toughness=1 [/card] [card] +name=Goblinslide +auto=@movedTo(*[-creature]|mystack):pay({1}) token(Goblin,Creature Goblin,1/1, haste, red) +text=Enchantment. -- Whenever you cast a noncreature spell, you may pay {1}. If you do, put a 1/1 red Goblin creature token with haste onto the battlefield. +mana={2}{R} +type=Enchantment +[/card] +[card] name=God-Favored General auto=@untapped(this):name(pay 2W for 2 1/1 Soldiers) pay[[{2}{W}]] name(Pay 2W) token(Soldier,Enchantment Creature Soldier,1/1,white)*2 controller text=Inspired -- Whenever God-Favored General becomes untapped, you may pay {2}{W}. If you do, put two 1/1 white Soldier enchantment creature tokens onto the battlefield. @@ -36841,6 +40866,18 @@ power=4 toughness=4 [/card] [card] +name=Godhunter Octopus +abilities=cantattack +auto=aslongas(enchantment|opponentBattlefield) -cantattack +auto=aslongas(*[enchanted]|opponentBattlefield) -cantattack +text=Godhunter Octopus can't attack unless defending player controls an enchantment or an enchanted permanent. +mana={5}{U} +type=Creature +subtype=Octopus +power=5 +toughness=5 +[/card] +[card] name=Godless Shrine auto=tap auto=pay({L:2}) untap @@ -36926,6 +40963,16 @@ power=4 toughness=3 [/card] [card] +name=Golden Hind +auto={T}:Add{G} +text={T}: Add {G} to your mana pool. +mana={1}{G} +type=Creature +subtype=Elk +power=2 +toughness=1 +[/card] +[card] name=Golden Urn auto=@each my upkeep:may counter(0/0,1,Charge) auto={T}{S}:dynamicability @@ -36987,7 +41034,7 @@ toughness=2 [card] name=Goldnight Redeemer abilities=flying -auto=life:twicetype:other creature:mybattlefield controller +auto=life:twiceothertype:creature:mybattlefield controller text=Flying -- When Goldnight Redeemer enters the battlefield, you gain 2 life for each other creature you control. mana={4}{W}{W} type=Creature @@ -36996,6 +41043,16 @@ power=4 toughness=4 [/card] [card] +name=Gold-Forged Sentinel +abilities=flying +text=Flying +mana={6} +type=Artifact Creature +subtype=Chimera +power=4 +toughness=4 +[/card] +[card] name=Golem Artisan auto={2}:1/1 target(creature[artifact]) auto={2}:flying target(creature[artifact]) @@ -37195,6 +41252,14 @@ power=7 toughness=6 [/card] [card] +name=Gore Swine +mana={2}{R} +type=Creature +subtype=Boar +power=4 +toughness=1 +[/card] +[card] name=Gore Vassal auto={S}:target(creature) transforms((,newability[counter(-1/-1,1)],newability[if cantargetcard(creature[power>=1]) then regenerate])) forever text=Sacrifice Gore Vassal: Put a -/1-1 counter on target creature. Then, if that creature's toughness is 1 or greater, regenerate it. @@ -37352,6 +41417,16 @@ power=4 toughness=4 [/card] [card] +name=Graceblade Artisan +auto=thisforeach(auras > 0) 2/2 +text=Graceblade Artisan gets +2/+2 for each Aura attached to it. +mana={2}{W} +type=Creature +subtype=Human Monk +power=2 +toughness=3 +[/card] +[card] name=Graceful Adept abilities=nomaxhand text=You have no maximum hand size. @@ -37379,8 +41454,8 @@ type=Artifact [/card] [card] name=Grand Abolisher -auto=this(variable{controllerturn}) maxCast(*)0 opponent -auto=this(variable{controllerturn}) lord(*[artifact;enchantment;creature]|opponentbattlefield) noactivatedability +auto=this(variable{controllerturn}>0) maxCast(*)0 opponent +auto=this(variable{controllerturn}>0) lord(*[artifact;enchantment;creature]|opponentbattlefield) noactivatedability text=During your turn, your opponents can't cast spells or activate abilities of artifacts, creatures, or enchantments. mana={W}{W} type=Creature @@ -37390,9 +41465,9 @@ toughness=2 [/card] [card] name=Grand Arbiter Augustin IV -auto=lord(*[white]|myhand) altercost(colorless,-1) -auto=lord(*[blue]|myhand) altercost(colorless,-1) -auto=lord(*|opponenthand) altercost( colorless,+1) +auto=lord(*[white]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) +auto=lord(*[blue]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) +auto=lord(*|opponenthand,opponentlibrary,opponentgraveyard,opponentexile) altercost( colorless,+1) text=White spells you cast cost {1} less to cast. -- Blue spells you cast cost {1} less to cast. -- Spells your opponents cast cost {1} more to cast. mana={2}{W}{U} type=Legendary Creature @@ -37514,6 +41589,16 @@ mana={3}{U} type=Sorcery [/card] [card] +name=Grasp of the Hieromancer +target=creature +auto=teach(creature) 1/1 +auto=@combat(attacking) source(mytgt):tap target(creature|opponentbattlefield) +text=Enchant creature -- Enchanted creature gets +1/+1 and has "Whenever this creature attacks, tap target creature defending player controls." +mana={1}{W} +type=Enchantment +subtype=Aura +[/card] +[card] name=Grassland Crusader auto={T}:2/2 target(elf,soldier) text={T}: Target Elf or Soldier creature gets +2/+2 until end of turn. @@ -37575,6 +41660,15 @@ power=1 toughness=1 [/card] [card] +name=Grave Strength +target=creature +auto=deplete:3 +auto=foreach(creature|mygraveyard) counter(1/1,1) +text=Choose target creature. Put the top three cards of your library into your graveyard, then put a +1/+1 counter on that creature for each creature card in your graveyard. +mana={1}{B} +type=Sorcery +[/card] +[card] name=Grave Titan abilities=deathtouch auto=token(Zombie,Creature Zombie,2/2,black)*2 @@ -37587,6 +41681,16 @@ power=6 toughness=6 [/card] [card] +name=Gravebane Zombie +abilities=librarydeath +text=If Gravebane Zombie would be put into a graveyard from the battlefield, put Gravebane Zombie on top of its owner's library instead. +mana={3}{B} +type=Creature +subtype=Zombie +power=3 +toughness=2 +[/card] +[card] name=Gravebind target=creature auto=cantregen @@ -37596,6 +41700,18 @@ mana={B} type=Instant [/card] [card] +name=Graveblade Marauder +abilities=deathtouch +auto=@combatdamagefoeof(player) from(this):life:-type:creature:mygraveyard opponent +auto=@combatdamageof(player) from(this):life:-type:creature:mygraveyard controller +text=Deathtouch (Any amount of damage this deals to a creature is enough to destroy it.) -- Whenever Graveblade Marauder deals combat damage to a player, that player loses life equal to the number of creature cards in your graveyard. +mana={2}{B} +type=Creature +subtype=Human Warrior +power=1 +toughness=4 +[/card] +[card] name=Graveborn Muse auto=@each my upkeep:foreach(zombie|myBattlefield) draw:1 auto=@each my upkeep:foreach(zombie|myBattlefield) life:-1 @@ -37607,6 +41723,17 @@ power=3 toughness=3 [/card] [card] +name=Gravecrawler +abilities=cantblock +autograveyard=aslongas(zombie|myBattlefield) CanPlayFromGraveyard +text=Gravecrawler can't block. -- You may cast Gravecrawler from your graveyard as long as you control a Zombie. +mana={B} +type=Creature +subtype=Zombie +power=2 +toughness=1 +[/card] +[card] name=Gravedigger auto=may moveTo(myhand) target(creature|mygraveyard) text=When Gravedigger enters the battlefield, you may return target creature card from your graveyard to your hand. @@ -37921,7 +42048,8 @@ type=Enchantment [card] name=Greater Harvester auto=@each my upkeep:sacrifice notatarget(creature|mybattlefield) -auto=@combatdamaged(opponent) from(this):ability$!name(sacrifice 2 permanents) target(<2>*|mybattlefield) sacrifice!$ opponent +auto=@combatdamagefoeof(player) from(this):ability$!name(sacrifice 2 permanents) target(<2>*|mybattlefield) sacrifice!$ opponent +auto=@combatdamageof(player) from(this):ability$!name(sacrifice 2 permanents) target(<2>*|mybattlefield) sacrifice!$ controller text=At the beginning of your upkeep, sacrifice a permanent. -- Whenever Greater Harvester deals combat damage to a player, that player sacrifices two permanents. mana={2}{B}{B}{B} type=Creature @@ -37970,6 +42098,14 @@ type=Artifact subtype=Equipment [/card] [card] +name=Great-Horn Krushok +mana={4}{W} +type=Creature +subtype=Beast +power=3 +toughness=5 +[/card] +[card] name=Greed auto={L:2}{B}:draw:1 text={B}, Pay 2 life: Draw a card. @@ -38026,6 +42162,7 @@ subtype=Aura [/card] [card] name=Green Ward +abilities=auraward target=creature auto=protection from green text=Enchant creature -- Enchanted creature has protection from green. This effect doesn't remove Green Ward. @@ -38184,7 +42321,7 @@ name=Grifter's Blade abilities=flash auto={1}:equip auto=1/1 -auto=aslongas(parents) retarget target(creature|mybattlefield) <1 +auto=aslongas(parents) rehook target(creature|mybattlefield) <1 text=Flash -- As Grifter's Blade enters the battlefield, choose a creature you control it could be attached to. If you do, it enters the battlefield attached to that creature. -- Equipped creature gets +1/+1. -- Equip {1} mana={3} type=Artifact @@ -38207,6 +42344,15 @@ text={T}: Add 1 to your mana pool. -- {2}{B}{G},{T},Sacrifice a creature: Draw a type=Land [/card] [card] +name=Grim Contest +target=creature|mybattlefield +auto=transforms((,newability[target(creature|opponentbattlefield) dynamicability])) ueot +restriction=type(creature|opponentbattlefield)~morethan~0 +text=Choose target creature you control and target creature an opponent controls. Each of those creatures deals damage equal to its toughness to the other. +mana={1}{B}{G} +type=Instant +[/card] +[card] name=Grim Feast auto=@each my upkeep:damage:1 controller auto=@movedTo(creature|opponentgraveyard) from(battlefield):all(trigger[to]) dynamicability @@ -38222,6 +42368,29 @@ mana={5}{G} type=Sorcery [/card] [card] +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. +mana={2}{B} +type=Enchantment Creature +subtype=Zombie +power=1 +toughness=4 +[/card] +[card] +name=Grim Haruspex +facedown={3} +autofacedown={B}:morph +auto=@movedTo(other creature[-token]|graveyard) from(mybattlefield):draw:1 controller +text=Morph {B} (You may cast this card face down as a 2/2 creature for 3. Turn it face up any time for its morph cost.) -- Whenever another nontoken creature you control dies, draw a card. +mana={2}{B} +type=Creature +subtype=Human Wizard +power=3 +toughness=2 +[/card] +[card] name=Grim Harvest target=creature|mygraveyard auto=moveto(ownerhand) @@ -38261,6 +42430,13 @@ power=4 toughness=4 [/card] [card] +name=Grim Return +auto=moveTo(myBattlefield) target(creature[fresh]|graveyard) +text=Choose target creature card in a graveyard that was put there from the battlefield this turn. Put that card onto the battlefield under your control. +mana={2}{B} +type=Instant +[/card] +[card] name=Grim Roustabout auto=may counter(1/1,1) auto=this(counter{1/1.1}>=1) cantblock @@ -38637,6 +42813,16 @@ power=2 toughness=1 [/card] [card] +name=Groundshaker Sliver +auto=lord(sliver|mybattlefield) trample +text=All Sliver creatures you control have trample. +mana={6}{G} +type=Creature +subtype=Sliver +power=5 +toughness=5 +[/card] +[card] name=Groundskeeper auto={1}{G}:moveto(myhand) target(land[basic]|mygraveyard) text={1}{G}: Return target basic land card from your graveyard to your hand. @@ -38866,6 +43052,16 @@ power=1 toughness=3 [/card] [card] +name=Guardian Automaton +auto=@movedto(this|graveyard) from(battlefield):life:3 controller +text=When Guardian Automaton dies, you gain 3 life. +mana={4} +type=Artifact Creature +subtype=Construct +power=3 +toughness=3 +[/card] +[card] name=Guardian Idol auto=tap auto={T}:Add{1} @@ -38906,6 +43102,17 @@ power=1 toughness=2 [/card] [card] +name=Guardian of the Ages +abilities=defender +auto=@combat(attacking) source(creature|opponentbattlefield): transforms((,newability[-defender],newability[trample])) forever dontremove +text=Defender. -- Whenever a creature attacks you or a planeswalker you control, if Guardian of the Ages has defender, it loses defender and gains trample. +mana={7} +type=Artifact Creature +subtype=Golem +power=7 +toughness=7 +[/card] +[card] name=Guardian of the Guildpact auto=protection from(*[-multicolor]) text=Protection from monocolored @@ -38916,6 +43123,19 @@ power=2 toughness=3 [/card] [card] +name=Guardian Shield-Bearer +facedown={3} +autofacedown={3}{G}:morph +autofaceup=counter(1/1,1) +autofaceup=counter(1/1,1) target(other creature|mybattlefield) +text=Megamorph {3}{G} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) -- When Guardian Shield-Bearer is turned face up, put a +1/+1 counter on another target creature you control. +mana={1}{G} +type=Creature +subtype=Human Soldier +power=2 +toughness=1 +[/card] +[card] name=Guardian Zendikon target=land auto=becomes(Creature Wall,2/6,defender,white) @@ -38936,6 +43156,16 @@ power=0 toughness=4 [/card] [card] +name=Guardians of Meletis +abilities=defender +text=Defender +mana={3} +type=Artifact Creature +subtype=Golem +power=0 +toughness=6 +[/card] +[card] name=Guardian's Magemark abilities=flash target=creature @@ -38953,6 +43183,19 @@ mana={1}{W}{W} type=Instant [/card] [card] +name=Gudul Lurker +abilities=unblockable +facedown={3} +autofacedown={U}:morph +autofaceup=counter(1/1,1) +text=Gudul Lurker can't be blocked. -- Megamorph {U} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) +mana={U} +type=Creature +subtype=Salamander +power=1 +toughness=1 +[/card] +[card] name=Guided Strike target=creature auto=1/0 @@ -39005,7 +43248,8 @@ subtype=Aura name=Guul Draz Specter abilities=flying auto=aslongas(*|opponenthand) 3/3 while <1 -auto=@combatdamaged(opponent) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@combatdamagefoeof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@combatdamageof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ controller text=Flying -- Guul Draz Specter gets +3/+3 as long as an opponent has no cards in hand. -- Whenever Guul Draz Specter deals combat damage to a player, that player discards a card. mana={2}{B}{B} type=Creature @@ -39046,6 +43290,16 @@ power=2 toughness=2 [/card] [card] +name=Gurmag Swiftwing +abilities=flying,first strike,haste +text=Flying, first strike, haste +mana={1}{B} +type=Creature +subtype=Bat +power=1 +toughness=2 +[/card] +[card] name=Gurzigost auto=@each my upkeep restriction{type(*|mygraveyard)~morethan~1}:transforms((,newability[choice name(put at bottom of library) target(<2>*|mygraveyard) bottomoflibrary],newability[choice sacrifice])) ueot auto=@each my upkeep restriction{type(*|mygraveyard)~lessthan~2}:sacrifice @@ -39407,6 +43661,14 @@ power=0 toughness=3 [/card] [card] +name=Hall of Triumph +alias=1000 +auto=activatechooseacolor transforms((,newability[lord(creature[chosencolor]|mybattlefield) 1/1])) forever activatechooseend +text=As Hall of Triumph enters the battlefield, choose a color. -- Creatures you control of the chosen color get +1/+1. +mana={3} +type=Legendary Artifact +[/card] +[card] name=Hallowed Burial auto=all(creature) bottomoflibrary text=Put all creatures on the bottom of their owners' libraries. @@ -39515,11 +43777,19 @@ mana={1}{R}{R} type=Sorcery [/card] [card] +name=Hammer of Purphoros +auto=lord(creature|mybattlefield) haste +auto={2}{R}{S(land|myBattlefield)}:token(Golem,Enchantment Artifact Creature Golem,3/3) controller +text=Creatures you control have haste. --{2}{R}, {T}: Sacrifice a land: Put a 3/3 colorless Golem enchantment artifact creature token onto the battlefield. +mana={1}{R}{R} +type=Legendary Enchantment Artifact +[/card] +[card] name=Hammer of Ruin auto={2}:equip auto=2/0 -auto=@combatdamaged(controller) from(this):may destroy target(equipment|myBattlefield) -auto=@combatdamaged(opponent) from(this):may destroy target(equipment|opponentBattlefield) +auto=teach(creature) transforms((,newability[@combatdamageof(player) from(this):may destroy target(equipment|myBattlefield)])) +auto=teach(creature) transforms((,newability[@combatdamagefoeof(player) from(this):may destroy target(equipment|opponentBattlefield)])) text=Equipped creature gets +2/+0. -- Whenever equipped creature deals combat damage to a player, you may destroy target Equipment that player controls. -- Equip {2} mana={2} type=Artifact @@ -39536,6 +43806,17 @@ power=5 toughness=4 [/card] [card] +name=Hammerhand +target=creature +auto=teach(creature) haste +auto=teach(creature) 1/1 +auto=target(creature) cantblock ueot +text=Enchant creature -- When Hammerhand enters the battlefield, target creature can't block this turn. -- Enchanted creature gets +1/+1 and has haste. +mana={R} +type=Enchantment +subtype=Aura +[/card] +[card] name=Hammerhead Shark abilities=cantattack auto=aslongas(island|opponentbattlefield) -cantattack @@ -39628,6 +43909,16 @@ power=2 toughness=6 [/card] [card] +name=Hand of Silumgar +abilities=deathtouch +text=Deathtouch (Any amount of damage this deals to a creature is enough to destroy it.) +mana={1}{B} +type=Creature +subtype=Human Warrior +power=2 +toughness=1 +[/card] +[card] name=Hand of the Praetors abilities=infect auto=lord(other creature[infect]|myBattlefield) 1/1 @@ -39640,6 +43931,18 @@ power=3 toughness=2 [/card] [card] +name=Hangarback Walker +auto=counter(1/1,XX) +auto=@movedTo(this|mygraveyard) from(myBattlefield):thisforeach(counter{1/1.1}) token(Thopter,Artifact Creature Thopter,1/1,flying) controller +auto={1}{T}:counter(1/1) +text=Hangarback Walker enters the battlefield with X +1/+1 counters on it. -- When Hangarback Walker dies, put a 1/1 colorless Thopter artifact creature token with flying onto the battlefield for each +1/+1 counter on Hangarback Walker. -- {1}, {T}: Put a +1/+1 counter on Hangarback Walker. +mana={X}{X} +type=Artifact Creature +subtype=Construct +power=0 +toughness=0 +[/card] +[card] name=Hanna's Custody auto=lord(artifact) shroud text=All artifacts have shroud. (They can't be the targets of spells or abilities.) @@ -39706,6 +44009,18 @@ power=0 toughness=1 [/card] [card] +name=Harbinger of the Hunt +abilities=flying +auto={2}{R}:name(Damage non-flying) damage:1 all(creature[-flying]|battlefield) +auto={2}{G}:name(Damage Flying) damage:1 all(other creature[flying]|battlefield) +text=Flying -- {2}{R}: Harbinger of the Hunt deals 1 damage to each creature without flying. -- {2}{G}: Harbinger of the Hunt deals 1 damage to each other creature with flying. +mana={3}{R}{G} +type=Creature +subtype=Dragon +power=5 +toughness=3 +[/card] +[card] name=Harbinger of Night auto=@each my upkeep:all(creature) counter(-1/-1,1) text=At the beginning of your upkeep, put a -1/-1 counter on each creature. @@ -39876,6 +44191,15 @@ mana={2}{W} type=Sorcery [/card] [card] +name=Harsh Sustenance +target=creature,player +auto=damage:type:creature:mybattlefield +auto=life:type:creature:mybattlefield controller +text=Harsh Sustenance deals X damage to target creature or player and you gain X life, where X is the number of creatures you control. +mana={1}{W}{B} +type=Instant +[/card] +[card] name=Haru-Onna auto=draw:1 controller auto=@movedto(arcane,spirit|mystack):may moveto(ownerhand) @@ -39908,6 +44232,20 @@ power=3 toughness=2 [/card] [card] +name=Harvester Druid +auto=this(variable{plandg}>0) {t}:add{g} +auto=this(variable{plandu}>0) {t}:add{u} +auto=this(variable{plandr}>0) {t}:add{r} +auto=this(variable{plandb}>0) {t}:add{b} +auto=this(variable{plandw}>0) {t}:add{w} +text={T}: Add to your mana pool one mana of any color that a land you control could produce. +mana={1}{G} +type=Creature +subtype=Human Druid +power=1 +toughness=1 +[/card] +[card] name=Harvester of Souls abilities=deathtouch auto=@movedTo(other creature[-token]|graveyard) from(battlefield):draw:1 controller @@ -39919,6 +44257,17 @@ power=5 toughness=5 [/card] [card] +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. +mana={2}{W} +type=Enchantment Creature +subtype=Nymph +power=2 +toughness=3 +[/card] +[card] name=Hasran Ogress auto=@combat(attacking) source(this):pay({2}) name(pay 2 mana) donothing?damage:3 controller text=Whenever Hasran Ogress attacks, it deals 3 damage to you unless you pay {2}. @@ -39989,7 +44338,8 @@ toughness=3 [/card] [card] name=Haunted Cadaver -auto=@combatdamaged(player) from(this):may ability$!name(discard 3 cards) target(<3>*|myhand) reject!$ opponent && sacrifice all(this) +auto=@combatdamagefoeof(player) from(this):may ability$!name(discard 3 cards) target(<3>*|myhand) reject!$ opponent && sacrifice all(this) +auto=@combatdamageof(player) from(this):may ability$!name(discard 3 cards) target(<3>*|myhand) reject!$ controller && sacrifice all(this) facedown={3} autofacedown={1}{B}:morph text=Whenever Haunted Cadaver deals combat damage to a player, you may sacrifice it. If you do, that player discards three cards. -- Morph {1}{B} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) @@ -40024,6 +44374,16 @@ power=2 toughness=1 [/card] [card] +name=Haunted Plate Mail +auto={4}:equip +auto=4/4 +auto={0}:all(this) loseabilities ueot && becomes(Spirit Artifact Creature,4/4) ueot restriction{type(creature|mybattlefield)~lessthan~1} +text=Equipped creature gets +4/+4. -- {0}: Until end of turn, Haunted Plate Mail becomes a 4/4 Spirit artifact creature that's no longer an Equipment. Activate this ability only if you control no creatures. +mana={4} +type=Artifact +subtype=Equipment +[/card] +[card] name=Haunting Apparition abilities=flying auto=foreach(creature[green]|opponentgraveyard) 1/0 @@ -40160,7 +44520,7 @@ toughness=3 [/card] [card] name=Hazezon Tamar -auto=@next my upkeep:foreach(land|myBattlefield) token(Sand Warrior,Creature Sand Warrior,1/1,red,green,white) +auto=phaseaction[my upkeep once]: token(Sand Warrior,Creature Sand Warrior,1/1,red,green,white)*type:land:mybattlefield auto=@movedTo(this|nonbattlezone) from(battlefield):moveto(exile) all(sand warrior) text=When Hazezon Tamar enters the battlefield, put X 1/1 Sand Warrior creature tokens that are red, green, and white onto the battlefield at the beginning of your next upkeep, where X is the number of lands you control at that time. -- When Hazezon leaves the battlefield, exile all Sand Warriors. mana={4}{R}{G}{W} @@ -40193,7 +44553,8 @@ toughness=2 [/card] [card] name=Headhunter -auto=@combatdamaged(opponent) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@combatdamagefoeof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@combatdamageof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ controller autofacedown={B}:morph facedown={3} text=Whenever Headhunter deals combat damage to a player, that player discards a card. -- Morph {B} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) @@ -40260,7 +44621,7 @@ name=Healer's Headdress auto={1}:equip auto=0/2 auto=teach(creature) {T}:prevent:1 target(creature,player) -auto={W}{W}:name(attach) retarget target(creature|mybattlefield) +auto={W}{W}:name(attach) rehook target(creature|mybattlefield) text=Equipped creature gets +0/+2 and has "{T}: Prevent the next 1 damage that would be dealt to target creature or player this turn." -- {W}{W}: Attach Healer's Headdress to target creature you control. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) mana={2} type=Artifact @@ -40277,6 +44638,15 @@ power=2 toughness=3 [/card] [card] +name=Healing Hands +target=player +auto=life:4 targetedplayer +auto=draw:1 controller +text=Target player gains 4 life. -- Draw a card. +mana={2}{W} +type=Sorcery +[/card] +[card] name=Healing Leaves auto=choice life:3 target(player) auto=choice prevent:3 target(creature,player) @@ -40436,7 +44806,7 @@ toughness=3 [card] name=Heartless Summoning auto=lord(creature|myBattlefield) -1/-1 -auto=lord(creature|myhand) altercost( colorless,-2) +auto=lord(creature|myhand,mylibrary,mygraveyard,myexile) altercost( colorless,-2) text=Creature spells you cast cost {2} less to cast. -- Creatures you control get -1/-1 mana={1}{B} type=Enchantment @@ -40524,6 +44894,15 @@ power=3 toughness=4 [/card] [card] +name=Heart-Piercer Bow +auto={1}:equip +auto=@combat(attacking) source(mytgt) :damage:1 target(creature|opponentbattlefield) +text=Whenever equipped creature attacks, Heart-Piercer Bow deals 1 damage to target creature defending player controls. +mana={2} +type=Artifact +subtype=Equipment +[/card] +[card] name=Heat Ray target=creature auto=damage:X @@ -40591,6 +44970,16 @@ mana={1}{G} type=Instant [/card] [card] +name=Heavy Infantry +auto=tap target(creature|opponentbattlefield) +text=When Heavy Infantry enters the battlefield, tap target creature an opponent controls. +mana={4}{W} +type=Creature +subtype=Human Soldier +power=3 +toughness=4 +[/card] +[card] name=Heavy Mattock auto={2}:equip auto=1/1 @@ -40680,7 +45069,7 @@ subtype=Arcane [card] name=Heedless One abilities=trample -auto=foreach(elf) 1/1 +anyzone=type:elf:battlefield/type:elf:battlefield cdaactive text=Trample -- Heedless One's power and toughness are each equal to the number of Elves on the battlefield. mana={3}{G} type=Creature @@ -40707,6 +45096,17 @@ mana={3}{U}{U} type=Enchantment [/card] [card] +name=Heir of the Wilds +abilities=deathtouch +auto=@combat(attacking) source(this) restriction{type(creature[power>=4]|myBattlefield)~morethan~0}:1/1 ueot +text=Deathtouch. -- Ferocious - Whenever Heir of the Wilds attacks, if you control a creature with power 4 or greater, Heir of the Wilds gets +1/+1 until end of turn. +mana={1}{G} +type=Creature +subtype=Human Warrior +power=2 +toughness=2 +[/card] +[card] name=Heirs of Stromkirk abilities=intimidate auto=@combatdamaged(player) from(this):counter(1/1,1) @@ -40718,6 +45118,27 @@ power=2 toughness=2 [/card] [card] +name=Heliod, God of the Sun +abilities=indestructible +auto=lord(other creature|mybattlefield) vigilance +auto={2}{W}{W}:token(Cleric,Creature Enchantment Cleric,2/1,white) controller +auto=this(variable{type:manaw}>4) transforms((Creature,setpower=5,settoughness=6)) +text=Indestructible -- As long as your devotion to white is less than five, Heliod isn't a creature. (Each {W} in the mana costs of permanents you control counts toward your devotion to white.) -- Other creatures you control have vigilance. -- {2}{W}{W}: Put a 2/1 white Cleric enchantment creature token onto the battlefield. +mana={3}{W} +type=Legendary Enchantment +subtype=God +[/card] +[card] +name=Heliod's Pilgrim +auto=may name(Search for an Aura) moveTo(myhand) target(aura|myLibrary) +text=When Heliod's Pilgrim enters the battlefield, you may search your library for an Aura card, reveal it, put it into your hand, then shuffle your library. +mana={2}{W} +type=Creature +subtype=Human Cleric +power=1 +toughness=2 +[/card] +[card] name=Helionaut abilities=flying auto={1}{T}:Add{W} @@ -40872,7 +45293,7 @@ toughness=5 [/card] [card] name=Hellkite Hatchling -auto=may target(other creature|mybattlefield) sacrifice && counter(1/1,1) all(this) && all(this) transforms((,flying,trample)) forever +auto=may target(other creature|mybattlefield) sacrifice && counter(1/1,1) all(this) && all(this) transforms((,newability[flying],newability[trample])) forever text=Devour 1 (As this enters the battlefield, you may sacrifice any number of creatures. This creature enters the battlefield with that many +1/+1 counters on it.) -- Hellkite Hatchling has flying and trample if it devoured a creature. mana={2}{R}{G} type=Creature @@ -40906,7 +45327,7 @@ toughness=8 [card] name=Hellkite Tyrant abilities=flying,trample -auto=@combatdamaged(player) from(this):all(artifact|opponentbattlefield) transforms((,newability[moveTo(opponentBattlefield)])) +auto=@combatdamagefoeof(player) from(this):moveTo(myBattlefield) all(artifact|opponentbattlefield) auto=@each my upkeep restriction{type(artifact|myBattlefield)~morethan~19}:winGame text=Flying, trample -- Whenever Hellkite Tyrant deals combat damage to a player, gain control of all artifacts that player controls. -- At the beginning of your upkeep, if you control twenty or more artifacts, you win the game. mana={4}{R}{R} @@ -40950,7 +45371,7 @@ toughness=1 [/card] [card] name=Helm of Awakening -auto=lord(*|hand) altercost(colorless,-1) +auto=lord(*|hand,library,graveyard,exile) altercost(colorless,-1) text=Spells cost {1} less to cast. mana={2} type=Artifact @@ -40971,15 +45392,24 @@ subtype=Equipment name=Helm of the Ghastlord target=creature auto=teach(creature[blue]) 1/1 -auto=teach(creature[blue]) transforms((,newability[@damaged(opponent) from(this):draw:1 controller])) +auto=teach(creature[blue]) transforms((,newability[@damagefoeof(player) from(this):draw:1 controller])) auto=teach(creature[black]) 1/1 -auto=teach(creature[black]) transforms((,newability[@damaged(opponent) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent])) +auto=teach(creature[black]) transforms((,newability[@damagefoeof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent])) text=Enchant creature -- As long as enchanted creature is blue, it gets +1/+1 and has "Whenever this creature deals damage to an opponent, draw a card." -- As long as enchanted creature is black, it gets +1/+1 and has "Whenever this creature deals damage to an opponent, that player discards a card." mana={3}{UB} type=Enchantment subtype=Aura [/card] [card] +name=Helm of the Gods +auto={1}:equip +auto=teach(creature) type:enchantment:mybattlefield/type:enchantment:mybattlefield nonstatic +text=Equipped creature gets +1/+1 for each enchantment you control. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) +mana={1} +type=Artifact +subtype=Equipment +[/card] +[card] name=Hematite Golem auto={1}{R}:2/0 text={1}{R}: Hematite Golem gets +2/+0 until end of turn. @@ -41030,6 +45460,16 @@ text={T}: Add {1} to your mana pool. -- {2}, {T}: Add one mana of any color to y type=Land [/card] [card] +name=Herald of Anafenza +auto={2}{W}{T}:token(Warrior,Creature Warrior,1/1,white) && counter(1/1,1) asSorcery +text=Outlast {2}{W} ({2}{W}, {T}: Put a +1/+1 counter on this creature. Outlast only as a sorcery.) -- Whenever you activate Herald of Anafenza's outlast ability, put a 1/1 white Warrior creature token onto the battlefield. +mana={W} +type=Creature +subtype=Human Soldier +power=1 +toughness=2 +[/card] +[card] name=Herald of Serra abilities=flying,vigilance auto=upcost[{2}{W}{W};next upkeep] sacrifice @@ -41044,7 +45484,7 @@ toughness=4 name=Herald of War abilities=flying auto=@combat(attacking) source(this):counter(1/1,1) -auto=thisforeach(counter{1/1,1}) lord(*[angel;human]|myhand) altercost(colorless, -1) +auto=thisforeach(counter{1/1,1}) lord(*[angel;human]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) text=Flying -- Whenever Herald of War attacks, put a +1/+1 counter on it. -- Angel spells and Human spells you cast cost {1} less to cast for each +1/+1 counter on Herald of War. mana={3}{W}{W} type=Creature @@ -41070,6 +45510,42 @@ power=2 toughness=2 [/card] [card] +name=Herald of Dromoka +abilities=vigilance +auto=lord(other creature[warrior]|mybattlefield) vigilance +text=Vigilance -- Other Warrior creatures you control have vigilance. +mana={1}{W} +type=Creature +subtype=Human Warrior +power=2 +toughness=2 +[/card] +[card] +name=Herald of the Pantheon +auto=lord(enchantment|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) +auto=@movedto(enchantment|mystack):choice life:1 controller +text=Enchantment spells you cast cost {1} less to cast. -- Whenever you cast an enchantment spell, you gain 1 life. +mana={1}{G} +type=Creature +subtype=Centaur Shaman +power=2 +toughness=2 +[/card] +[card] +name=Herdchaser Dragon +abilities=flying,trample +facedown={3} +autofacedown={5}{G}{G}:morph +autofaceup=counter(1/1,1) +autofaceup=counter(1/1,1) all(other creature[dragon]|mybattlefield) +text=Flying, trample -- Megamorph {5}{G}{G} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) -- When Herdchaser Dragon is turned face up, put a +1/+1 counter on each other Dragon creature you control. +mana={5}{G} +type=Creature +subtype=Dragon +power=3 +toughness=3 +[/card] +[card] name=Heritage Druid auto={T(elf|myBattlefield)}{T(elf|myBattlefield)}{T(elf|myBattlefield)}:Add{G}{G}{G} text=Tap three untapped Elves you control: Add {G}{G}{G} to your mana pool. @@ -41101,7 +45577,7 @@ toughness=4 [/card] [card] name=Hero of Iroas -auto=lord(aura|myhand) altercost(colorless,-1) +auto=lord(aura|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):counter(1/1,1) text=Aura spells you cast cost 1 less to cast. -- Heroic -- Whenever you cast a spell that targets Hero of Iroas, put a +1/+1 counter on Hero of Iroas. mana={1}{W} @@ -41123,6 +45599,16 @@ power=4 toughness=2 [/card] [card] +name=Hero's Blade +auto={4}:equip +auto=3/2 +auto=@movedto(creature[legendary]|mybattlefield):may all(trigger[to]) rehook +text=Equipped creature gets +3/+2. -- Whenever a legendary creature enters the battlefield under your control, you may attach Hero's Blade to it. +mana={2} +type=Artifact +subtype=Equipment +[/card] +[card] name=Hero's Demise target=creature[legendary] auto=destroy @@ -41131,6 +45617,14 @@ mana={1}{B} type=Instant [/card] [card] +name=Hero's Downfall +target=creature,planeswalker +auto=destroy +text=Destroy target creature or planeswalker. +mana={1}{B}{B} +type=Instant +[/card] +[card] name=Hero's Resolve target=creature auto=1/5 @@ -41140,6 +45634,17 @@ type=Enchantment subtype=Aura [/card] [card] +name=Heroes' Bane +auto=counter(1/1,4) +auto={2}{G}{G}:counter(1/1,p) +text=Heroes' Bane enters the battlefield with four +1/+1 counters on it. -- {2}{G}{G}: Put X +1/+1 counters on Heroes' Bane, where X is its power. +mana={3}{G}{G} +type=Creature +subtype=Hydra +power=0 +toughness=0 +[/card] +[card] name=Heroes' Reunion target=player auto=life:7 @@ -41163,6 +45668,16 @@ mana={1}{U} type=Enchantment [/card] [card] +name=Hewed Stone Retainers +restriction=casted a spell +text=Cast Hewed Stone Retainers only if you've cast another spell this turn. +mana={3} +type=Artifact Creature +subtype=Golem +power=4 +toughness=4 +[/card] +[card] name=Hex target=<6>creature auto=destroy @@ -41199,9 +45714,8 @@ toughness=2 name=Hickory Woodlot auto=tap auto=counter(0/0,2,Depletion) -auto={T}{C(0/0,-1,Depletion)}:Add{G}{G} -auto=@tapped(this):bury all(hickory woodlot[-counter{0/0.1.Depletion}]) -auto=this(counter{0/0.1.Depletion}<1) {0}:sacrifice all(this) +auto=this(counter{0/0,1,Depletion}>1) {T}{C(0/0,-1,Depletion)}:Add{G}{G} +auto=this(counter{0/0,1,Depletion}=1) {T}{C(0/0,-1,Depletion)}:Add{G}{G} && sacrifice text=Hickory Woodlot enters the battlefield tapped with two depletion counters on it. -- {T}, Remove a depletion counter from Hickory Woodlot: Add {G}{G} to your mana pool. If there are no depletion counters on Hickory Woodlot, sacrifice it. type=Land [/card] @@ -41213,6 +45727,20 @@ mana={1}{G} type=Enchantment [/card] [card] +name=Hidden Dragonslayer +abilities=lifelink +facedown={3} +autofacedown={2}{W}:morph +autofaceup=counter(1/1,1) +autofaceup=destroy target(creature[power>=4]|opponentbattlefield) +text=Lifelink -- Megamorph {2}{W} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) -- When Hidden Dragonslayer is turned face up, destroy target creature with power 4 or greater an opponent controls. +mana={1}{W} +type=Creature +subtype=Human Warrior +power=2 +toughness=1 +[/card] +[card] name=Hidden Gibbons auto=@movedto(instant|opponentstack) once:transforms((removetypes)) forever && transforms((Ape Creature,setpower=4,settoughness=4)) forever text=When an opponent casts an instant spell, if Hidden Gibbons is an enchantment, Hidden Gibbons becomes a 4/4 Ape creature. @@ -41315,14 +45843,26 @@ toughness=1 [/card] [card] name=High Seas -auto=lord(creature[red;green]|hand) altercost(colorless,+1) +auto=lord(creature[red;green]|hand,library,graveyard,exile) altercost(colorless,+1) text=Red creature spells and green creature spells cost {1} more to cast. mana={2}{U} type=Enchantment [/card] [card] +name=High Sentinels of Arashin +abilities=flying +auto=foreach(other creature[counter{1/1.1}]|mybattlefield) 1/1 +auto={3}{W}:counter(1/1,1) target(creature) +text=High Sentinels of Arashin gets +1/+1 for each other creature you control with a +1/+1 counter on it. -- {3}{W}: Put a +1/+1 counter on target creature. +mana={3}{W} +type=Creature +subtype=Bird Soldier +power=3 +toughness=4 +[/card] +[card] name=High Tide -auto=all(island) transforms((,newability[@tappedformana(this):add{U}])) ueot +auto=emblem transforms((,newability[lord(island) produceextra:{U}])) ueot text=Until end of turn, whenever a player taps an Island for mana, that player adds {U} to his or her mana pool (in addition to the mana the land produces). mana={U} type=Instant @@ -41349,6 +45889,16 @@ power=2 toughness=1 [/card] [card] +name=Highland Game +autograveyard=@movedto(this|graveyard) from(mybattlefield):life:2 controller +text=When Highland Game dies, you gain 2 life. +mana={1}{G} +type=Creature +subtype=Elk +power=2 +toughness=1 +[/card] +[card] name=Highland Giant mana={2}{R}{R} type=Creature @@ -41365,6 +45915,16 @@ text=Highland Weald enters the battlefield tapped. -- {T}: Add {R} or {G} to you type=Snow Land [/card] [card] +name=Highspire Mantis +abilities=flying,trample +text=Flying, trample +mana={2}{R}{W} +type=Creature +subtype=Insect +power=3 +toughness=3 +[/card] +[card] name=Highway Robber auto=ability$!choice life:-2 target(opponent) && life:2 controller!$ controller text=When Highway Robber enters the battlefield, target opponent loses 2 life and you gain 2 life. @@ -41509,6 +46069,23 @@ mana={1}{B}{B} type=Enchantment [/card] [card] +name=Hitchclaw Recluse +abilities=reach +text=Reach (This creature can block creatures with flying.) +mana={2}{G} +type=Creature +subtype=Spider +power=1 +toughness=4 +[/card] +[card] +name=Hive Stirrings +auto=token(Sliver,Artifact Creature Sliver,1/1)*2 +text=Put two 1/1 colorless Sliver creature tokens onto the battlefield. +mana={2}{W} +type=Sorcery +[/card] +[card] name=Hivestone auto=lord(creature|mybattlefield) transforms((sliver)) text=Creatures you control are Slivers in addition to their other creature types. @@ -41896,6 +46473,25 @@ power=1 toughness=1 [/card] [card] +name=Honored Hierarch +auto=this(cantargetcard(*[-renown]) transforms((,newability[@combatdamaged(player) from(this):counter(1/1) && becomes(renown) forever])) +auto=this(cantargetcard(*[renown]) transforms((,newability[{t}:add{g}],newability[{t}:add{r}],newability[{t}:add{u}],newability[{t}:add{b}],newability[{t}:add{w}],newability[vigilance])) +text=Renown 1 (When this creature deals combat damage to a player, if it isn't renowned, put a +1/+1 counter on it and it becomes renowned.) -- As long as Honored Hierarch is renowned, it has vigilance and "{T}: Add one mana of any color to your mana pool." +mana={G} +type=Creature +subtype=Human Druid +power=1 +toughness=1 +[/card] +[card] +name=Honor's Reward +auto=life:4 controller +auto=ability$!name(Bolster) notatarget(creature[toughness=toughness:lowest:creature:mybattlefield]|mybattlefield) counter(1/1,2)!$ controller +text=You gain 4 life. Bolster 2. (Choose a creature with the least toughness among creatures you control and put two +1/+1 counters on it.) +mana={2}{W} +type=Instant +[/card] +[card] name=Honor-Worn Shaku auto={T}:add{1} auto={T(*[legendary]|mybattlefield)}:untap @@ -41904,6 +46500,32 @@ mana={3} type=Artifact [/card] [card] +name=Hooded Assassin +auto=choice name(+1/+1 counter) counter(1/1,1) +auto=choice name(destroy damaged creature) destroy target(creature[damaged]|battlefield) +text=When Hooded Assassin enters the battlefield, choose one: -- Put a +1/+1 counter on Hooded Assassin. -- Destroy target creature that was dealt damage this turn. +mana={2}{B} +type=Creature +subtype=Human Assassin +power=1 +toughness=2 +[/card] +[card] +name=Hooded Hydra +facedown={3} +autofacedown={3}{G}{G}:morph +autofaceup=counter(1/1,5) +auto=counter(1/1,X) +auto=0/-1 +auto=@movedTo(this|Graveyard) from(myBattlefield):thisforeach(counter{1/1.1}) token(Snake,Creature Snake,1/1,green) +text=Hooded Hydra enters the battlefield with X +1/+1 counters on it. -- When Hooded Hydra dies, put a 1/1 green Snake creature token onto the battlefield for each +1/+1 counter on it. -- Morph {3}G}{G}: As Hooded Hydra is turned face up, put five +1/+1 counters on it. +mana={X}{G}{G} +type=Creature +subtype=Snake Hydra +power=0 +toughness=1 +[/card] +[card] name=Hooded Kavu auto={B}:fear text={B}: Hooded Kavu gains fear until end of turn. (It can't be blocked except by artifact creatures and/or black creatures.) @@ -41933,7 +46555,7 @@ toughness=2 [/card] [card] name=Hoofprints of the Stag -auto=@drawn(controller):may counter(0/0,1,Hoofprint) +auto=@drawof(player):may counter(0/0,1,Hoofprint) auto={C(0/0,-4,Hoofprint)}{2}{W}:token(Elemental,Creature Elemental,4/4,flying,white) myTurnOnly text=Whenever you draw a card, you may put a hoofprint counter on Hoofprints of the Stag. -- {2}{W}, Remove four hoofprint counters from Hoofprints of the Stag: Put a 4/4 white Elemental creature token with flying onto the battlefield. Activate this ability only during your turn. mana={1}{W} @@ -41980,6 +46602,13 @@ power=5 toughness=5 [/card] [card] +name=Hordeling Outburst +auto=token(Goblin,creature goblin, 1/1,red)*3 +text=Put three 1/1 red Goblin creature tokens onto the battlefield. +mana={1}{R}{R} +type=Sorcery +[/card] +[card] name=Horizon Canopy auto={T}{L}:Add{G} auto={T}{L}:Add{W} @@ -41988,6 +46617,17 @@ text={T}, Pay 1 life: Add {G} or {W} to your mana pool. -- {1}, {T}, Sacrifice H type=Land [/card] [card] +name=Horizon Chimera +abilities=flash,flying,trample +auto=@drawof(player):life:1 controller +text=Flash. -- Flying. -- Trample. -- Whenever you draw a card, you gain 1 life. +mana={2}{G}{U} +type=Creature +subtype=Chimera +power=3 +toughness=2 +[/card] +[card] name=Horizon Drake abilities=flying auto=protection from(land) @@ -42060,7 +46700,7 @@ toughness=2 name=Horned Helm auto=1/1 auto=trample -auto={G}{G}:name(attach) retarget target(creature|mybattlefield) +auto={G}{G}:name(attach) rehook target(creature|mybattlefield) auto={1}:equip text=Equipped creature gets +1/+1 and has trample. -- {G}{G}: Attach Horned Helm to target creature you control. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) mana={2} @@ -42143,6 +46783,17 @@ power=2 toughness=2 [/card] [card] +name=Hornet Nest +abilities=defender +auto=@damaged(this):token(Insect,Creature Insect,1/1,flying,deathtouch,green)*thatmuch +text=Defender. -- Whenever Hornet Nest is dealt damage, put that many 1/1 green Insect creature tokens with flying and deathtouch onto the battlefield. (Any amount of damage a creature with deathtouch deals to a creature is enough to destroy it.) +mana={2}{G} +type=Creature +subtype=Insect +power=0 +toughness=2 +[/card] +[card] name=Hornet Queen abilities=flying,deathtouch auto=token(Insect,Creature Insect,1/1,green,flying,deathtouch)*4 @@ -42228,6 +46879,16 @@ type=Enchantment subtype=Aura [/card] [card] +name=Hot Soup +auto={3}:equip +auto=teach(creature) unblockable +auto=@damaged(mytgt):destroy all(mytgt) +text=Equipped creature is unblockable. -- Whenever equipped creature is dealt damage, destroy it. -- Equip {3} ({3}: Attach to target creature you control. Equip only as a sorcery.) +mana={1} +type=Artifact +subtype=Equipment +[/card] +[card] name=Hot Springs target=land|myBattlefield auto=teach(land) {T}:prevent:1 target(creature,player) @@ -42381,6 +47042,14 @@ power=1 toughness=2 [/card] [card] +name=Hubris +target=creature|battlefield +auto=transforms((,newability[moveto(ownerhand) all(children[aura]],newability[moveto(ownerhand)])) forever +text=Return target creature and all Auras attached to it to their owners' hands. +mana={1}{U} +type=Instant +[/card] +[card] name=Hulking Cyclops abilities=cantblock text=Hulking Cyclops can't block. @@ -42448,6 +47117,27 @@ power=2 toughness=2 [/card] [card] +name=Humble Defector +auto={T}:draw:2 controller && transforms((,newability[choice target(opponent) && moveto(targetedpersonsbattlefield) all(this)])) forever myturnonly +text={T}: Draw two cards. Target opponent gains control of Humble Defector. Activate this ability only during your turn. +mana={1}{R} +type=Creature +subtype=Human Rogue +power=2 +toughness=1 +[/card] +[card] +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. +mana={4}{G}{G} +type=Enchantment Creature +subtype=Elemental +power=5 +toughness=5 +[/card] +[card] name=Hunding Gjornersen auto=rampage(1/1,1) text=Rampage 1 (Whenever this creature becomes blocked, it gets +1/+1 until end of turn for each creature blocking it beyond the first.) @@ -42517,6 +47207,26 @@ power=1 toughness=1 [/card] [card] +name=Hunt the Hunter +target=creature[green]|mybattlefield +auto=2/2 ueot +auto=transforms((,newability[target(creature[green]|opponentbattlefield) dynamicability])) ueot +restriction=type(creature[green]|opponentbattlefield)~morethan~0 +text=Target green creature you control gets +2/+2 until end of turn. It fights target green creature an opponent controls. +mana={G} +type=Sorcery +[/card] +[card] +name=Hunt the Weak +target=creature|mybattlefield +auto=counter(1/1,1) +auto=transforms((,newability[target(creature|opponentbattlefield) dynamicability])) ueot +restriction=type(creature|opponentbattlefield)~morethan~0 +text=Put a +1/+1 counter on target creature you control. -- Then that creature fights target creature you don't control. +mana={3}{G} +type=Sorcery +[/card] +[card] name=Hunted Dragon abilities=flying,haste auto=token(Knight,Creature Knight,2/2,first strike,white)*3 opponent @@ -42611,6 +47321,13 @@ mana={3}{G} type=Sorcery [/card] [card] +name=Hunter's Ambush +auto=preventAllCombatDamage from(creature[-Green]) ueot +text=Prevent all combat damage that would be dealt by nongreen creatures this turn. +mana={2}{G} +type=Instant +[/card] +[card] name=Hunter's Insight target=creature|mybattlefield auto=transforms((,newability[@combatdamaged(player) from(this):draw:thatmuch controller],newability[@combatdamaged(planeswalker) from(this):draw:thatmuch controller])) ueot @@ -42638,7 +47355,7 @@ type=Instant [/card] [card] name=Hunting Cheetah -auto=@damaged(opponent) from(this):may moveTo(myHand) target(forest|mylibrary) +auto=@damagefoeof(player) from(this):may moveTo(myHand) target(forest|mylibrary) text=Whenever Hunting Cheetah deals damage to an opponent, you may search your library for a Forest card, reveal that card, put it into your hand, then shuffle your library. mana={2}{G} type=Creature @@ -42821,6 +47538,16 @@ power=4 toughness=3 [/card] [card] +name=Hydra Broodmaster +auto=this(cantargetcard(*[-monstrous]) {X}{X}{G}:becomes(monstrous) forever && counter(1/1,xx) && token(Hydra,Creature Hydra,xx/xx,green)*xx +text={X}{X}{G}: Monstrosity X. (If this creature isn't monstrous, put X +1/+1 counters on it and it becomes monstrous.) -- When Hydra Broodmaster becomes monstrous, put X X/X green Hydra creature tokens onto the battlefield. +mana={4}{G}{G} +type=Creature +subtype=Hydra +power=7 +toughness=7 +[/card] +[card] name=Hydra Omnivore text=Whenever Hydra Omnivore deals combat damage to an opponent, it deals that much damage to each other opponent. mana={4}{G}{G} @@ -42845,6 +47572,14 @@ mana={G}{U} type=Instant [/card] [card] +name=Hydrolash +auto=all(creature[attacking]) -2/0 ueot +auto=draw:1 controller +text=Attacking creatures get -2/-0 until end of turn. -- Draw a card. +mana={2}{U} +type=Instant +[/card] +[card] name=Hydrosurge target=creature auto=-5/0 @@ -42913,7 +47648,7 @@ type=Sorcery [card] name=Hypnotic Specter abilities=flying -auto=@damaged(opponent) from(this):discard:1 opponent +auto=@damagefoeof(player) from(this):discard:1 opponent text=Flying -- Whenever Hypnotic Specter deals damage to an opponent, that player discards a card at random. mana={1}{B}{B} type=Creature @@ -42961,6 +47696,17 @@ power=3 toughness=4 [/card] [card] +name=Hythonia the Cruel +abilities=deathtouch +auto=this(cantargetcard(*[-monstrous]) {6}{B}{B}:becomes(monstrous) forever && counter(1/1,3) && transforms((,newability[destroy all(creature[-gorgon])])) forever +text=Deathtouch -- {6}{B}{B}: Monstrosity 3. (If this creature isn't monstrous, put three +1/+1 counters on it and it becomes monstrous.) -- When Hythonia the Cruel becomes monstrous, destroy all non-Gorgon creatures. +mana={4}{B}{B} +type=Legendary Creature +subtype=Gorgon +power=4 +toughness=6 +[/card] +[card] name=Ib Halfheart, Goblin Tactician auto=@combat(blocked) source(other goblin|mybattlefield) from(creature):all(trigger[to]) sacrifice auto=@combat(blocked) source(other goblin|mybattlefield) from(creature):all(trigger[from]) damage:4 @@ -43101,6 +47847,19 @@ mana={2}{R}{R} type=Sorcery [/card] [card] +name=Icefeather Aven +abilities=flying +facedown={3} +autofacedown={1}{G}{U}:morph +autofaceup=moveTo(ownerhand) target(other creature|battlefield) +text=Morph {1}{G}{U} (You may cast this card face down as a 2/2 creature for 3. Turn it face up any time for its morph cost.)-- When Icefeather Aven is turned face up, you may return another target creature to its owner's hand. +mana={G}{U} +type=Creature +subtype=Bird Shaman +power=2 +toughness=2 +[/card] +[card] name=Icequake target=land auto=teach(land[snow]) damage:1 targetcontroller @@ -43167,6 +47926,15 @@ mana={4} type=Artifact [/card] [card] +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. +mana={X}{U} +type=Instant +[/card] +[card] name=Ideas Unbound auto=draw:3 auto=phaseaction[endofturn] reject target(<3>*|myhand) @@ -43287,6 +48055,17 @@ mana={B} type=Enchantment [/card] [card] +name=Ill-Tempered Cyclops +abilities=trample +auto=this(cantargetcard(*[-monstrous]) {5}{R}:becomes(monstrous) forever && counter(1/1,3) +text=Trample -- {5}{R}: Monstrosity 3. (If this creature isn't monstrous, put three +1/+1 counters on it and it becomes monstrous.) +mana={3}{R} +type=Creature +subtype=Cyclops +power=3 +toughness=3 +[/card] +[card] name=Illuminated Wings target=creature auto=flying @@ -43306,6 +48085,16 @@ mana={W}{W} type=Instant [/card] [card] +name=Illusionary Armor +target=creature +auto=4/4 +auto=@targeted(mytgt):sacrifice all(this) +text=Enchant creature -- Enchanted creature gets +4/+4. -- When enchanted creature becomes the target of a spell or ability, sacrifice Illusionary Armor. +mana={4}{U} +type=Enchantment +subtype=Aura +[/card] +[card] name=Illusionary Forces abilities=flying auto=cumulativeupcost[{U}] sacrifice @@ -43436,6 +48225,13 @@ mana={X}{WB}{WB}{WB} type=Sorcery [/card] [card] +name=Impact Tremors +auto=@movedto(creature|mybattlefield):damage:1 all(opponent) +text=Whenever a creature enters the battlefield under your control, Impact Tremors deals 1 damage to each opponent. +mana={1}{R} +type=Enchantment +[/card] +[card] name=Impaler Shrike abilities=flying auto=@combatdamaged(player) from(this):may sacrifice all(this) && draw:3 @@ -43561,6 +48357,16 @@ mana={4}{R} type=Sorcery [/card] [card] +name=Imposing Sovereign +auto=@movedTo(creature|opponentBattlefield):all(trigger) tap +text=Creatures your opponents control enter the battlefield tapped. +mana={1}{W} +type=Creature +subtype=Human +power=2 +toughness=1 +[/card] +[card] name=Improvised Armor target=creature auto=2/5 @@ -43580,6 +48386,13 @@ mana={1}{B} type=Instant [/card] [card] +name=In Garruk's Wake +auto=destroy all(creature,planeswalker|opponentbattlefield) +text=Destroy all creatures you don't control and all planeswalkers you don't control. +mana={7}{B}{B} +type=Sorcery +[/card] +[card] name=In the Eye of Chaos auto=@movedto(instant[manacost=1]|stack):all(trigger[to]) transforms((,newability[pay[[{1}]] name(pay 1 mana) donothing?fizzle])) forever auto=@movedto(instant[manacost=2]|stack):all(trigger[to]) transforms((,newability[pay[[{2}]] name(pay 2 mana) donothing?fizzle])) forever @@ -43874,6 +48687,14 @@ power=4 toughness=4 [/card] [card] +name=Induce Paranoia +target=*|stack +auto=if spent({B}) then transforms((,newability[deplete:manacost],newability[fizzle])) else fizzle +text=Counter target spell. If {B} was spent to cast Induce Paranoia, that spell's controller puts the top X cards of his or her library into his or her graveyard, where X is the spell's converted mana cost. +mana={2}{U}{U} +type=Instant +[/card] +[card] name=Inertia Bubble target=artifact auto=doesnotuntap @@ -43911,6 +48732,17 @@ power=1 toughness=1 [/card] [card] +name=Infectious Bloodlust +target=creature +auto=teach(creature) 2/1 +auto=teach(creature) haste +auto=@movedto(mytgt|graveyard) from(Battlefield):may moveto(myhand) notatarget(Infectious Bloodlust|mylibrary) +text=Enchant creature -- Enchanted creature gets +2/+1, has haste, and attacks each turn if able. -- When enchanted creature dies, you may search your library for a card named Infectious Bloodlust, reveal it, put it into your hand, then shuffle your library. +mana={1}{R} +type=Enchantment +subtype=Aura +[/card] +[card] name=Infectious Horror auto=@combat(attacking) source(this):life:-2 opponent text=Whenever Infectious Horror attacks, each opponent loses 2 life. @@ -43970,6 +48802,16 @@ mana={R}{S(creature|myBattlefield)} type=Sorcery [/card] [card] +name=Infernal Scarring +target=creature +auto=teach(creature) 2/0 +auto=@movedto(mytgt|graveyard) from(Battlefield):draw:1 targetcontroller +text=Enchant creature -- Enchanted creature gets +2/+0 and has "When this creature dies, draw a card." +mana={1}{B} +type=Enchantment +subtype=Aura +[/card] +[card] name=Infernal Tribute auto={2}{S(*[-token]|myBattlefield)}:draw:1 text={2}, Sacrifice a nontoken permanent: Draw a card. @@ -44002,6 +48844,16 @@ power=4 toughness=4 [/card] [card] +name=Inferno Fist +target=creature|mybattlefield +auto=teach(creature) 2/0 +auto={R}{S}:damage:2 target(creature,player) +text=Enchant creature you control. -- Enchanted creature gets +2/+0. -- {R} Sacrifice Inferno Fist: Inferno Fist deals 2 damage to target creature or player +mana={1}{R} +type=Enchantment +subtype=Aura +[/card] +[card] name=Infest auto=lord(creature) -2/-2 text=All creatures get -2/-2 until end of turn. @@ -44162,7 +49014,8 @@ toughness=11 [card] name=Ink-Eyes, Servant of Oni autohand={3}{B}{B}{N}:ninjutsu -auto=@combatdamaged(player) from(this):may moveTo(myBattlefield) target(creature|opponentgraveyard) +auto=@combatdamagefoeof(player) from(this):may moveTo(myBattlefield) target(creature|opponentgraveyard) +auto=@combatdamageof(player) from(this):may moveTo(myBattlefield) target(creature|mygraveyard) auto={1}{B}:all(this) regenerate text=Ninjutsu {3}{B}{B} ({3}{B}{B}, Return an unblocked attacker you control to hand: Put this card onto the battlefield from your hand tapped and attacking.) -- Whenever Ink-Eyes, Servant of Oni deals combat damage to a player, you may put target creature card from that player's graveyard onto the battlefield under your control. -- {1}{B}: Regenerate Ink-Eyes. mana={4}{B}{B} @@ -44285,6 +49138,16 @@ power=2 toughness=2 [/card] [card] +name=Insatiable Harpy +abilities=flying,lifelink +text=Flying -- Lifelink. +mana={2}{B}{B} +type=Creature +subtype=Harpy +power=2 +toughness=2 +[/card] +[card] name=Insatiable Souleater auto={p(G)}:trample text=({p(G)} may be paid for with either {G} or 2 life.) -- {p(G)}: Insatiable Souleater gains trample until end of turn. @@ -44357,6 +49220,14 @@ power=2 toughness=2 [/card] [card] +name=Inspiring Call +auto=draw:type:creature[counter{1/1.1}]:mybattlefield +auto=all(creature[counter{1/1.1}]|mybattlefield) indestructible ueot +text=Draw a card for each creature you control with a +1/+1 counter on it. Those creatures gain indestructible until end of turn. (Damage and effects that say "destroy" don't destroy them.) +mana={2}{G} +type=Instant +[/card] +[card] name=Inspirit target=creature auto=untap @@ -44538,6 +49409,16 @@ mana={3}{U}{U}{U} type=Sorcery [/card] [card] +name=Invasive Species +auto=moveTo(ownerhand) notatarget(other *|mybattlefield) +text=When Invasive Species enters the battlefield, return another permanent you control to its owner's hand. +mana={2}{G} +type=Creature +subtype=Insect +power=3 +toughness=3 +[/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 @@ -44550,7 +49431,7 @@ name=Invigorate target=creature auto=4/4 auto=alternative life:3 opponent -otherrestriction=type(forest|mybattlefield)~morethan~0 +otherrestriction=type(forest|mybattlefield)~morethan~0,type(*[nolifegain]|opponentbattlefield)~lessthan~1,type(*[nolifegainopponent]|mybattlefield)~lessthan~1 other={0} name(Have Opponent Gain 3 Life) text=If you control a Forest, you may have an opponent gain 3 life rather than pay Invigorate's mana cost. -- Target creature gets +4/+4 until end of turn. mana={2}{G} @@ -44615,6 +49496,7 @@ type=Sorcery [/card] [card] name=Iona, Shield of Emeria +alias=1000 abilities=flying auto=chooseacolor maxCast(*[chosencolor])0 opponent chooseend text=Flying -- As Iona, Shield of Emeria enters the battlefield, choose a color. -- Your opponents can't cast spells of the chosen color. @@ -44680,7 +49562,7 @@ toughness=2 [/card] [card] name=Irini Sengir -auto=lord(enchantment[white;green]|hand) altercost(colorless,+1) +auto=lord(enchantment[white;green]|hand,library,graveyard,exile) altercost(colorless,+1) text=White enchantment spells and green enchantment spells cost {2} more to cast. mana={2}{B}{B} type=Legendary Creature @@ -44689,6 +49571,16 @@ power=2 toughness=2 [/card] [card] +name=Iroas's Champion +abilities=double strike +text=Double strike (This creature deals both first-strike and regular combat damage.) +mana={1}{R}{W} +type=Creature +subtype=Human Soldier +power=2 +toughness=2 +[/card] +[card] name=Iron Lance auto={3}{T}:first strike target(creature) text={3}, {T}: Target creature gains first strike until end of turn. @@ -44697,7 +49589,7 @@ type=Artifact [/card] [card] name=Iron Maiden -auto=@each opponent upkeep:foreach(*|opponenthand) damage:1 opponent >4 +auto=@each opponent upkeep:damage:morethanfourcards opponent text=At the beginning of each opponent's upkeep, Iron Maiden deals X damage to that player, where X is the number of cards in his or her hand minus 4. mana={3} type=Artifact @@ -45032,6 +49924,16 @@ mana={1} type=Artifact [/card] [card] +name=Ivorytusk Fortress +auto=@each opponent untap:untap all(creature[counter{1/1.1}]|mybattlefield) +text=Untap each creature you control with a +1/+1 counter on it during each other player's untap step. +mana={2}{W}{B}{G} +type=Creature +subtype=Elephant +power=5 +toughness=7 +[/card] +[card] name=Ivy Dancer auto={T}:forestwalk target(creature) text={T}: Target creature gains forestwalk until end of turn. @@ -45178,7 +50080,7 @@ toughness=2 [/card] [card] name=Jace's Erasure -auto=@drawn(controller):may deplete:1 target(player) +auto=@drawof(player):may deplete:1 target(player) text=Whenever you draw a card, you may have target player put the top card of his or her library into his or her graveyard. mana={1}{U} type=Enchantment @@ -45261,7 +50163,7 @@ toughness=8 [/card] [card] name=Jade Leech -auto=lord(*[green]|myhand) altercost(green,+1) +auto=lord(*[green]|myhand,mylibrary,mygraveyard,myexile) altercost(green,+1) text=Green spells you cast cost {G} more to cast. mana={2}{G}{G} type=Creature @@ -45290,7 +50192,7 @@ type=Sorcery [card] name=Jagged Poppet auto=@damaged(this):ability$!name(discard) target(*|myhand) reject!$ controller -auto=@combatdamaged(opponent) from(this) restriction{type(*|myhand)~lessthan~1}:ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@combatdamagefoeof(player) from(this) restriction{type(*|myhand)~lessthan~1}:ability$!name(discard) target(*|myhand) reject!$ opponent text=Whenever Jagged Poppet is dealt damage, discard that many cards. -- Hellbent - Whenever Jagged Poppet deals combat damage to a player, if you have no cards in hand, that player discards cards equal to the damage. mana={1}{B}{R} type=Creature @@ -45300,7 +50202,7 @@ toughness=4 [/card] [card] name=Jagged-Scar Archers -auto=foreach(elf|myBattlefield) 1/1 +anyzone=type:elf:myBattlefield/type:elf:myBattlefield cdaactive auto={T}:target(creature[flying]) dynamicability text=Jagged-Scar Archers's power and toughness are each equal to the number of Elves you control. -- {T}: Jagged-Scar Archers deals damage equal to its power to target creature with flying. mana={1}{G}{G} @@ -45463,6 +50365,18 @@ power=2 toughness=5 [/card] [card] +name=Jeering Instigator +facedown={3} +autofacedown={2}{R}:morph +autofaceup=if compare(restriction{myturnonly}~morethan~0) then target(creature|opponentbattlefield) transforms((,newability[moveTo(opponentbattlefield)],newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot +text=Morph {2}{R} (You may cast this card face down as a 2/2 creature for 3. Turn it face up any time for its morph cost.) -- When Jeering Instigator is turned face up, if it's your turn, gain control of another target creature until end of turn. Untap that creature. It gains haste until end of turn. +mana={1}{R} +type=Creature +subtype=Goblin Rogue +power=2 +toughness=1 +[/card] +[card] name=Jenara, Asura of War abilities=flying auto={1}{W}:counter(1/1,1) @@ -45504,6 +50418,98 @@ power=3 toughness=1 [/card] [card] +name=Jeskai Ascendancy +auto=@movedTo(*[-creature]|mystack):all(creature|myBattlefield) 1/1 ueot +auto=@movedTo(*[-creature]|mystack):all(creature|mybattlefield) untap +auto=@movedTo(*[-creature]|mystack):may name(draw & discard) ability$!draw:1 _ choice notatarget(*|myhand) reject)!$ controller +text=Enchantment. -- Whenever you cast a noncreature spell, creatures you control get +1/+1 until end of turn. Untap those creatures. -- Whenever you cast a noncreature spell, you may draw a card. If you do, discard a card. +mana={U}{R}{W} +type=Enchantment +[/card] +[card] +name=Jeskai Banner +auto={T}: Add{U} +auto={T}: Add{R} +auto={T}: Add{W} +auto={U}{R}{W}{T}{S}:draw:1 controller +text={T}: Add {U},{R} or {W} to your mana pool. -- {U}{R}{W}, {T}, Sacrifice Jeskai Banner: Draw a card. +mana={3} +type=Artifact +[/card] +[card] +name=Jeskai Barricade +abilities=flash,defender +auto=may name(bounce target creature you control) moveTo(ownerhand) target(other creature|myBattlefield) +text=Flash (You may cast this spell any time you could cast an instant.) -- Defender -- When Jeskai Barricade enters the battlefield, you may return another target creature you control to its owner's hand. +mana={1}{W} +type=Creature +subtype=Wall +power=0 +toughness=4 +[/card] +[card] +name=Jeskai Charm +auto=choice name(top of library) moveTo(ownerLibrary) target(creature) +auto=choice name(4 damage) damage:4 target(opponent) +auto=choice name(1/1 and Lifelink) all(creature|myBattlefield) transforms((,newability[1/1],newability[lifelink])) ueot +text=Choose one: -- Put target creature on top of its owner's library. -- Jeskai Charm deals 4 damage to target opponent. -- Creatures you control get +1/+1 and gain lifelink until end of turn. +mana={U}{R}{W} +type=Instant +[/card] +[card] +name=Jeskai Elder +auto=@movedTo(*[-creature]|mystack):1/1 ueot +auto=@combatdamaged(player) from(this):may name(draw & discard) ability$!draw:1 _ choice notatarget(*|myhand) reject)!$ controller +text=Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) -- Whenever Jeskai Elder deals combat damage to a player, you may draw a card. If you do, discard a card. +mana={1}{U} +type=Creature +subtype=Human Monk +power=1 +toughness=2 +[/card] +[card] +name=Jeskai Runemark +target=creature +auto=2/2 +auto=aslongas(*[red;white]|mybattlefield):teach(creature) flying +text=Enchant creature -- Enchanted creature gets +2/+2. -- Enchanted creature has flying as long as you control a red or white permanent. +mana={2}{U} +type=Enchantment +subtype=Aura +[/card] +[card] +name=Jeskai Sage +auto=@movedto(*[-creature]|mystack):1/1 ueot +auto=@movedto(this|graveyard) from(mybattlefield):draw:1 controller +text=Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) -- When Jeskai Sage dies, draw a card. +mana={1}{U} +type=Creature +subtype=Human Monk +power=1 +toughness=1 +[/card] +[card] +name=Jeskai Student +auto=@movedTo(*[-creature]|mystack):1/1 ueot +text=Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) +mana={1}{W} +type=Creature +subtype=Human Monk +power=1 +toughness=3 +[/card] +[card] +name=Jeskai Windscout +abilities=flying +auto=@movedTo(*[-creature]|mystack):1/1 ueot +text=Flying -- Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) +mana={2}{U} +type=Creature +subtype=Bird Scout +power=2 +toughness=1 +[/card] +[card] name=Jester's Cap auto={2}{T}{S}:choice name(target player) target(player) moveto(exile) target(<3>*|targetedpersonslibrary) text={2}, {T}, Sacrifice Jester's Cap: Search target player's library for three cards and exile them. Then that player shuffles his or her library. @@ -45512,7 +50518,7 @@ type=Artifact [/card] [card] name=Jet Medallion -auto=lord(*[black]|myhand) altercost(colorless,-1) +auto=lord(*[black]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) text=Black spells you cast cost {1} less to cast. mana={2} type=Artifact @@ -45574,6 +50580,17 @@ power=2 toughness=1 [/card] [card] +name=Jhessian Thief +auto=@combatdamaged(player) from(this):draw:1 controller +auto=@movedTo(*[-creature]|mystack):1/1 ueot +text=Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) -- Whenever Jhessian Thief deals combat damage to a player, draw a card. +mana={2}{U} +type=Creature +subtype=Human Rogue +power=1 +toughness=3 +[/card] +[card] name=Jhessian Zombies abilities=fear autohand={2}{cycle}:name(islandcycling or swampcycling) moveTo(myhand) target(island,swamp|mylibrary) @@ -45616,6 +50633,7 @@ toughness=3 [/card] [card] name=Jihad +alias=1000 auto=chooseacolor transforms((,newability[aslongas(*[chosencolor]|opponentbattlefield) lord(creature[white]|mybattlefield) 2/1],newability[aslongas(*[chosencolor]|opponentbattlefield) sacrifice <1])) chooseend text=As Jihad enters the battlefield, choose a color and an opponent. -- White creatures get +2/+1 as long as the chosen player controls a nontoken permanent of the chosen color. -- When the chosen player controls no nontoken permanents of the chosen color, sacrifice Jihad. mana={W}{W}{W} @@ -45635,7 +50653,7 @@ type=Instant name=Jin-Gitaxias, Core Augur abilities=flash auto=@each my end:draw:7 -auto=@each opponent cleanup:name(check handsize) ability$!choice name(reduce handsize) reject notatarget(<7>*|myhand)!$ opponent +auto=hmodifer:-7 opponent mana={8}{U}{U} type=Legendary Creature subtype=Praetor @@ -45767,6 +50785,7 @@ toughness=3 [card] name=Jokulmorder abilities=trample,doesnotuntap +auto=tap auto=aslongas(land|mybattlefield) choice target(<5>land|mybattlefield) sacrifice oneshot >4 auto=choice sacrifice all(this) auto=@movedTo(island|mybattlefield):untap @@ -45867,6 +50886,17 @@ power=1 toughness=1 [/card] [card] +name=Jorubai Murk Lurker +auto=aslongas(Swamp|myBattlefield) 1/1 +auto={1}{B}:target(creature) lifelink ueot +text=Jorubai Murk Lurker gets +1/+1 as long as you control a Swamp. -- {1}{B}: Target creature gains lifelink until end of turn. (Damage dealt by the creature also causes its controller ot gain that much life.) +mana={2}{U} +type=Creature +subtype=Leech +power=1 +toughness=3 +[/card] +[card] name=Jotun Owl Keeper auto=cumulativeupcost[{WU}] sacrifice auto=@movedTo(this|graveyard) from(battlefield):thisforeach(counter{0/0.1.Age}) token(Bird,Creature Bird,1/1,white flying) @@ -46085,6 +51115,15 @@ text=Jungle Basin enters the battlefield tapped. -- When Jungle Basin enters the type=Land [/card] [card] +name=Jungle Hollow +auto=tap +auto=life:1 +auto={T}:Add{B} +auto={T}:Add{G} +text=Jungle Hollow enters the battlefield tapped. -- When Jungle Hollow enters the battlefield, you gain 1 life. -- {T}: Add {B} or {G} to your mana pool. +type=Land +[/card] +[card] name=Jungle Lion abilities=cantblock text=Jungle Lion can't block. @@ -46346,7 +51385,7 @@ type=Land [/card] [card] name=Kabira Evangel -auto=chooseacolor all(creature|mybattlefield) protection from(*[chosencolor]) chooseend +auto=chooseacolor all(ally|mybattlefield) protection from(*[chosencolor]) chooseend auto=@movedTo(other ally|myBattlefield):may chooseacolor all(creature|mybattlefield) protection from(*[chosencolor]) chooseend text=Whenever Kabira Evangel or another Ally enters the battlefield under your control, you may choose a color. If you do, Allies you control gain protection from the chosen color until end of turn. mana={2}{W} @@ -46443,8 +51482,8 @@ abilities=defender [/card] [card] name=Kagemaro, First to Suffer -auto=foreach(*|myhand) 1/1 -auto={B}{S}:foreach(*|myhand) -1/-1 all(creature) +anyzone=type:*:myhand/type:*:myhand cdaactive +auto={B}{S}:-type:*:myhand/-type:*:myhand all(creature) text=Kagemaro, First to Suffer's power and toughness are each equal to the number of cards in your hand. -- {B}, Sacrifice Kagemaro: All creatures get -X/-X until end of turn, where X is the number of cards in your hand. mana={3}{B}{B} type=Legendary Creature @@ -46465,9 +51504,9 @@ toughness=2 [/card] [card] name=Kaldra -auto=all(helm of kaldra) newtarget -auto=all(shield of kaldra) newtarget -auto=all(sword of kaldra) newtarget +auto=all(helm of kaldra) newhook +auto=all(shield of kaldra) newhook +auto=all(sword of kaldra) newhook type=Legendary Creature subtype=Avatar power=4 @@ -46492,6 +51531,48 @@ power=9 toughness=9 [/card] [card] +name=Kalonian Hydra +abilities=trample +auto=counter(1/1,4) +auto=@combat(attacking) source(this):all(creature|mybattlefield) transforms((,newability[thisforeach(counter{1/1.1}) counter(1/1)*2])) +text=Trample. -- Kalonian Hydra enters the battlefield with four +1/+1 counters on it. -- Whenever Kalonian Hydra attacks, double the number of +1/+1 counters on each creature you control. +mana={3}{G}{G} +type=Creature +subtype=Hydra +power=0 +toughness=0 +[/card] +[card] +name=Kalonian Tusker +text= +mana={G}{G} +type=Creature +subtype=Beast +power=3 +toughness=3 +[/card] +[card] +name=Kalonian Twingrove +anyzone=type:forest:mybattlefield/type:forest:mybattlefield cdaactive +auto=token(-383290) +text=Kalonian Twingrove's power and toughness are each equal to the number of Forests you control. -- When Kalonian Twingrove enters the battlefield, put a green Treefolk Warrior creature token onto the battlefield with "this creature's power and toughness are each equal to the number of forests you control." +mana={5}{G} +type=Creature +subtype=Treefolk Warrior +power=* +toughness=* +[/card] +[card] +name=Treefolk Warrior +anyzone=type:forest:mybattlefield/type:forest:mybattlefield cdaactive +text=This creature's power and toughness are each equal to the number of forests you control. +color=green +type=Creature +subtype=Treefolk Warrior +power=* +toughness=* +[/card] +[card] name=Kamahl's Desire target=creature auto=first strike @@ -46705,6 +51786,18 @@ power=2 toughness=2 [/card] [card] +name=Kapsho Kitefins +abilities=flying +auto=tap target(creature) +auto=@movedTo(other creature|mybattlefield):tap target(creature|opponentbattlefield) +text=Flying -- Whenever Kapsho Kitefins or another creature enters the battlefield under your control, tap target creature an opponent controls. +mana={4}{U}{U} +type=Creature +subtype=Fish +power=3 +toughness=3 +[/card] +[card] name=Karakas auto={T}:Add{W} auto={T}:moveTo(ownerhand) target(creature[legendary]) @@ -46725,6 +51818,16 @@ power=6 toughness=7 [/card] [card] +name=Karametra's Acolyte +auto={T}:thisforeach(variable{type:manaG}>0) add{G} +text={T}: Add an amount of {G} to your mana pool equal to your devotion to green. (Each {G} in the mana costs of permanents you control counts toward your devotion to green.) +mana={3}{G} +type=Creature +subtype=Human Druid +power=1 +toughness=4 +[/card] +[card] name=Karametra's Favor target=creature auto=teach(creature) {T}:add{G} @@ -47058,7 +52161,7 @@ toughness=3 [card] name=Kavu Predator abilities=trample -auto=@lifed(opponent):all(trigger[to]) dynamicability +auto=@lifefoeof(player):all(trigger[to]) dynamicability text=Trample -- Whenever an opponent gains life, put that many +1/+1 counters on Kavu Predator. mana={1}{G} type=Creature @@ -47202,7 +52305,7 @@ toughness=5 [/card] [card] name=Kederekt Parasite -auto=@drawn(opponent) restriction{type(*[red]|myBattlefield)~morethan~0}:may damage:1 opponent +auto=@drawfoeof(player) restriction{type(*[red]|myBattlefield)~morethan~0}:may damage:1 opponent text=Whenever an opponent draws a card, if you control a red permanent, you may have Kederekt Parasite deal 1 damage to that player. mana={B} type=Creature @@ -47213,7 +52316,7 @@ toughness=1 [card] name=Keen Sense target=creature -auto=@damaged(opponent) from(mytgt):may draw:1 controller +auto=@damagefoeof(player) from(mytgt):may draw:1 controller text=Enchant creature -- Whenever enchanted creature deals damage to an opponent, you may draw a card. mana={G} type=Enchantment @@ -47365,6 +52468,17 @@ power=6 toughness=6 [/card] [card] +name=Keepsake Gorgon +abilities=deathtouch +auto=this(cantargetcard(*[-monstrous]) {5}{B}{B}:becomes(monstrous) forever && counter(1/1,1) && transforms((,newability[destroy target(creature[-gorgon]|opponentbattlefield)])) forever +text=Deathtouch -- {5}{B}{B}: Monstrosity 1. (If this creature isn't monstrous, put a +1/+1 counters on it and it becomes monstrous.) -- When Keepsake Gorgon becomes monstrous, destroy target non-Gorgon creature an opponent controls. +mana={3}{B}{B} +type=Creature +subtype=Gorgon +power=2 +toughness=5 +[/card] +[card] name=Keiga, the Tide Star abilities=flying auto=@movedTo(this|graveyard) from(battlefield):moveTo(myBattlefield) target(creature) @@ -47491,7 +52605,7 @@ toughness=1 [/card] [card] name=Keldon Warlord -auto=foreach(creature[-wall]|myBattlefield) 1/1 +anyzone=type:creature[-wall]:myBattlefield/type:creature[-wall]:myBattlefield cdaactive text=Keldon Warlord's power and toughness are each equal to the number of non-Wall creatures you control. mana={2}{R}{R} type=Creature @@ -47676,6 +52790,28 @@ text={T}: Add {1} to your mana pool. -- {1}{R}, {T}: Put a 0/1 red Kobold creatu type=Legendary Land [/card] [card] +name=Kheru Bloodsucker +auto=@movedTo(graveyard) from(creature[toughness>=4]|mybattlefield):life:-2 opponent && life:2 controller +auto={2}{B}{S(other creature|mybattlefield)}:counter(1/1,1) +text=Whenever a creature you control with toughness 4 or greater dies, each opponent loses 2 life and you gain 2 life. -- (2)(B}, Sacrifice another creature: Put a +1/+1 counter on Kheru Bloodsucker. +mana={2}{B} +type=Creature +subtype=Vampire +power=2 +toughness=2 +[/card] +[card] +name=Kheru Dreadmaw +abilities=defender +auto={1}{G}{S(other creature|myBattlefield)}:life:storedtoughness +text={1}{G}, Sacrifice another creature: You gain life equal to the sacrificed creature's toughness. +mana={4}{B} +type=Creature +subtype=Zombie Crocodile +power=4 +toughness=4 +[/card] +[card] name=Kiki-Jiki, Mirror Breaker abilities=haste auto={T}:clone with(treason,haste) target(creature[-legendary]|mybattlefield) @@ -47705,6 +52841,14 @@ mana={B}{B} type=Sorcery [/card] [card] +name=Kill Shot +target=creature[attacking] +auto=destroy +text=Destroy target attacking creature. +mana={2}{W} +type=Instant +[/card] +[card] name=Killer Bees abilities=flying auto={G}:1/1 @@ -47799,6 +52943,16 @@ power=4 toughness=5 [/card] [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." +mana={2}{B}{B} +type=Legendary Creature +subtype=Human +power=2 +toughness=3 +[/card] +[card] name=King Suleiman auto={T}:destroy target(djinn,efreet) text={T}: Destroy target Djinn or Efreet. @@ -47894,9 +53048,28 @@ power=2 toughness=2 [/card] [card] +name=Kin-Tree Invocation +auto=token(Spirit Warrior,Creature Spirit Warrior,toughness:highest:creature:mybattlefield/toughness:highest:creature:mybattlefield,black,green) +text=Put an X/X black and green Spirit Warrior creature token onto the battlefield, where X is the greatest toughness among creatures you control. +mana={B}{G} +type=Sorcery +[/card] +[card] +name=Kin-Tree Warden +facedown={3} +autofacedown={G}:morph +auto={2}:regenerate +text={2}: Regenerate Kin-Tree Warden. -- Morph {G} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) +mana={G} +type=Creature +subtype=Human Warrior +power=1 +toughness=1 +[/card] +[card] name=Kiora, the Crashing Wave auto=counter(0/0,2,loyalty) -auto={C(0/0,1,Loyalty)}:name(+1: Prevention) token(37852101) controller +auto={C(0/0,1,Loyalty)}:name(+1: Prevention) target(*|opponentbattlefield) transforms((,newability[preventalldamage from(this)],newability[preventalldamage to(this)])) uynt auto={C(0/0,-1,Loyalty)}:name(-1: Draw 1 and Lands +1) draw:1 controller && maxPlay(land)+1 ueot auto={C(0/0,-5,Loyalty)}:emblem name(-5: Emblem) transforms((,newability[@each my endofturn:token(-378521) controller])) forever dontremove text=+1: Until your next turn, prevent all damage that would be dealt to and dealt by target permanent an opponent controls. -- -1: Draw a card. You may play an additional land this turn. -- -5: You get an emblem with "At the beginning of your end step, put a 9/9 blue Kraken creature token onto the battlefield." -- Starting Loyalty (2) @@ -47905,15 +53078,6 @@ type=Planeswalker subtype=Kiora [/card] [card] -name=Kiora's Prevention -abilities=indestructible,shroud -type=nothing -text=Until your next turn, prevent all damage that would be dealt to and dealt by target permanent an opponent controls. -auto=name(Prevention) target(*|opponentbattlefield) transforms((,newability[preventalldamage from(this)],newability[preventalldamage to(this)])) uynt -auto=@each myuntap:moveto(exile) all(this) -color=green,blue -[/card] -[card] name=Kiora's Kraken type=Creature subtype=Kraken @@ -47942,6 +53106,17 @@ power=1 toughness=1 [/card] [card] +name=Kird Chieftain +auto=aslongas(forest|myBattlefield) 1/1 +auto={4}{G}:name(2/2 and Trample) target(creature) transforms((,newability[2/2],newability[trample])) ueot +text=Kird Chieftain gets +1/+1 as long as you control a Forest. -- {4}{G}: Target creature gets +2/+2 and gains trample until end of turn. (If it 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.) +mana={3}{R} +type=Creature +subtype=Ape +power=3 +toughness=3 +[/card] +[card] name=Kiri-Onna auto=moveTo(ownerhand) target(creature) auto=@movedto(arcane,spirit|mystack):may moveTo(ownerhand) @@ -48090,7 +53265,7 @@ toughness=2 [card] name=Kithkin Rabble abilities=vigilance -auto=foreach(*[white]|myBattlefield) 1/1 +anyzone=type:*[white]:myBattlefield/type:*[white]:myBattlefield cdaactive text=Vigilance -- Kithkin Rabble's power and toughness are each equal to the number of white permanents you control. mana={3}{W} type=Creature @@ -48214,10 +53389,9 @@ toughness=1 [/card] [card] name=Kiyomaro, First to Stand -auto=foreach(*|myhand) 1/1 +anyzone=type:*:myhand/type:*:myhand cdaactive auto=aslongas(*|myhand) vigilance >3 -auto=@damaged(player) from(this) restriction{type(*|myhand)~morethan~6}:life:7 controller >6 -auto=@damaged(creature) from(this) restriction{type(*|myhand)~morethan~6}:life:7 controller >6 +auto=@damaged(creature,player) from(this) restriction{type(*|myhand)~morethan~6}:if type(*|myhand)~morethan~6 then life:7 controller text=Kiyomaro, First to Stand's power and toughness are each equal to the number of cards in your hand. -- As long as you have four or more cards in hand, Kiyomaro has vigilance. -- Whenever Kiyomaro deals damage, if you have seven or more cards in hand, you gain 7 life. mana={3}{W}{W} type=Legendary Creature @@ -48459,6 +53633,16 @@ power=2 toughness=2 [/card] [card] +name=Knight of the Pilgrim's Road +auto=this(cantargetcard(*[-renown]) transforms((,newability[@combatdamaged(player) from(this):counter(1/1) && becomes(renown) forever])) +text=Renown 1 (When this creature deals combat damage to a player, if it isn't renowned, put a +1/+1 counter on it and it becomes renowned.) +mana={2}{W} +type=Creature +subtype=Human Knight +power=3 +toughness=2 +[/card] +[card] name=Knight of the Reliquary auto=foreach(land|mygraveyard) 1/1 auto={T}{S(forest,plains|myBattlefield)}:moveTo(myBattlefield) target(land|mylibrary) @@ -48582,7 +53766,7 @@ toughness=2 [card] name=Knowledge Exploitation target=opponent -auto=target(*[instant;sorcery]|targetedpersonslibrary) castcard(normal) +auto=target(*[instant;sorcery]|targetedpersonslibrary) castcard(restricted) other={3}{U} name(Prowl) otherrestriction=prowl text=Prowl {3}{U} (You may cast this for its prowl cost if you dealt combat damage to a player this turn with a Rogue.) -- Search target opponent's library for an instant or sorcery card. You may cast that card without paying its mana cost. Then that player shuffles his or her library. @@ -48683,6 +53867,76 @@ power=5 toughness=5 [/card] [card] +name=Kolaghan, the Storm's Fury +abilities=flying +auto=@combat(attacking) source(dragon|mybattlefield):all(creature|mybattlefield) 1/0 ueot +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} +type=Legendary Creature +subtype=Dragon +power=4 +toughness=5 +[/card] +[card] +name=Kolaghan Aspirant +auto=@combat(blocked) source(this) from(creature):all(trigger[from]) damage:1 +text=Whenever Kolaghan Aspirant becomes blocked by a creature, Kolaghan Aspirant deals 1 damage to that creature. +mana={1}{R} +type=Creature +subtype=Human Warrior +power=2 +toughness=1 +[/card] +[card] +name=Kolaghan Forerunners +abilities=trample +anyzone=type:creature:mybattlefield/3 cdaactive +other={R}{2} name(Dash) +auto=if paid(alternative) then transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveto(ownerhand) all(this)])) forever +text=Trample -- Kolaghan Forerunners's power is equal to the number of creatures you control. -- Dash {2}{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={2}{R} +type=Creature +subtype=Human Berserker +power=* +toughness=3 +[/card] +[card] +name=Kolaghan Monument +auto={T}:add{B} +auto={T}:add{R} +auto={4}{B}{R}:becomes(Artifact Creature Dragon,4/4,flying,black,red) ueot +text={T}: Add {B} or {R} to your mana pool. -- {4}{B}{R}: Kolaghan Monument becomes a 4/4 black and red Dragon artifact creature with flying until end of turn. +mana={3} +type=Artifact +[/card] +[card] +name=Kolaghan Skirmisher +other={2}{B} name(Dash) +auto=if paid(alternative) then transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveto(ownerhand) all(this)])) forever +text=Dash {2}{B} (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={1}{B} +type=Creature +subtype=Human Warrior +power=2 +toughness=2 +[/card] +[card] +name=Kolaghan Stormsinger +abilities=haste +facedown={3} +autofacedown={R}:morph +autofaceup=counter(1/1,1) +autofaceup=target(creature|battlefield) haste ueot +text=Haste -- Megamorph {R} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) -- When Kolaghan Stormsinger is turned face up, target creature gains haste until end of turn. +mana={R} +type=Creature +subtype=Human Shaman +power=1 +toughness=1 +[/card] +[card] name=Konda, Lord of Eiganjo abilities=vigilance,indestructible auto=bushido(5/5) @@ -48694,6 +53948,15 @@ power=3 toughness=3 [/card] [card] +name=Konda's Banner +auto={2}:equip target(creature[legendary]|mybattlefield) +auto=teach(creature) transforms((,newability[lord(creature[share!color!]) 1/1],newability[lord(creature[share!types!]) 1/1])) +text=Konda's Banner can be attached only to a legendary creature. -- Creatures that share a color with equipped creature get +1/+1. -- Creatures that share a creature type with equipped creature get +1/+1. -- Equip {2} +mana={2} +type=Legendary Artifact +subtype=Equipment +[/card] +[card] name=Konda's Hatamoto auto=bushido(1/1) auto=aslongas(samurai[legendary]|mybattlefield) 1/2 @@ -48810,7 +54073,7 @@ toughness=1 [/card] [card] name=Kor Outfitter -auto=target(equipment|mybattlefield) transforms((,newability[retarget target(creature|mybattlefield)])) forever +auto=target(equipment|mybattlefield) transforms((,newability[rehook target(creature|mybattlefield)])) forever text=When Kor Outfitter enters the battlefield, you may attach target Equipment you control to target creature you control. mana={W}{W} type=Creature @@ -48863,7 +54126,7 @@ toughness=1 [card] name=Korlash Heir to Blackblade auto={discard(korlash heir to blackblade|myhand)}:moveto(mybattlefield) and!(tap)! target(swamp|mylibrary) -auto=foreach(swamp|mybattlefield) 1/1 +anyzone=type:swamp:mybattlefield/type:swamp:mybattlefield cdaactive auto={1}{B}:regenerate text=Korlash, Heir to Blackblade's power and toughness are each equal to the number of Swamps you control. -- {1}{B}: Regenerate Korlash. -- Grandeur - Discard another card named Korlash, Heir to Blackblade: Search your library for up to two Swamp cards, put them onto the battlefield tapped, then shuffle your library. mana={2}{B}{B} @@ -48933,6 +54196,17 @@ type=Planeswalker subtype=Koth [/card] [card] +name=Kothophed, Soul Hoarder +abilities=flying +auto=@movedto(*|opponentgraveyard) from(battlefield):draw:1 controller && life:-1 controller +text=Flying -- Whenever a permanent owned by another player is put into a graveyard from the battlefield, you draw a card and you lose 1 life. +mana={4}{B}{B} +type=Legendary Creature +subtype=Demon +power=6 +toughness=6 +[/card] +[card] name=Koth's Courier abilities=forestwalk text=Forestwalk @@ -48975,6 +54249,17 @@ power=2 toughness=3 [/card] [card] +name=Kragma Warcaller +auto=lord(creature[minotaur]|myBattlefield) haste +auto=lord(minotaur[attacking]|myBattlefield) 2/0 ueot +text=Minotaur Creatures you control have haste. -- Whenever a Minotaur you control attacks, it gets +2/+0 until end of turn. +mana={3}{B}{R} +type=Creature +subtype=Minotaur Warrior +power=2 +toughness=3 +[/card] +[card] name=Kraul Warrior auto={5}{G}:3/3 ueot text={5}{G}: Kraul Warrior gets +3/+3 until end of turn. @@ -49095,6 +54380,16 @@ mana={1}{R} type=Sorcery [/card] [card] +name=Krenko's Enforcer +abilities=intimidate +text=Intimidate (This creature can't be blocked except by artifact creatures and/or creatures that share a color with it.) +mana={1}{R}{R} +type=Creature +subtype=Goblin Warrior +power=2 +toughness=2 +[/card] +[card] name=Kris Mage auto={R}{T}{discard(*|myhand)}:damage:1 target(creature,player) text={R}, {T}, Discard a card: Kris Mage deals 1 damage to target creature or player. @@ -49183,7 +54478,7 @@ toughness=2 [/card] [card] name=Krosan Drover -auto=lord(creature[manacost>=6]|myhand) altercost(colorless,-2) +auto=lord(creature[manacost>=6]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) text=Creature spells you cast with converted mana cost 6 or more cost {2} less to cast. mana={3}{G} type=Creature @@ -49243,7 +54538,7 @@ toughness=5 [card] name=Krosan Warchief auto={1}{G}:regenerate target(beast) -auto=lord(beast|myhand) altercost(colorless,-1) +auto=lord(beast|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) text=Beast spells you cast cost {1} less to cast. -- {1}{G}: Regenerate target Beast. mana={2}{G} type=Creature @@ -49285,7 +54580,7 @@ subtype=Aura [card] name=Krovikan Mist abilities=flying -auto=foreach(illusion|battlefield) 1/1 +anyzone=type:illusion:battlefield/type:illusion:battlefield cdaactive text=Flying -- Krovikan Mist's power and toughness are each equal to the number of Illusions on the battlefield. mana={1}{U} type=Creature @@ -49335,7 +54630,7 @@ toughness=1 name=Krovikan Whispers alias=1194 target=creature -auto=cumulativeupcost[{U}{B}] sacrifice +auto=cumulativeupcostmulti[{U}{B}] sacrifice all(this) auto=@movedTo(this|graveyard) from(battlefield):thisforeach(counter{0/0.1.Age}) life:-2 controller text=Enchant creature -- Cumulative upkeep {U} or {B} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.) -- You control enchanted creature. -- When Krovikan Whispers is put into a graveyard from the battlefield, you lose 2 life for each age counter on it. mana={3}{U} @@ -49353,6 +54648,17 @@ power=2 toughness=1 [/card] [card] +name=Krumar Bond-Kin +facedown={3} +autofacedown={4}{B}:morph +text=Morph {4}{B} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) +mana={3}{B}{B} +type=Creature +subtype=Orc Warrior +power=5 +toughness=3 +[/card] +[card] name=Kry Shield auto={2}{T}:target(creature|mybattlefield) dynamicability preventalldamage from(mytgt) ueot text={2}, {T}: Prevent all damage that would be dealt this turn by target creature you control. That creature gets +0/+X until end of turn, where X is its converted mana cost. @@ -49603,6 +54909,25 @@ power=2 toughness=2 [/card] [card] +name=Kytheon's Irregulars +auto={W}{W}:tap target(creature) +auto=this(cantargetcard(*[-renown]) transforms((,newability[@combatdamaged(player) from(this):counter(1/1) && becomes(renown) forever])) +text=Renown 1 (When this creature deals combat damage to a player, if it isn't renowned, put a +1/+1 counter on it and it becomes renowned.) -- {W}{W}: Tap target creature. +mana={2}{W}{W} +type=Creature +subtype=Human Soldier +power=4 +toughness=3 +[/card] +[card] +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.) +mana={1}{W}{W} +type=Sorcery +[/card] +[card] name=Lab Rats auto=token(Rat,Creature Rat,1/1,black) buyback={B}{4} @@ -49613,7 +54938,7 @@ type=Sorcery [card] name=Laboratory Maniac abilities=cantmilllose -auto=@drawn(controller) restriction{type(*|mylibrary)~equalto~0}:wingame +auto=@drawof(player) restriction{type(*|mylibrary)~equalto~0}:wingame text=If you would draw a card while your library has no cards in it, you win the game instead. mana={2}{U} type=Creature @@ -49622,6 +54947,16 @@ power=2 toughness=2 [/card] [card] +name=Labyrinth Champion +auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):damage:2 target(creature,player) +text=Heroic - Whenever you cast a spell that targets Labyrinth Champion, Labyrinth Champion deals 2 damage to target creature or player. +mana={3}{R} +type=Creature +subtype=Human Warrior +power=2 +toughness=2 +[/card] +[card] name=Labyrinth Minotaur auto=@combat(blocking) source(this) from(creature):all(trigger[from]) frozen text=Whenever Labyrinth Minotaur blocks a creature, that creature doesn't untap during its controller's next untap step. @@ -49737,6 +55072,26 @@ power=3 toughness=3 [/card] [card] +name=Lagonna-Band Elder +auto=aslongas(enchantment|mybattlefield) life:3 controller +text=When Lagonna-Band Elder enters the battlefield, if you control an enchantment, you gain 3 life. +mana={2}{W} +type=Creature +subtype=Centaur Advisor +power=3 +toughness=2 +[/card] +[card] +name=Lagonna-Band Trailblazer +auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):counter(1/1,1) +text=Heroic —- Whenever you cast a spell that targets Lagonna-Band Trailblazer, put a +1/+1 counter on Lagonna-Band Trailblazer. +mana={W} +type=Creature +subtype=Centaur Scout +power=0 +toughness=4 +[/card] +[card] name=Lake of the Dead auto=if type(swamp|mybattlefield)~morethan~0 then sacrifice notatarget(swamp|mybattlefield) oneshot else sacrifice auto={T}:Add{B} @@ -49757,7 +55112,7 @@ toughness=2 [/card] [card] name=Silverpelt Werewolf -auto=@combatdamaged(opponent) from(this):draw:1 controller +auto=@combatdamaged(player) from(this):draw:1 controller auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Lambholt Elder) text=Whenever Silverpelt Werewolf deals combat damage to a player, draw a card. -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Silverpelt Werewolf. color=green @@ -49795,6 +55150,16 @@ mana={2}{U}{U} type=Enchantment [/card] [card] +name=Land Grant +other={0} name(Cast for free) +auto=moveto(myhand) notatarget(forest|mylibrary) +otherrestriction=type(land|myhand)~lessthan~1 +autostack=if paid(alternative) then ability$!name(look at opponent hand) notatarget(*|opponenthand) 0/0!$ opponent +text=If you have no land cards in hand, you may reveal your hand rather than pay Land Grant's mana cost. -- Search your library for a Forest card, reveal that card, and put it into your hand. Then shuffle your library. +mana={1}{G} +type=Sorcery +[/card] +[card] name=Land Leeches abilities=first strike text=First strike @@ -49827,6 +55192,13 @@ mana={R} type=Sorcery [/card] [card] +name=Languish +auto=all(creature|battlefield) -4/-4 ueot +text=All creatures get -4/-4 until end of turn. +mana={2}{B}{B} +type=Sorcery +[/card] +[card] name=Lantern Kami abilities=flying text=Flying @@ -49883,12 +55255,21 @@ type=Sorcery [/card] [card] name=Larceny -auto=@combatdamaged(player) from(creature|mybattlefield):all(trigger[to]) ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@combatdamagefoeof(player) from(creature|mybattlefield):all(trigger[to]) ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@combatdamageof(player) from(creature|mybattlefield):all(trigger[to]) ability$!name(discard) target(*|myhand) reject!$ controller text=Whenever a creature you control deals combat damage to a player, that player discards a card. mana={3}{B}{B} type=Enchantment [/card] [card] +name=Lash of the Whip +target=creature +auto=-4/-4 ueot +text=Target creature gets -4/-4 until end of turn. +mana={4}{B} +type=Instant +[/card] +[card] name=Lashknife target=creature auto=first strike @@ -49954,10 +55335,10 @@ type=Instant [/card] [card] name=Last Kiss -target=creature,player +target=creature auto=damage:2 auto=life:2 controller -text=Last Kiss deals 2 damage to target creature or player and you gain 2 life. +text=Last Kiss deals 2 damage to target creature and you gain 2 life. mana={2}{B} type=Instant [/card] @@ -50065,7 +55446,7 @@ type=Instant [card] name=Lavinia of the Tenth abilities=protection from red -auto=name(detain) all(*[manacost<=4;-land]|opponentBattlefield) transforms((Detained,newability[cantattack],newability[cantblock],newability[noactivatedability])) uynt +auto=name(detain) transforms((,newability[lord(detained) cantattack],newability[lord(detained) cantblock],newability[lord(detained) noactivatedability],newability[lord(*[manacost<=4]|opponentBattlefield) becomes(detained)])) uynt text=Protection from red. -- When Lavinia of the Tenth enters the battlefield, detain each nonland permanent your opponents control with converted mana cost 4 or less. mana={3}{W}{U} type=Legendary Creature @@ -50414,6 +55795,25 @@ power=2 toughness=3 [/card] [card] +name=Leaping Master +auto={2}{W}:flying ueot +text=Leaping Master gains flying until end of turn. +mana={1}{R} +type=Creature +subtype=Human Monk +power=2 +toughness=1 +[/card] +[card] +name=Learn from the Past +target=player +auto=moveTo(ownerlibrary) and!(shuffle)! all(*|targetedpersonsgraveyard) +auto=draw:1 controller +text=Target player shuffles his or her graveyard into his or her library. Draw a card. +mana={3}{U} +type=Instant +[/card] +[card] name=Leashling auto={s2l(*|myhand)}:moveTo(myhand) text=Put a card in your hand on top of your library: Return Leashling to its owner's hand. @@ -50432,6 +55832,16 @@ power=4 toughness=5 [/card] [card] +name=Leeching Sliver +auto=lord(sliver|mybattlefield) transforms((,newability[@combat(attacking) source(this):life:-1 opponent])) +text=Whenever a Sliver you control attacks, defending player loses 1 life. +mana={1}{B} +type=Creature +subtype=Sliver +power=1 +toughness=1 +[/card] +[card] name=Leechridden Swamp auto=tap auto=aslongas(*[black]|myBattlefield) {B}{T}:life:-1 opponent >1 @@ -50471,8 +55881,8 @@ toughness=2 [/card] [card] name=Legacy Weapon +abilities=shufflelibrarydeath auto={w}{R}{G}{B}{U}:moveto(exile) target(*|battlefield) -autograveyard=moveTo(ownerlibrary) && shuffle text={w}{R}{G}{B}{U}:Exile target permanent. -- If Legacy Weapon would be put into a graveyard from anywhere, reveal Legacy Weapon and shuffle it into its owner's library instead. type=Legendary Artifact mana={7} @@ -50577,6 +55987,16 @@ power=1 toughness=1 [/card] [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. +mana={3}{W} +type=Creature +subtype=Cat Monk +power=3 +toughness=2 +[/card] +[card] name=Leonin Relic-Warder auto=may (blink)forsrc target(artifact,enchantment) text=When Leonin Relic-Warder enters the battlefield, you may exile target artifact or enchantment. -- When Leonin Relicguard leaves the battlefield, return the exiled card to the battlefield under its owner's control. @@ -50606,6 +56026,16 @@ power=2 toughness=2 [/card] [card] +name=Leonin Snarecaster +auto=may tap target(creature) +text=When Leonin Snarecaster enters the battlefield, you may tap target creature. +mana={1}{W} +type=Creature +subtype=Cat Soldier +power=2 +toughness=1 +[/card] +[card] name=Leonin Squire auto=moveTo(myhand) target(artifact[manacost<=1]|mygraveyard) text=When Leonin Squire enters the battlefield, return target artifact card with converted mana cost 1 or less from your graveyard to your hand. @@ -50760,12 +56190,10 @@ abilities=leyline [/card] [card] name=Leyline of the Void -#need to have opponentOwn attribute like auto=lord(*[opponentOwn]) transforms((,newability[exiledeath])) -auto=@movedTo(*|opponentGraveyard):all(trigger[to]) moveTo(exile) +abilities=leyline,oppgraveexiler text=If Leyline of the Void is in your opening hand, you may begin the game with it on the battlefield. -- If a card would be put into an opponent's graveyard from anywhere, exile it instead. mana={2}{B}{B} type=Enchantment -abilities=leyline [/card] [card] name=Leyline Phantom @@ -50780,7 +56208,8 @@ toughness=5 [/card] [card] name=Lhurgoyf -auto=foreach(creature|graveyard) 1/1 +alias=1111 +anyzone=type:creature:graveyard/plusonetype:creature:graveyard cdaactive text=Lhurgoyf's power is equal to the number of creature cards in all graveyards and its toughness is equal to that number plus 1. mana={2}{G}{G} type=Creature @@ -50835,7 +56264,7 @@ toughness=2 [card] name=Lich's Tomb abilities=cantlifelose -auto=@lifeloss(controller):ability$!sacrifice notatarget(*|mybattlefield)!$ controller +auto=@lifelostof(player):ability$!sacrifice notatarget(*|mybattlefield)!$ controller text=You don't lose the game for having 0 or less life. -- Whenever you lose life, sacrifice a permanent for each 1 life you lost. (Damage causes loss of life.) mana={4} type=Artifact @@ -50940,6 +56369,17 @@ mana={4} type=Artifact [/card] [card] +name=Lifebane Zombie +abilities=intimidate +auto=choice name(target opponent) target(opponent) donothing && all(this) transforms((,newability[if type(creature[green;white]|targetedpersonshand)~lessthan~1 then name(look) donothing notatarget(*|targetedpersonshand) else moveto(exile) notatarget(creature[green;white]|targetedpersonshand)],black)) oneshot +text=Intimidate. -- When Lifebane Zombie enters the battlefield, target opponent reveals his or her hand. You choose a green or white creature card from it and exile that card. +mana={1}{B}{B} +type=Creature +subtype=Zombie +power=3 +toughness=1 +[/card] +[card] name=Lifeblood auto=@tapped(mountain|opponentBattlefield):life:1 controller text=Whenever a Mountain an opponent controls becomes tapped, you gain 1 life. @@ -50992,6 +56432,13 @@ mana={4}{B}{B} type=Sorcery [/card] [card] +name=Life's Legacy +auto=draw:storedpower controller +text=As an additional cost to cast Life's Legacy, sacrifice a creature. -- Draw cards equal to the sacrificed creature's power. +mana={1}{G} +type=Sorcery +[/card] +[card] name=Lifesmith auto=@movedto(artifact|mystack):pay({1}) life:3 mana={1}{G} @@ -51104,6 +56551,18 @@ mana={R}{discard(other *|myhand)} type=Instant [/card] [card] +name=Lightning Berserker +other={R} name(Dash) +auto=if paid(alternative) then transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveto(ownerhand) all(this)])) forever +auto={R}:1/0 ueot +text={R}: Lightning Berserker gets +1/+0 until end of turn. -- Dash {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={R} +type=Creature +subtype=Human Berserker +power=1 +toughness=1 +[/card] +[card] name=Lightning Blast target=creature,player auto=Damage:4 @@ -51168,6 +56627,16 @@ mana={1}{R} type=Instant [/card] [card] +name=Lightning Diadem +target=creature +auto=2/2 +auto=damage:2 target(creature,player) +text=When Lightning Diadem enters the battlefield, it deals 2 damage to target creature or player. -- Enchanted creature gets +2/+2. +mana={5}{R} +type=Enchantment +subtype=Aura +[/card] +[card] name=Lightning Dragon abilities=flying auto={R}:1/0 @@ -51270,6 +56739,25 @@ power=2 toughness=1 [/card] [card] +name=Lightning Shrieker +abilities=flying,trample,haste +auto=@each endofturn:moveto(ownerlibrary) && shuffle +text=Flying, trample, haste. -- At the beginning of the end step, Lightning Shrieker's owner shuffles it into his or her library. +mana={4}{R} +type=Creature +subtype=Dragon +power=5 +toughness=5 +[/card] +[card] +name=Lightning Strike +target=creature,player +auto=damage:3 +text=Lightning Strike deals 3 damage to target creature or player. +mana={1}{R} +type=Instant +[/card] +[card] name=Lightning Talons target=creature auto=3/0 @@ -51287,9 +56775,20 @@ mana={3}{R} type=Instant [/card] [card] +name=Lightwalker +auto=this(counter{1/1.1}>0) flying +text=Lightwalker has flying as long as it has a +1/+1 counter on it. +mana={1}{W} +type=Creature +subtype=Human Warrior +power=2 +toughness=1 +[/card] +[card] name=Lightwielder Paladin abilities=first strike -auto=@combatdamaged(player) from(this):may moveTo(exile) target(*[black;red]|opponentBattlefield) +auto=@combatdamagefoeof(player) from(this):may moveTo(exile) target(*[black;red]|opponentBattlefield) +auto=@combatdamageof(player) from(this):may moveTo(exile) target(*[black;red]|myBattlefield) text=First strike (This creature deals combat damage before creatures without first strike.) -- Whenever Lightwielder Paladin deals combat damage to a player, you may exile target black or red permanent that player controls. mana={3}{W}{W} type=Creature @@ -51319,6 +56818,49 @@ mana={2}{B}{B} type=Planeswalker subtype=Liliana [/card] +###The 2 cards below should stay together (Flip Card)### +[card] +name=Liliana, Heretical Healer +abilities=lifelink +auto=@movedto(other creature[-token]|graveyard) from(mybattlefield):if this cantargetcard(*[-planeswalker]|mybattlefield) then moveto(exile) and!( transforms((,newability[moveto(ownerbattlefield)],newability[counter(0/0.1.loyalty)])) forever )! +auto=this(counter{0/0.1.loyalty}) flip(Liliana, Defiant Necromancer) +auto=this(counter{0/0.1.loyalty}) choice token(Zombie,Creature Zombie,2/2,black) controller +text=Lifelink -- Whenever another nontoken creature you control dies, exile Liliana, Heretical Healer, then return her to the battlefield transformed under her owner's control. If you do, put a 2/2 black Zombie creature token onto the battlefield. +mana={1}{B}{B} +type=Legendary Creature +subtype=Human Cleric +power=2 +toughness=3 +[/card] +[card] +name=Liliana, Defiant Necromancer +auto=counter(0/0,3,loyalty) +auto=if cantargetcard(planeswalker[counter{0/0.4.loyalty}]) then counter(0/0,-1,loyalty) +auto={C(0/0,2,Loyalty)}:name(+2: Each Player Discard) transforms((,newability[ability$!name(discard) notatarget(*|myhand) reject!$ controller],newability[ability$!name(discard) notatarget(*|myhand) reject!$ opponent])) ueot +auto={C(0/0,-0,Loyalty)}:name(X=0) moveto(mybattlefield) target(creature[-legendary&manacost=0]|mygraveyard) restriction{type(creature[-legendary&manacost=0]|mygraveyard)~morethan~0} +auto={C(0/0,-1,Loyalty)}:name(X=1) moveto(mybattlefield) target(creature[-legendary&manacost=1]|mygraveyard) restriction{type(creature[-legendary&manacost=1]|mygraveyard)~morethan~0} +auto={C(0/0,-2,Loyalty)}:name(X=2) moveto(mybattlefield) target(creature[-legendary&manacost=2]|mygraveyard) restriction{type(creature[-legendary&manacost=2]|mygraveyard)~morethan~0} +auto={C(0/0,-3,Loyalty)}:name(X=3) moveto(mybattlefield) target(creature[-legendary&manacost=3]|mygraveyard) restriction{type(creature[-legendary&manacost=3]|mygraveyard)~morethan~0} +auto={C(0/0,-4,Loyalty)}:name(X=4) moveto(mybattlefield) target(creature[-legendary&manacost=4]|mygraveyard) restriction{type(creature[-legendary&manacost=4]|mygraveyard)~morethan~0} +auto={C(0/0,-5,Loyalty)}:name(X=5) moveto(mybattlefield) target(creature[-legendary&manacost=5]|mygraveyard) restriction{type(creature[-legendary&manacost=5]|mygraveyard)~morethan~0} +auto={C(0/0,-6,Loyalty)}:name(X=6) moveto(mybattlefield) target(creature[-legendary&manacost=6]|mygraveyard) restriction{type(creature[-legendary&manacost=6]|mygraveyard)~morethan~0} +auto={C(0/0,-7,Loyalty)}:name(X=7) moveto(mybattlefield) target(creature[-legendary&manacost=7]|mygraveyard) restriction{type(creature[-legendary&manacost=7]|mygraveyard)~morethan~0} +auto={C(0/0,-8,Loyalty)}:name(X=8) moveto(mybattlefield) target(creature[-legendary&manacost=8]|mygraveyard) restriction{type(creature[-legendary&manacost=8]|mygraveyard)~morethan~0} +auto={C(0/0,-9,Loyalty)}:name(X=9) moveto(mybattlefield) target(creature[-legendary&manacost=9]|mygraveyard) restriction{type(creature[-legendary&manacost=9]|mygraveyard)~morethan~0} +auto={C(0/0,-10,Loyalty)}:name(X=10) moveto(mybattlefield) target(creature[-legendary&manacost=10]|mygraveyard) restriction{type(creature[-legendary&manacost=10]|mygraveyard)~morethan~0} +auto={C(0/0,-11,Loyalty)}:name(X=11) moveto(mybattlefield) target(creature[-legendary&manacost=11]|mygraveyard) restriction{type(creature[-legendary&manacost=11]|mygraveyard)~morethan~0} +auto={C(0/0,-12,Loyalty)}:name(X=12) moveto(mybattlefield) target(creature[-legendary&manacost=12]|mygraveyard) restriction{type(creature[-legendary&manacost=12]|mygraveyard)~morethan~0} +auto={C(0/0,-13,Loyalty)}:name(X=13) moveto(mybattlefield) target(creature[-legendary&manacost=13]|mygraveyard) restriction{type(creature[-legendary&manacost=13]|mygraveyard)~morethan~0} +auto={C(0/0,-14,Loyalty)}:name(X=14) moveto(mybattlefield) target(creature[-legendary&manacost=14]|mygraveyard) restriction{type(creature[-legendary&manacost=14]|mygraveyard)~morethan~0} +auto={C(0/0,-15,Loyalty)}:name(X=15) moveto(mybattlefield) target(creature[-legendary&manacost=15]|mygraveyard) restriction{type(creature[-legendary&manacost=15]|mygraveyard)~morethan~0} +auto={C(0/0,-16,Loyalty)}:name(X=16) moveto(mybattlefield) target(creature[-legendary&manacost=16]|mygraveyard) restriction{type(creature[-legendary&manacost=16]|mygraveyard)~morethan~0} +auto={C(0/0,-8,Loyalty)}:name(-8: emblem) emblem transforms((,newability[@movedTo(creature|mygraveyard) from(battlefield):all(trigger[to]) phaseaction[endofturn once] moveTo(mybattlefield)],newability[@movedTo(creature|opponentgraveyard) from(battlefield):all(trigger[to]) phaseaction[endofturn once] moveTo(opponentbattlefield)])) forever dontremove +text=+2: Each player discards a card. -- -X: Return target nonlegendary creature card with converted mana cost X from your graveyard to the battlefield. -- -8: You get an emblem with "Whenever a creature dies, return it to the battlefield under your control at the beginning of the next end step." +color=black +type=Planeswalker +subtype=Liliana +[/card] +###The 2 cards above should stay together (Flip Card)### [card] name=Liliana's Caress auto=@discarded(*|opponenthand):life:-2 opponent @@ -51327,6 +56869,28 @@ mana={1}{B} type=Enchantment [/card] [card] +name=Liliana's Reaver +abilities=deathtouch +auto=@combatdamaged(player) from(this):token(-370740) +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. +mana={2}{B}{B} +type=Creature +subtype=Zombie +power=4 +toughness=3 +[/card] +[card] +name=Liliana's Reaver Zombie +type=Creature +subtype=Zombie +auto=tap +power=2 +toughness=2 +color=black +[/card] +[card] name=Liliana's Shade auto=name(fetch) may moveTo(myhand) target(swamp|mylibrary) auto={B}:1/1 @@ -51513,6 +57077,15 @@ power=7 toughness=7 [/card] [card] +name=Liturgy of Blood +target=creature +auto=destroy +auto=add{B}{B}{B} +text=Destroy target creature. Add {B}{B}{B} to your mana pool. +mana={3}{B}{B} +type=Sorcery +[/card] +[card] name=Living Airship abilities=flying auto={2}{G}:regenerate @@ -51533,7 +57106,7 @@ type=Artifact [card] name=Living Artifact target=artifact -auto=@damaged(controller):all(this) counter(0/0,thatmuch,vitality) +auto=@damageof(player):all(this) counter(0/0,thatmuch,vitality) auto={c(0/0,-1,vitality)}:life:1 controller limit:1 myupkeeponly text=Enchant artifact -- Whenever you're dealt damage, put that many vitality counters on Living Artifact. -- At the beginning of your upkeep, you may remove a vitality counter from Living Artifact. If you do, you gain 1 life. mana={g} @@ -51853,7 +57426,7 @@ toughness=2 [/card] [card] name=Locust Miser -auto=@each opponent cleanup:name(check handsize) ability$!choice name(reduce handsize) reject notatarget(<2>*|myhand)!$ opponent +auto=hmodifer:-2 opponent text=Each opponent's maximum hand size is reduced by two. mana={2}{B}{B} type=Creature @@ -51883,7 +57456,7 @@ type=Artifact [/card] [card] name=Lodestone Golem -auto=lord(*[-artifact]|hand) altercost(colorless,+1) +auto=lord(*[-artifact]|hand,library,graveyard,exile) altercost(colorless,+1) text=Nonartifact spells cost {1} more to cast. mana={4} type=Artifact Creature @@ -51942,13 +57515,24 @@ toughness=2 [/card] [card] name=Long-Forgotten Gohei -auto=lord(arcane|myhand) altercost(colorless,-1) +auto=lord(arcane|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto=lord(spirit|myBattlefield) 1/1 text=Arcane spells you cast cost {1} less to cast. -- Spirit creatures you control get +1/+1. mana={3} type=Artifact [/card] [card] +name=Longshot Squad +auto={1}{G}{T}:counter(1/1,1) asSorcery +auto=lord(creature[counter{1/1.1}]|myBattlefield) reach +text=Outlast {1}{G} ({1}{G}, {T}: Put a +1/+1 counter on this creature. Outlast only as a sorcery.) -- Each creature you control with a +1/+1 counter on it has reach. +mana={3}{G} +type=Creature +subtype=Hound Archer +power=3 +toughness=3 +[/card] +[card] name=Looming Hoverguard abilities=flying auto=moveTo(ownerLibrary) target(artifact) @@ -51972,8 +57556,7 @@ toughness=1 [card] name=Looter il-Kor abilities=shadow -auto=@damaged(opponent) from(this):reject target(*|myHand) -auto=@damaged(opponent) from(this):draw:1 controller +auto=@damagefoeof(player) from(this):draw:1 && transforms((,newability[target(*|myhand) reject])) ueot text=Shadow (This creature can block or be blocked by only creatures with shadow.) -- Whenever Looter il-Kor deals damage to an opponent, draw a card, then discard a card. mana={1}{U} type=Creature @@ -52006,7 +57589,8 @@ toughness=2 [/card] [card] name=Lord of Extinction -auto=foreach(*|graveyard) 1/1 +alias=1111 +anyzone=type:*:graveyard/type:*:graveyard cdaactive text=Lord of Extinction's power and toughness are each equal to the number of cards in all graveyards. mana={3}{B}{G} type=Creature @@ -52085,7 +57669,7 @@ toughness=2 [/card] [card] name=Lorescale Coatl -auto=@drawn(controller):may counter(1/1,1) +auto=@drawof(player):may counter(1/1,1) text=Whenever you draw a card, you may put a +1/+1 counter on Lorescale Coatl. mana={1}{G}{U} type=Creature @@ -52133,6 +57717,17 @@ power=1+* toughness=1+* [/card] [card] +name=Lotus Path Djinn +abilities=flying +auto=@movedTo(*[-creature]|mystack):1/1 ueot +text=Flying. -- Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) +mana={3}{U} +type=Creature +subtype=Djinn Monk +power=2 +toughness=3 +[/card] +[card] name=Lost Soul abilities=swampwalk text=Swampwalk @@ -52227,6 +57822,17 @@ text=If Lotus Vale would enter the battlefield, sacrifice two untapped lands ins type=Land [/card] [card] +name=Lotus-Eye Mystics +auto=@movedTo(*[-creature]|mystack):1/1 ueot +auto=choice moveTo(myhand) target(enchantment|mygraveyard) +text=Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) -- When Lotus-Eye Mystics enters the battlefield, return target enchantment card from your graveyard to your hand. +mana={3}{W} +type=Creature +subtype=Human Monk +power=3 +toughness=2 +[/card] +[card] name=Lovisa Coldeyes auto=lord(warrior,berserker,other barbarian) 2/2 auto=lord(warrior,berserker,other barbarian) haste @@ -52483,7 +58089,7 @@ toughness=2 [card] name=Lu Xun, Scholar General abilities=horsemanship -auto=@damaged(opponent) from(this):may draw:1 controller +auto=@damagefoeof(player) from(this):may draw:1 controller text=Horsemanship (This creature can't be blocked except by creatures with horsemanship.) -- Whenever Lu Xun, Scholar General deals damage to an opponent, you may draw a card. mana={2}{U}{U} type=Legendary Creature @@ -52719,6 +58325,7 @@ type=Instant [/card] [card] name=Lurebound Scarecrow +alias=1000 auto=chooseacolor aslongas(*[chosencolor]|myBattlefield) sacrifice <1 chooseend text=As Lurebound Scarecrow enters the battlefield, choose a color. -- When you control no permanents of the chosen color, sacrifice Lurebound Scarecrow. mana={3} @@ -52949,7 +58556,7 @@ subtype=Mountain name=Maddening Wind target=creature auto=@each targetcontroller upkeep:damage:2 targetController -auto=cumulativeupcost[{G}] sacrifice +auto=cumulativeupcostmulti[{G}] sacrifice all(this) text=Enchant creature -- Cumulative upkeep {G} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.) -- At the beginning of the upkeep of enchanted creature's controller, Maddening Wind deals 2 damage to that player. mana={2}{G} type=Enchantment @@ -52968,7 +58575,7 @@ toughness=4 [card] name=Maelstrom Archangel abilities=flying -auto=@combatdamaged(player) from(this):may target(*[-land]|myhand) castcard(normal) +auto=@combatdamaged(player) from(this):may target(*[-land]|myhand) castcard(restricted) text=Flying -- Whenever Maelstrom Archangel deals combat damage to a player, you may cast a nonland card from your hand without paying its mana cost. mana={W}{U}{B}{R}{G} type=Creature @@ -53077,6 +58684,51 @@ type=Enchantment subtype=Aura [/card] [card] +name=Mage-Ring Bully +abilities=mustattack +auto=@movedTo(*[-creature]|mystack):1/1 ueot +text=Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) -- Mage-Ring Bully attacks each turn if able. +mana={1}{R} +type=Creature +subtype=Human Warrior +power=2 +toughness=2 +[/card] +[card] +name=Mage-Ring Network +auto={T}:add{1} +auto={1}{T}:counter(0/0,1,Storage) +auto={T}{C(0/0,-1,Storage)}:name(Remove 1 Counters) add{B} +auto={T}{C(0/0,-2,Storage)}:name(Remove 2 Counters) add{B}{B} +auto={T}{C(0/0,-3,Storage)}:name(Remove 3 Counters) add{B}{B}{B} +auto={T}{C(0/0,-4,Storage)}:name(Remove 4 Counters) add{B}{B}{B}{B} +auto={T}{C(0/0,-5,Storage)}:name(Remove 5 Counters) add{B}{B}{B}{B}{B} +auto={T}{C(0/0,-6,Storage)}:name(Remove 6 Counters) add{B}{B}{B}{B}{B}{B} +auto={T}{C(0/0,-7,Storage)}:name(Remove 7 Counters) add{B}{B}{B}{B}{B}{B}{B} +auto={T}{C(0/0,-8,Storage)}:name(Remove 8 Counters) add{B}{B}{B}{B}{B}{B}{B}{B} +auto={T}{C(0/0,-9,Storage)}:name(Remove 9 Counters) add{B}{B}{B}{B}{B}{B}{B}{B}{B} +auto={T}{C(0/0,-10,Storage)}:name(Remove 10 Counters) add{B}{B}{B}{B}{B}{B}{B}{B}{B}{B} +auto={T}{C(0/0,-11,Storage)}:name(Remove 11 Counters) add{B}{B}{B}{B}{B}{B}{B}{B}{B}{B}{B} +auto={T}{C(0/0,-12,Storage)}:name(Remove 12 Counters) add{B}{B}{B}{B}{B}{B}{B}{B}{B}{B}{B}{B} +auto={T}{C(0/0,-13,Storage)}:name(Remove 13 Counters) add{B}{B}{B}{B}{B}{B}{B}{B}{B}{B}{B}{B}{B} +auto={T}{C(0/0,-14,Storage)}:name(Remove 14 Counters) add{B}{B}{B}{B}{B}{B}{B}{B}{B}{B}{B}{B}{B}{B} +auto={T}{C(0/0,-15,Storage)}:name(Remove 15 Counters) add{B}{B}{B}{B}{B}{B}{B}{B}{B}{B}{B}{B}{B}{B}{B} +text={T}: Add {1} to your mana pool. -- {1}, {T}: Put a storage counter on Mage-Ring Network. -- {T}, Remove X storage counters from Mage-Ring Network: Add {X} to your mana pool. +type=Land +[/card] +[card] +name=Mage-Ring Responder +abilities=doesnotuntap +auto={7}:untap +auto=@combat(attacking) source(this):damage:7 target(creature|opponentbattlefield) +text=Mage-Ring Responder doesn't untap during your untap step. -- {7}: Untap Mage-Ring Responder. -- Whenever Mage-Ring Responder attacks, it deals 7 damage to target creature defending player controls. +mana={7} +type=Artifact Creature +subtype=Golem +power=7 +toughness=7 +[/card] +[card] name=Maggot Carrier auto=life:-1 controller auto=life:-1 opponent @@ -53208,14 +58860,11 @@ power=0 toughness=0 [/card] [card] -name=Magmaw -auto={1}{S(*[-land]|myBattlefield)}:damage:1 target(creature,player) -text={1}, Sacrifice a nonland permanent: Magmaw deals 1 damage to target creature or player. -mana={3}{R}{R} -type=Creature -subtype=Elemental -power=4 -toughness=4 +name=Magmatic Chasm +auto=all(creature[-flying]|battlefield) cantblock ueot +text=Creatures without flying can't block this turn. +mana={1}{R} +type=Sorcery [/card] [card] name=Magmatic Force @@ -53228,6 +58877,23 @@ power=7 toughness=7 [/card] [card] +name=Magmatic Insight +auto=draw:2 controller +text=As an additional cost to cast Magmatic Insight, discard a land card. -- Draw two cards. +mana={R}{discard(land|myhand)} +type=Sorcery +[/card] +[card] +name=Magmaw +auto={1}{S(*[-land]|myBattlefield)}:damage:1 target(creature,player) +text={1}, Sacrifice a nonland permanent: Magmaw deals 1 damage to target creature or player. +mana={3}{R}{R} +type=Creature +subtype=Elemental +power=4 +toughness=4 +[/card] +[card] name=Magmaquake auto=damage:X all(creature[-flying]) auto=damage:X all(planeswalker) @@ -53260,7 +58926,7 @@ type=Enchantment [card] name=Magnetic Theft target=equipment -auto=transforms((,newability[retarget target(creature)])) forever +auto=transforms((,newability[rehook target(creature)])) forever text=Attach target Equipment to target creature. (Control of the Equipment doesn't change.) mana={R} type=Instant @@ -53288,8 +58954,9 @@ toughness=6 [/card] [card] name=Magnivore +alias=1111 abilities=haste -auto=foreach(sorcery|graveyard) 1/1 +anyzone=type:sorcery:graveyard/type:sorcery:graveyard cdaactive text=Haste (This creature can attack the turn it comes under your control.) -- Magnivore's power and toughness are each equal to the number of sorcery cards in all graveyards. mana={2}{R}{R} type=Creature @@ -53376,7 +59043,7 @@ toughness=4 [/card] [card] name=Magus of the Jar -auto={T}{S}:name(hand blink) all(*|hand) transforms((,newability[moveto(exile)],newability[phaseaction[endofturn once] reject all(*|hand)],newability[phaseaction[endofturn once] moveTo(ownerhand)])) && draw:7 all(player) +auto={T}{S}:name(hand blink) all(*|hand) transforms((,newability[moveto(exile)],newability[phaseaction[endofturn once checkex] moveto(ownerhand)])) && ability$!draw:7 all(player) _ phaseaction[endofturn once] reject all(*|hand)!$ controller text={T}, Sacrifice Magus of the Jar: Each player exiles all cards from his or her hand face down and draws seven cards. At the beginning of the next end step, each player discards his or her hand and returns to his or her hand each card he or she exiled this way. mana={3}{U}{U} type=Creature @@ -53567,6 +59234,16 @@ power=4 toughness=4 [/card] [card] +name=Malakir Cullblade +auto=@movedto(creature|graveyard) from(opponentbattlefield):choice counter(1/1) +text=Whenever a creature an opponent controls dies, put a +1/+1 counter on Malakir Cullblade. +mana={1}{B} +type=Creature +subtype=Vampire Warrior +power=1 +toughness=1 +[/card] +[card] name=Malevolent Awakening auto={1}{B}{B}{S(creature|myBattlefield)}:moveTo(myhand) target(creature|mygraveyard) text={1}{B}{B}, Sacrifice a creature: Return target creature card from your graveyard to your hand. @@ -53661,6 +59338,16 @@ type=Enchantment subtype=Aura [/card] [card] +name=Mana Confluence +auto={L}{T}:Add{W} +auto={L}{T}:Add{U} +auto={L}{T}:Add{B} +auto={L}{T}:Add{R} +auto={L}{T}:Add{G} +text={T}, Pay 1 life: Add one mana of any color to your mana pool. +type=Land +[/card] +[card] name=Mana Crypt auto={T}:Add{2} auto=@each my upkeep:flipacoin loseability damage:3 controller loseabilityend flipend @@ -53703,8 +59390,8 @@ type=Instant [/card] [card] name=Mana Matrix -auto=lord(instant|myhand) altercost(colorless,-2) -auto=lord(enchantment|myhand) altercost(colorless,-2) +auto=lord(instant|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) +auto=lord(enchantment|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) text=Instant and enchantment spells you cast cost up to {2} less to cast. mana={6} type=Artifact @@ -53747,8 +59434,8 @@ type=Instant [card] name=Mana Skimmer abilities=flying -auto=@damaged(opponent) from(this):frozen target(land|opponentbattlefield) -auto=@damaged(controller) from(this):frozen target(land|mybattlefield) +auto=@damagefoeof(player) from(this):frozen target(land|opponentbattlefield) +auto=@damageof(player) from(this):frozen target(land|mybattlefield) text=Flying -- Whenever Mana Skimmer deals damage to a player, tap target land that player controls. That land doesn't untap during its controller's next untap step. mana={3}{B} type=Creature @@ -53798,25 +59485,6 @@ mana={G} type=Enchantment [/card] [card] -name=Manalith -auto={T}:Add{W} -auto={T}:Add{U} -auto={T}:Add{B} -auto={T}:Add{R} -auto={T}:Add{G} -text={T}: Add one mana of any color to your mana pool. -mana={3} -type=Artifact -[/card] -[card] -name=Manamorphose -auto=name(add mana) ability$! choice add{G} _ choice add{R} _ choice add{U} _ choice add{B} _ choice add{W} !$ controller && ability$! choice add{G} _ choice add{R} _ choice add{U} _ choice add{B} _ choice add{W} !$ controller -auto=draw:1 controller -text=Add two mana in any combination of colors to your mana pool. -- Draw a card. -mana={1}{RG} -type=Instant -[/card] -[card] name=Manacles of Decay target=creature auto=cantattack @@ -53851,6 +59519,17 @@ power=1 toughness=1 [/card] [card] +name=Managorger Hydra +abilities=trample +auto=@movedto(*|stack):choice counter(1/1) +text=Trample (This creature can deal excess combat damage to defending player or planeswalker while attacking.) -- Whenever a player casts a spell, put a +1/+1 counter on Managorger Hydra. +mana={2}{G} +type=Creature +subtype=Hydra +power=1 +toughness=1 +[/card] +[card] name=Manakin auto={T}:Add{1} text={T}: Add {1} to your mana pool. @@ -53861,6 +59540,25 @@ power=1 toughness=1 [/card] [card] +name=Manalith +auto={T}:Add{W} +auto={T}:Add{U} +auto={T}:Add{B} +auto={T}:Add{R} +auto={T}:Add{G} +text={T}: Add one mana of any color to your mana pool. +mana={3} +type=Artifact +[/card] +[card] +name=Manamorphose +auto=name(add mana) ability$! choice add{G} _ choice add{R} _ choice add{U} _ choice add{B} _ choice add{W} !$ controller && ability$! choice add{G} _ choice add{R} _ choice add{U} _ choice add{B} _ choice add{W} !$ controller +auto=draw:1 controller +text=Add two mana in any combination of colors to your mana pool. -- Draw a card. +mana={1}{RG} +type=Instant +[/card] +[card] name=Manaplasm auto=@movedTo(*[manacost=1]|mystack):1/1 ueot auto=@movedTo(*[manacost=2]|mystack):2/2 ueot @@ -53886,6 +59584,16 @@ power=1 toughness=1 [/card] [card] +name=Manaweft Sliver +auto=lord(sliver|mybattlefield) transforms((,newability[{t}:add{g}],newability[{t}:add{r}],newability[{t}:add{u}],newability[{t}:add{b}],newability[{t}:add{w}])) +text=Sliver creatures you control have "{T}: Add one mana of any color to your mana pool." +mana={1}{G} +type=Creature +subtype=Sliver +power=1 +toughness=1 +[/card] +[card] name=Mangara of Corondor auto={T}:moveTo(exile) all(this) && moveTo(exile) target(*) text={T}: Exile Mangara of Corondor and target permanent. @@ -53898,8 +59606,8 @@ toughness=1 [card] name=Mangara's Equity auto=upcost[{1}{W}] sacrifice -auto=choice name(choose black) transforms((,newability[@damaged(controller) from(creature[black]|*):damage:thatmuch all(trigger[from])],newability[@damaged(creature[white]|mybattlefield) from(creature[black]|*):damage:thatmuch all(trigger[from])])) forever -auto=choice name(choose red) transforms((,newability[@damaged(controller) from(creature[red]|*):damage:thatmuch all(trigger[from])],newability[@damaged(creature[white]|mybattlefield) from(creature[red]|*):damage:thatmuch all(trigger[from])])) forever +auto=choice name(choose black) transforms((,newability[@damageof(player) from(creature[black]|*):damage:thatmuch all(trigger[from])],newability[@damaged(creature[white]|mybattlefield) from(creature[black]|*):damage:thatmuch all(trigger[from])])) forever +auto=choice name(choose red) transforms((,newability[@damageof(player) from(creature[red]|*):damage:thatmuch all(trigger[from])],newability[@damaged(creature[white]|mybattlefield) from(creature[red]|*):damage:thatmuch all(trigger[from])])) forever text=As Mangara's Equity enters the battlefield, choose black or red. -- At the beginning of your upkeep, sacrifice Mangara's Equity unless you pay {1}{W}. -- Whenever a creature of the chosen color deals damage to you or a white creature you control, Mangara's Equity deals that much damage to that creature. mana={1}{W}{W} type=Enchantment @@ -53996,6 +59704,16 @@ power=3 toughness=3 [/card] [card] +name=Mantis Rider +abilities=flying,vigilance,haste +text=Flying,vigilance,haste +mana={U}{R}{W} +type=Creature +subtype=Human Monk +power=3 +toughness=3 +[/card] +[card] name=Mantle of Leadership abilities=flash target=Creature @@ -54006,6 +59724,37 @@ type=Enchantment subtype=Aura [/card] [card] +name=Mantle of Webs +target=creature +auto=teach(creature) 1/3 +auto=teach(creature) reach +text=Enchant creature -- Enchanted creature gets +1/+3 and has reach. (It can block creatures with flying.) +mana={1}{G} +type=Enchantment +subtype=Aura +[/card] +[card] +name=Map the Wastes +auto=moveTo(myBattlefield) and!(tap)! notatarget(land[basic]|myLibrary) +auto=ability$!name(Bolster) notatarget(creature[toughness=toughness:lowest:creature:mybattlefield]|mybattlefield) counter(1/1,1)!$ controller +text=Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. -- Bolster 1. (Choose a creature with the least toughness among creatures you control and put a +1/+1 counter on it.) +mana={2}{G} +type=Sorcery +[/card] +[card] +name=Marang River Skeleton +facedown={3} +autofacedown={3}{B}:morph +autofaceup=counter(1/1,1) +auto={B}:regenerate +text={B}: Regenerate Marang River Skeleton. -- Megamorph {3}{B} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) +mana={1}{B} +type=Creature +subtype=Skeleton +power=1 +toughness=1 +[/card] +[card] name=Marauding Knight abilities=protection from white auto=foreach(Plains|opponentBattlefield) 1/1 @@ -54017,10 +59766,19 @@ power=2 toughness=2 [/card] [card] +name=Marauding Maulhorn +abilities=mustattack +auto=aslongas(Advocate of the Beast|mybattlefield)transforms((,newability[-mustattack])) +text=Maurading Maulhorn attacks each combat if able unless you control a creature named Advocate of the Beast. +mana={2}{R}{R} +type=Creature +subtype=Beast +power=5 +toughness=3 +[/card] +[card] name=Maraxus of Keld -auto=foreach(artifact[-tapped]|myBattlefield) 1/1 -auto=foreach(creature[-tapped]|myBattlefield) 1/1 -auto=foreach(land[-tapped]|myBattlefield) 1/1 +anyzone=type:*[-tapped&-enchantment;-tapped&-planeswalker]/type:*[-tapped&-enchantment;-tapped&-planeswalker] cdaactive text=Maraxus of Keld's power and toughness are each equal to the number of untapped artifacts, creatures, and lands you control. mana={4}{R}{R} type=Legendary Creature @@ -54080,6 +59838,171 @@ type=Enchantment text=Each noncreature artifact is an artifact creature with power and toughness each equal to its converted mana cost. (Equipment that's a creature can't equip a creature.) [/card] [card] +name=Mardu Ascendancy +auto=@combat(attacking) source(creature[-token]|myBattlefield):token(Goblin Token,Creature Goblin,1/1,red,battleready) +auto={S}:all(creature|myBattlefield) 0/3 ueot +text=Enchantment. -- Whenever a nontoken creature you control attacks, put a 1/1 red Goblin creature token onto the battlefield tapped and attacking. -- Sacrifice Mardu Ascendancy: Creatures you control get +0/+3 until end of turn. +mana={R}{W}{B} +type=Enchantment +[/card] +[card] +name=Mardu Banner +auto={T}: Add{R} +auto={T}: Add{W} +auto={T}: Add{B} +auto={R}{W}{B}{T}{S}:draw:1 controller +text={T}: Add {R},{W} or {B} to your mana pool. -- {R}{W}{B}, {T}, Sacrifice Mardu Banner: Draw a card. +mana={3} +type=Artifact +[/card] +[card] +name=Mardu Blazebringer +auto=@combat(attacking) source(this):phaseaction[combatends,sourceinplay] sacrifice +auto=@combat(blocking) source(this):phaseaction[combatends,sourceinplay] sacrifice +text=When Mardu Blazebringer attacks or blocks, sacrifice it at end of combat. +mana={2}{R} +type=Creature +subtype=Ogre Warrior +power=4 +toughness=4 +[/card] +[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(Duress opponent) target(opponent) donothing && all(this) transforms((,newability[if type(*[-creature;-land]|targetedpersonshand)~lessthan~1 then name(look) donothing notatarget(*|targetedpersonshand) else reject notatarget(*[-creature;-land]|targetedpersonshand)])) oneshot +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} +type=Instant +[/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 Hateblade +auto={B}:deathtouch ueot +text={B}: Mardu Hateblade gains deathtouch until end of turn. (Any amount of damage it deals to a creature is enough to destroy it.) +mana={W} +type=Creature +subtype=Human Warrior +power=1 +toughness=1 +[/card] +[card] +name=Mardu Heart-Piercer +auto=if raid then damage:2 target(creature,player) +text=Raid -- When Mardu Heart-Piercer enters the battlefield, if you attacked with a creature this turn, Mardu Heart-Piercer deals 2 damage to target creature or player. +mana={3}{R} +type=Creature +subtype=Human Archer +power=2 +toughness=3 +[/card] +[card] +name=Mardu Hordechief +auto=if raid then token(Warrior,Creature Warrior,1/1,white) +text=Raid - When Mardu Hordechief enters the battlefield, if you attacked with a creature this turn, put a 1/1 white Warrior creature token onto the battlefield. +mana={2}{W} +type=Creature +subtype=Human Warrior +power=2 +toughness=3 +[/card] +[card] +name=Mardu Roughrider +auto=@combat(attacking) source(this):cantblock target(creature) ueot +text=Whenever Mardu Roughrider attacks, target creature can't block this turn. +mana={2}{R}{W}{B} +type=Creature +subtype=Orc Warrior +power=5 +toughness=4 +[/card] +[card] +name=Mardu Runemark +target=creature +auto=2/2 +auto=aslongas(*[white;black]|mybattlefield):teach(creature) first strike +text=Enchant creature. -- Enchanted creature gets +2/+2. -- Enchanted creature has first strike as long as you control a white or black permanent. +mana={2}{R} +type=Enchantment +subtype=Aura +[/card] +[card] +name=Mardu Scout +other={1}{R} name(Dash) +auto=if paid(alternative) then transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveto(ownerhand) all(this)])) forever +text=Dash {1}{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={R}{R} +type=Creature +subtype=Goblin Scout +power=3 +toughness=1 +[/card] +[card] +name=Mardu Shadowspear +auto=@combat(attacking) source(this):life:-1 opponent +other={1}{B} name(Dash) +auto=if paid(alternative) then transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveto(ownerhand) all(this)])) forever +text=Whenever Mardu Shadowspear attacks, each opponent loses 1 life. -- Dash {1}{B} (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={B} +type=Creature +subtype=Human Warrior +power=1 +toughness=1 +[/card] +[card] +name=Mardu Skullhunter +auto=tap +auto=if raid then target(opponent) ability$!name(discard) target(*|myhand) reject!$ targetedplayer +text=Mardu Skullhunter enters the battlefield tapped. -- Raid - When Mardu Skullhunter enters the battlefield, if you attacked with a creature this turn, target opponent discards a card. +mana={1}{B} +type=Creature +subtype=Human Warrior +power=2 +toughness=1 +[/card] +[card] +name=Mardu Strike Leader +auto=@combat(attacking) source(this):token(Warrior,Creature Warrior,2/1,black) controller +other={3}{B} name(Dash) +auto=if paid(alternative) then transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveto(ownerhand) all(this)])) forever +text=Whenever Mardu Strike Leader attacks, put a 2/1 black Warrior creature token onto the battlefield. -- Dash {3}{B} (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={2}{B} +type=Creature +subtype=Human Warrior +power=3 +toughness=2 +[/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. +mana={3}{R} +type=Creature +subtype=Orc Shaman +power=3 +toughness=3 +[/card] +[card] +name=Mardu Woe-Reaper +auto=may moveTo(Exile) target(creature|graveyard) && life:1 controller +auto=@movedTo(warrior|myBattlefield):may moveTo(Exile) target(creature|graveyard) && life:1 controller +text=Whenever Mardu Woe-Reaper or another Warrior enters the battlefield under your control, you may exile target creature card from a graveyard. If you do, you gain 1 life. +mana={W} +type=Creature +subtype=Human Warrior +power=2 +toughness=1 +[/card] +[card] name=Marhault Elsdragon auto=rampage(1/1,1) text=Rampage 1 (Whenever this creature becomes blocked, it gets +1/+1 until end of turn for each creature blocking it beyond the first.) @@ -54177,6 +60100,16 @@ type=Enchantment subtype=Aura [/card] [card] +name=Marked by Honor +target=creature +auto=teach(creature) 2/2 +auto=teach(creature) vigilance +text=Enchant creature -- Enchanted creature gets +2/+2 and has vigilance. (Attacking doesn't cause it to tap.) +mana={3}{W} +type=Enchantment +subtype=Aura +[/card] +[card] name=Marker Beetles auto=@movedTo(this|graveyard) from(battlefield):1/1 target(creature|battlefield) ueot auto={S}:draw:1 @@ -54187,10 +60120,20 @@ subtype=Insect power=2 toughness=3 [/card] +#tappedformana stack...produceextra:selectmana don't support combination of mana at the moment since it a mayability not a menuability +[card] +name=Market Festival +target=land +auto=teach(land) transforms((,newability[@tappedformana(this):chooseacolor add{chosencolor} chooseend],newability[@tappedformana(this):chooseacolor add{chosencolor} chooseend])) +text=Whenever enchanted land is tapped for mana, its controller adds two mana in any combination of colors to his or her mana pool (in addition to the mana the land produces). +mana={3}{G} +type=Enchantment +subtype=Aura +[/card] [card] name=Markov Blademaster abilities=double strike -auto=@combatdamaged(opponent) from(this):counter(1/1,1) +auto=@combatdamaged(player) from(this):counter(1/1,1) text=Double strike -- Whenever Markov Blademaster deals combat damage to a player, put a +1/+1 counter on it. mana={1}{R}{R} type=Creature @@ -54221,7 +60164,7 @@ toughness=4 [/card] [card] name=Maro -auto=foreach(*|myhand) 1/1 +anyzone=type:*:myhand/type:*:myhand cdaactive text=Maro's power and toughness are each equal to the number of cards in your hand. mana={2}{G}{G} type=Creature @@ -54312,6 +60255,14 @@ power=3 toughness=3 [/card] [card] +name=March of the Returned +target=creature|mygraveyard +auto=moveTo(ownerhand) +text=Return up to two target creature cards from your graveyard to your hand. +mana={3}{B} +type=Sorcery +[/card] +[card] name=Marsh Boa abilities=swampwalk text=Swampwalk @@ -54377,6 +60328,18 @@ power=1 toughness=1 [/card] [card] +name=Marsh Hulk +facedown={3} +autofacedown={6}{B}:morph +autofaceup=counter(1/1,1) +text=Megamorph {6}{B} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) +mana={4}{B}{B} +type=Creature +subtype=Zombie Ogre +power=4 +toughness=6 +[/card] +[card] name=Marsh Lurker auto={S(swamp|myBattlefield)}:fear text=Sacrifice a Swamp: Marsh Lurker gains fear until end of turn. (It can't be blocked except by artifact creatures and/or black creatures.) @@ -54444,6 +60407,16 @@ power=4 toughness=3 [/card] [card] +name=Marshmist Titan +autohand=affinity(type:manaB) reduce({1}) +text=Marshmist Titan costs {X} less to cast, where X is your devotion to black. (Each {B} in the mana costs of permanents you control counts toward your devotion to black.) +mana={6}{B} +type=Creature +subtype=Giant +power=4 +toughness=5 +[/card] +[card] name=Martial Coup auto=this(X>=5) destroy all(creature) auto=token(Soldier,creature soldier,1/1,white) *X @@ -54544,7 +60517,7 @@ subtype=Aura [/card] [card] name=Mask of Memory -auto=@damaged(opponent) from(mytgt):may draw:2 controller && reject target(*|myhand) +auto=@damaged(player) from(mytgt):may draw:2 controller && reject target(*|myhand) text=Whenever equipped creature deals combat damage to a player, you may draw two cards. If you do, discard a card. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery. This card enters the battlefield unattached and stays on the battlefield if the creature leaves.) auto={1}:equip mana={2} @@ -54712,9 +60685,19 @@ power=1 toughness=4 [/card] [card] +name=Master of Diversion +auto=@combat(attacking) source(this):tap target(creature|opponentbattlefield) +text=Whenever Master of Diversionl attacks, tap target creature defending player controls. +mana={2}{W} +type=Creature +subtype=Human Scout +power=2 +toughness=2 +[/card] +[card] name=Master of Etherium auto=lord(other creature[artifact]|mybattlefield) 1/1 -auto=foreach(artifact|mybattlefield) 1/1 +anyzone=type:artifact:mybattlefield/type:artifact:mybattlefield cdaactive text=Master of Etherium's power and toughness are each equal to the number of artifacts you control. -- Other artifact creatures you control get +1/+1. mana={2}{U} type=Artifact Creature @@ -54723,6 +60706,29 @@ power=* toughness=* [/card] [card] +name=Master of Pearls +facedown={3} +autofacedown={3}{W}{W}:morph +autofaceup=all(creature|myBattlefield) 2/2 ueot +text=Morph {3}{W}{W} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) -- When Master of Pearls is turned face up, creatures you control get +2/+2 until end of turn. +mana={1}{W} +type=Creature +subtype=Human Monk +power=2 +toughness=2 +[/card] +[card] +name=Master of the Feast +abilities=flying +auto=@each my upkeep:draw:1 opponent +text=Flying -- At the beginning of your upkeep, each opponent draws a card. +mana={1}{B}{B} +type=Enchantment Creature +subtype=Demon +power=5 +toughness=5 +[/card] +[card] name=Master of the Pearl Trident auto=lord(other merfolk|mybattlefield) 1/1 auto=lord(other merfolk|mybattlefield) islandwalk @@ -54734,6 +60740,15 @@ power=2 toughness=2 [/card] [card] +name=Master the Way +target=creature,player +auto=draw:1 controller +auto=damage:phandcount +text=Draw a card. -- Master the Way deals damage to target creature or player equal to the number of cards in your hand. +mana={3}{U}{R} +type=Sorcery +[/card] +[card] name=Master of Waves abilities=protection from red auto=lord(Elemental|mybattlefield) 1/1 @@ -54787,7 +60802,7 @@ toughness=4 [/card] [card] name=Masumaro, First to Live -auto=foreach(*|myhand) 2/2 +anyzone=twicetype:*:myhand/twicetype:*:myhand cdaactive text=Masumaro, First to Live's power and toughness are each equal to twice the number of cards in your hand. mana={3}{G}{G}{G} type=Legendary Creature @@ -54797,11 +60812,7 @@ toughness=* [/card] [card] name=Matca Rioters -auto=aslongas(forest|myBattlefield) 1/1 -auto=aslongas(island|myBattlefield) 1/1 -auto=aslongas(plains|myBattlefield) 1/1 -auto=aslongas(mountain|myBattlefield) 1/1 -auto=aslongas(swamp|myBattlefield) 1/1 +anyzone=pbasiclandtypes/pbasiclandtypes cdaactive text=Domain - Matca Rioters's power and toughness are each equal to the number of basic land types among lands you control. mana={2}{G} type=Creature @@ -55050,6 +61061,16 @@ mana={2}{U} type=Instant [/card] [card] +name=Megantic Sliver +auto=lord(sliver|mybattlefield) 3/3 +text=All Sliver creatures you control get +3/+3. +mana={5}{G} +type=Creature +subtype=Sliver +power=3 +toughness=3 +[/card] +[card] name=Megatherium abilities=trample auto=if compare(phandcount)~equalto~1 then transforms((,newability[pay[[{1}]] name(pay 1 mana) donothing?sacrifice])) forever @@ -55224,15 +61245,23 @@ type=Enchantment [/card] [card] name=Memory Jar -auto={T}{S}:name(hand blink) all(*|hand) transforms((,newability[moveto(exile)],newability[phaseaction[endofturn once] reject all(*|hand)],newability[phaseaction[endofturn once] moveTo(ownerhand)])) && draw:7 all(player) +auto={T}{S}:name(hand blink) all(*|hand) transforms((,newability[moveto(exile)],newability[phaseaction[endofturn once checkex] moveto(ownerhand)])) && ability$!draw:7 all(player) _ phaseaction[endofturn once] reject all(*|hand)!$ controller text={T}, Sacrifice Memory Jar: Each player exiles all cards from his or her hand face down and draws seven cards. At the beginning of the next end step, each player discards his or her hand and returns to his or her hand each card he or she exiled this way. mana={5} type=Artifact [/card] [card] +name=Memory Lapse +target=*|stack +auto=fizzleto(librarytop) +text=Counter target spell. If that spell is countered this way, put it on top of its owner's library instead of into that player's graveyard. +mana={1}{U} +type=Instant +[/card] +[card] name=Memory Plunder target=*[instant;sorcery]|opponentgraveyard -auto=castcard(normal) +auto=castcard(restricted) text=You may cast target instant or sorcery card from an opponent's graveyard without paying its mana cost. mana={UB}{UB}{UB}{UB} type=Instant @@ -55324,6 +61353,16 @@ mana={U} type=Instant [/card] [card] +name=Mentor of the Meek +auto=@movedTo(other creature[power<=2]|myBattlefield):pay({1}) draw:1 +text=Whenever another creature with power 2 or less enters the battlefield under your control, you may pay {1}. If you do, draw a card. +mana={2}{W} +type=Creature +subtype=Human Soldier +power=2 +toughness=2 +[/card] +[card] name=Mephidross Vampire abilities=flying auto=@damaged(creature) from(creature|mybattlefield):all(trigger[from]) counter(1/1,1) @@ -55458,6 +61497,17 @@ mana={4}{W}{B} type=Sorcery [/card] [card] +name=Merciless Executioner +auto=sacrifice notatarget(creature|mybattlefield) +auto=ability$! sacrifice notatarget(creature|mybattlefield) !$ opponent +text=When Merciless Executioner enters the battlefield, each player sacrifices a creature. +mana={2}{B} +type=Creature +subtype=Orc Warrior +power=3 +toughness=1 +[/card] +[card] name=Mercy Killing target=creature auto=sacrifice && token(Elf Warrior,Creature Elf Warrior,1/1,green white)*power targetcontroller @@ -55488,6 +61538,17 @@ power=2 toughness=2 [/card] [card] +name=Mercurial Pretender +auto=may copy NotATarget(creature) +auto=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 +subtype=Shapeshifter +power=0 +toughness=0 +[/card] +[card] name=Merfolk Assassin auto={T}:destroy target(creature[islandwalk]) text={T}: Destroy target creature with islandwalk. @@ -55651,6 +61712,17 @@ power=1 toughness=1 [/card] [card] +name=Mer-Ek Nightblade +auto={B}{T}:counter(1/1,1) asSorcery +auto=lord(creature[counter{1/1.1}]|myBattlefield) deathtouch +text=Outlast {B}({B}, {T}: Put a +1/+1 counter on this creature. Outlast only as a sorcery.) -- Each creature you control with a +1/+1 counter on it has dathtouch. +mana={3}{B} +type=Creature +subtype=Orc Assassin +power=2 +toughness=3 +[/card] +[card] name=Mesa Enchantress auto=@movedTo(enchantment|mystack):may draw:1 controller text=Whenever you cast an enchantment spell, you may draw a card. @@ -55698,6 +61770,17 @@ mana={1}{U}{U} type=Enchantment [/card] [card] +name=Messenger Drake +auto=@movedTo(this|graveyard) from(battlefield):draw:1 controller +abilities=flying +text=Flying -- When Messenger Drake dies, draw a card. +mana={3}{U}{U} +type=Creature +subtype=Drake +power=3 +toughness=3 +[/card] +[card] name=Messenger Falcons abilities=flying auto=draw:1 @@ -55709,6 +61792,16 @@ power=2 toughness=2 [/card] [card] +name=Messenger's Speed +target=creature +auto=teach(creature) trample +auto=teach(creature) haste +text=Enchant creature -- Enchanted creature has trample and haste. +mana={R} +type=Enchantment +subtype=Aura +[/card] +[card] name=Metal Fatigue auto=tap all(artifact) text=Tap all artifacts. @@ -55849,6 +61942,18 @@ mana={R}{G} type=Enchantment [/card] [card] +name=Meteorite +auto=damage:2 target(creature,player) +auto={T}:Add{W} +auto={T}:Add{U} +auto={T}:Add{B} +auto={T}:Add{R} +auto={T}:Add{G} +text=When Meteorite enters the battlefield it deals 2 damage to target creature or player. -- {T}: Add one mana of any color to your mana pool. +mana={5} +type=Artifact +[/card] +[card] name=Metropolis Sprite abilities=flying auto={U}:1/-1 ueot @@ -55861,7 +61966,7 @@ toughness=2 [/card] [card] name=Michiko Konda, Truth Seeker -auto=@combatdamaged(controller) from(creature|opponentbattlefield):ability$!name(sacrifice permanent) notatarget(*|mybattlefield) sacrifice!$ opponent +auto=@damageof(player) from(*|opponentstack,opponentbattlefield,opponentgraveyard,opponenthand,opponentexile):ability$!name(sacrifice permanent) notatarget(*|mybattlefield) sacrifice!$ opponent text=Whenever a source an opponent controls deals damage to you, that player sacrifices a permanent. mana={3}{W} type=Legendary Creature @@ -56074,7 +62179,7 @@ name=Mikaeus, the Unhallowed abilities=intimidate auto=lord(other creature[-human]|mybattlefield) 1/1 auto=lord(other creature[-human]|mybattlefield) undying -auto=@damaged(controller) from(human):all(trigger[from]) destroy +auto=@damageof(player) from(human):all(trigger[from]) destroy text=Intimidate -- Whenever a Human deals damage to you, destroy it. -- Other non-Human creatures you control get +1/+1 and have undying. (When a creature with undying dies, if it had no +1/+1 counters on it, return it to the battlefield under its owner's control with a +1/+1 counter on it.) mana={3}{B}{B}{B} type=Legendary Creature @@ -56101,6 +62206,13 @@ power=2 toughness=1 [/card] [card] +name=Military Intelligence +auto=@each my blockers restriction{type(creature[attacking]|myBattlefield)~morethan~1}:draw:1 +text=Whenever you attack with two or more creatures, draw a card. +mana={1}{U} +type=Enchantment +[/card] +[card] name=Militia's Pride auto=@combat(attacking) source(creature[-token]|mybattlefield):pay({W}) token(Kithkin Soldier,Creature Kithkin Soldier,1/1,white,battleready) text=Whenever a nontoken creature you control attacks, you may pay {W}. If you do, put a 1/1 white Kithkin Soldier creature token onto the battlefield tapped and attacking. @@ -56143,6 +62255,17 @@ mana={2}{G} type=Sorcery [/card] [card] +name=Minamo Scrollkeeper +abilities=defender +auto=hmodifer:1 controller +text=Defender (This creature can't attack.) -- Your maximum hand size is increased by one. +mana={1}{U} +type=Creature +subtype=Human Wizard +power=2 +toughness=3 +[/card] +[card] name=Minamo Sightbender auto={X}{T}:target(creature[power <=X]) unblockable text={X}, {T}: Target creature with power X or less is unblockable this turn. @@ -56161,7 +62284,7 @@ type=Legendary Land [/card] [card] name=Mind's Eye -auto=@drawn(opponent):pay({1}) draw:1 +auto=@drawfoeof(player):pay({1}) draw:1 text=Whenever an opponent draws a card, you may pay {1}. If you do, draw a card. mana={5} type=Artifact @@ -56195,7 +62318,7 @@ type=Instant [card] name=Mind Harness target=creature(red;green) -auto=cumulativeupcost[{1}] sacrifice +auto=cumulativeupcostmulti[{1}] sacrifice all(this) text=Enchant red or green creature -- Cumulative upkeep {1} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.) -- You control enchanted creature. mana={U} type=Enchantment @@ -56354,7 +62477,7 @@ toughness=1 [/card] [card] name=Mindclaw Shaman -auto=choice name(target opponent) target(opponent) donothing && all(this) transforms((,newability[if type(*[instant;sorcery]|targetedpersonshand)~lessthan~1 then name(look) donothing notatarget(*|targetedpersonshand) else may castcard(normal) notatarget(*[instant;sorcery]|targetedpersonshand)])) forever +auto=choice name(target opponent) target(opponent) donothing && all(this) transforms((,newability[if type(*[instant;sorcery]|targetedpersonshand)~lessthan~1 then name(look) donothing notatarget(*|targetedpersonshand) else may castcard(restricted) notatarget(*[instant;sorcery]|targetedpersonshand)])) forever text=When Mindclaw Shaman enters the battlefield, target opponent reveals his or her hand. You may cast an instant or sorcery card from it without paying its mana cost. mana={4}{R} type=Creature @@ -56364,7 +62487,7 @@ toughness=2 [/card] [card] name=Mindcrank -auto=@lifeloss(opponent):deplete:thatmuch opponent +auto=@lifelostfoeof(player):deplete:thatmuch opponent text=Whenever an opponent loses life, that player puts that many cards from the top of his or her library into his or her graveyard. (Damage dealt by sources without infect causes loss of life.) mana={2} type=Artifact @@ -56403,7 +62526,8 @@ toughness=1 [card] name=Mindleech Mass abilities=trample -auto=@combatdamaged(player) from(this):may target(*[-land]|opponenthand) castcard(normal) +auto=@combatdamagefoeof(player) from(this):may target(*[-land]|opponenthand) castcard(restricted) +auto=@combatdamageof(player) from(this):may target(*[-land]|myhand) castcard(restricted) text=Trample -- Whenever Mindleech Mass deals combat damage to a player, you may look at that player's hand. If you do, you may cast a nonland card in it without paying that card's mana cost. mana={5}{U}{B}{B} type=Creature @@ -56442,6 +62566,17 @@ mana={4}{R} type=Enchantment [/card] [card] +name=Mindscour Dragon +abilities=flying +auto=@combatdamagefoeof(player) from(this):deplete:4 target(player) +text=Flying -- Whenever Mindscour Dragon deals combat damage to an opponent, target player puts the top 4 cards of his or her library into his or her graveyard. +mana={4}{U}{U} +type=Creature +subtype=Dragon +power=4 +toughness=4 +[/card] +[card] name=Mindslicer auto=@movedto(this|graveyard) from(battlefield):reject all(*|hand) text=When Mindslicer dies, each player discards his or her hand. @@ -56452,6 +62587,18 @@ power=4 toughness=3 [/card] [card] +name=Mindsparker +abilities=first strike +auto=@movedTo(instant[white;blue]|opponentStack):damage:2 opponent +auto=@movedTo(sorcery[white;blue]|opponentStack):damage:2 opponent +text=First strike. -- Whenever an opponent casts a white or blue instant or sorcery spell, Mindsparker deals 2 damage to that player. +mana={1}{R}{R} +type=Creature +subtype=Elemental +power=3 +toughness=2 +[/card] +[card] name=Mindstab auto=target(player) ability$!name(discard 3 cards) target(<3>*|myhand) reject!$ targetedplayer suspend(4)={b} @@ -56486,6 +62633,15 @@ mana={3} type=Artifact [/card] [card] +name=Mindswipe +target=*|stack +auto=transforms((,newability[pay[[{value:storedx}]] name(pay {value} mana) donothing?fizzle])) forever +auto=damage:x targetcontroller +text=Counter target spell unless its controller pays {X}. Mindswipe deals X damage to that spell's controller. +mana={X}{U}{R} +type=Instant +[/card] +[card] name=Mindwarper auto=counter(1/1,3) auto={2}{B}{c(1/1,-1)}:target(player) ability$!name(discard) target(*|myhand) reject!$ targetedplayer asSorcery @@ -56541,6 +62697,16 @@ power=1 toughness=1 [/card] [card] +name=Miner's Bane +auto={2}{R}:name(1/0 and Trample) transforms((,newability[1/0],newability[trample])) ueot +text={2}{R}: Miner's Bane gets +1/+0 and gains trample until end of turn. (If it 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.) +mana={4}{R}{R} +type=Creature +subtype=Elemental +power=6 +toughness=3 +[/card] +[card] name=Minion of Leshrac abilities=protection from black auto={T}:destroy target(creature,land) @@ -56589,6 +62755,25 @@ power=1 toughness=1 [/card] [card] +name=Minister of Pain +auto=may name(Exploit) sacrifice notatarget(creature|mybattlefield) && all(creature|opponentbattlefield) -1/-1 ueot +text=Exploit (When this creature enters the battlefield, you may sacrifice a creature.) -- When Minister of Pain exploits a creature, creatures your opponents control get -1/-1 until end of turn. +mana={2}{B} +type=Creature +subtype=Human Shaman +power=2 +toughness=3 +[/card] +[card] +name=Minotaur Abomination +text= +mana={4}{B}{B} +type=Creature +subtype=Zombie Minotaur +power=4 +toughness=6 +[/card] +[card] name=Minotaur Aggressor abilities=first strike,haste text=First strike, haste @@ -56621,6 +62806,17 @@ power=3 toughness=4 [/card] [card] +name=Minotaur Skullcleaver +abilities=haste +auto=2/0 ueot +text=Haste. -- When Minotaur Skullcleaver enters the battlefield, it gets +2/+0 until end of turn. +mana={2}{R} +type=Creature +subtype=Minotaur Berserker +power=2 +toughness=2 +[/card] +[card] name=Minotaur Tactician abilities=haste auto=aslongas(creature[white]|myBattlefield) 1/1 @@ -57030,7 +63226,8 @@ toughness=4 [card] name=Mistblade Shinobi autohand={U}{N}:ninjutsu -auto=@combatdamaged(player) from(this):may moveTo(ownerhand) target(creature|opponentBattlefield) +auto=@combatdamagefoeof(player) from(this):may moveTo(ownerhand) target(creature|opponentBattlefield) +auto=@combatdamageof(player) from(this):may moveTo(ownerhand) target(creature|myBattlefield) text=Ninjutsu {U} ({U}, Return an unblocked attacker you control to hand: Put this card onto the battlefield from your hand tapped and attacking.) -- Whenever Mistblade Shinobi deals combat damage to a player, you may return target creature that player controls to its owner's hand. mana={2}{U} type=Creature @@ -57039,6 +63236,41 @@ power=1 toughness=1 [/card] [card] +name=Mistcutter Hydra +abilities=nofizzle,haste,protection from blue +auto=counter(1/1,X) +text=Mistcutter Hydra can't be countered. -- Haste, protection from blue. -- Mistcutter Hydra enters the battlefield with X +1/+1 counters on it. +mana={X}{G} +type=Creature +subtype=Hydra +power=0 +toughness=0 +[/card] +[card] +name=Mistfire Adept +auto=@movedTo(*[-creature]|mystack):1/1 ueot +auto=@movedTo(*[-creature]|mystack):target(creature) flying ueot +text=Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) -- Whenever you cast a noncreature spell, target creature gains flying until end of turn. +mana={3}{U} +type=Creature +subtype=Human Monk +power=3 +toughness=3 +[/card] +[card] +name=Mistfire Weaver +abilities=flying +facedown={3} +autofacedown={2}{U}:morph +autofaceup=opponentshroud target(creature|mybattlefield) ueot +text=Flying -- Morph {2}{U} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) -- When Mistfire Weaver is turned face up, target creature you control gains hexproof until end of turn. +mana={3}{U} +type=Creature +subtype=Djinn Wizard +power=3 +toughness=1 +[/card] +[card] name=Mistform Dreamer abilities=flying auto={1}:activatechooseatype all(this) becomes(removecreaturesubtypes) && becomes(chosentype) ueot activatechooseend @@ -57161,7 +63393,7 @@ toughness=4 [/card] [card] name=Mistform Warchief -auto=lord(creature[share!types!]|myhand) altercost(colorless,-1) chooseend +auto=lord(creature[share!types!]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) chooseend auto={T}:activatechooseatype all(this) becomes(removecreaturesubtypes) && becomes(chosentype) ueot activatechooseend text=Creature spells you cast that share a creature type with Mistform Warchief cost {1} less to cast. -- {T}: Mistform Warchief becomes the creature type of your choice until end of turn. mana={2}{U} @@ -57171,6 +63403,19 @@ power=1 toughness=3 [/card] [card] +name=Misthoof Kirin +abilities=flying,vigilance +facedown={3} +autofacedown={1}{W}:morph +autofaceup=counter(1/1,1) +text=Flying, vigilance -- Megamorph {1}{W} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) +mana={2}{W} +type=Creature +subtype=Kirin +power=2 +toughness=1 +[/card] +[card] name=Mistmeadow Skulk abilities=lifelink auto=protection from(*[manacost>=3]) @@ -57236,6 +63481,30 @@ power=4 toughness=4 [/card] [card] +name=Mizzium Mortars +alias=11000 +other={3}{R}{R}{R} name(Overload) +target=creature|opponentbattlefield +auto=paidmana damage:4 +auto=overload damage:4 all(creature|opponentbattlefield) +text=Mizzium Mortars deals 4 damage to target creature you don't control. -- Overload {3}{R}{R}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") +mana={1}{R} +type=Sorcery +[/card] +[card] +name=Mizzium Skin +alias=11000 +other={1}{U} name(Overload) +target=creature|mybattlefield +auto=paidmana 0/1 +auto=paidmana opponentshroud +auto=overload all(creature|mybattlefield) 0/1 +auto=overload all(creature|mybattlefield) opponentshroud +text=Target creature you control gets +0/+1 and gains hexproof until end of turn. -- Overload {1}{U} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") +mana={U} +type=Instant +[/card] +[card] name=Mnemonic Nexus auto=moveto(opponentlibrary) all(*|opponentgraveyard) && shuffle opponent auto=moveto(mylibrary) all(*|mygraveyard) && shuffle controller @@ -57298,6 +63567,14 @@ mana={1}{R} type=Sorcery [/card] [card] +name=Mob Rule +auto=choice name(Power 4 or greater) all(creature[power>=4]|opponentbattlefield) transforms((,newability[moveTo(opponentbattlefield)],newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot +auto=choice name(Power 3 or less) all(creature[power<=3]|opponentbattlefield) transforms((,newability[moveTo(opponentbattlefield)],newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot +text=Choose one: --Gain control of all creatures with power 4 or greater until end of turn. Untap those creatures. They gain haste until end of turn. --Gain control of all creatures with power 3 or less until end of turn. Untap those creatures. They gain haste until end of turn. +mana={4}{R}{R} +type=Sorcery +[/card] +[card] name=Mobile Fort abilities=defender auto={3}:3/-1 && canattack ueot limit:1 @@ -57490,6 +63767,16 @@ power=2 toughness=2 [/card] [card] +name=Mogis's Marauder +auto=name(intimidate & haste) target(creature|battlefield) transforms((,newability[intimidate],newability[haste])) ueot +text=When Mogis's Marauder enters the battlefield, up to X target creatures each gain intimidate and haste until end of turn, where X is your devotion to black. (Each {B} in the mana costs of permanents you control counts toward your devotion to black.) +mana={2}{B} +type=Creature +subtype=Human Berserker +power=2 +toughness=2 +[/card] +[card] name=Mold Adder auto=@movedTo(*[black;blue]|opponentStack):may counter(1/1,1) text=Whenever an opponent casts a blue or black spell, you may put a +1/+1 counter on Mold Adder. @@ -57575,7 +63862,7 @@ toughness=8 [card] name=Molimo, Maro-Sorcerer abilities=trample -auto=foreach(land|myBattlefield) 1/1 +anyzone=type:land:myBattlefield/type:land:myBattlefield cdaactive text=Trample (If this creature would deal enough damage to its blockers to destroy them, you may have it deal the rest of its damage to defending player or planeswalker.) -- Molimo, Maro-Sorcerer's power and toughness are each equal to the number of lands you control. mana={4}{G}{G}{G} type=Legendary Creature @@ -57647,6 +63934,25 @@ power=0 toughness=4 [/card] [card] +name=Molten Vortex +auto={R}{discard(land|myhand)}:damage:2 target(creature,player) +text={R}, Discard a land card: Molten Vortex deals 2 damage to target creature or player. +mana={R} +type=Enchantment +[/card] +[card] +name=Moltensteel Dragon +abilities=flying +auto={p(R)}:1/0 +text=({p(R)} may be paid for with either {R} or 2 life.) -- {p(R)}: Moltensteel Dragon gets +1/+0 until end of turn. +color=red +mana={4}{p(R)}{p(R)} +type=Artifact Creature +subtype=Dragon +power=4 +toughness=4 +[/card] +[card] name=Molten-Tail Masticore auto=upcost[{discard(*|myhand)}] sacrifice auto={4}{E(creature|mygraveyard)}:damage:4 target(creature,player) @@ -57677,16 +63983,14 @@ mana={2}{G} type=Enchantment [/card] [card] -name=Moltensteel Dragon -abilities=flying -auto={p(R)}:1/0 -text=({p(R)} may be paid for with either {R} or 2 life.) -- {p(R)}: Moltensteel Dragon gets +1/+0 until end of turn. -color=red -mana={4}{p(R)}{p(R)} -type=Artifact Creature -subtype=Dragon -power=4 -toughness=4 +name=Molting Snakeskin +target=creature +auto=2/0 +auto=teach(creature) {2}{B}:regenerate +text=Enchant creature -- Enchanted creature gets +2/+0 and has "{2}{B}: Regenerate this creature." +mana={B} +type=Enchantment +subtype=Aura [/card] [card] name=Moment of Heroism @@ -57744,6 +64048,63 @@ text=Prevent all combat damage that would be dealt this turn. -- Flashback {2}{G mana={1}{G} type=Instant [/card] +[card] +name=Monastery Flock +abilities=flying,defender +facedown={3} +autofacedown={U}:morph +text=Flying. -- Defender. -- Morph {2}{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={U} +type=Creature +subtype=Bird +power=0 +toughness=5 +[/card] +[card] +name=Monastery Loremaster +facedown={3} +autofacedown={5}{U}:morph +autofaceup=counter(1/1,1) +autofaceup=moveto(myhand) target(*[-creature;-land]|mygraveyard) +text=Megamorph {5}{U} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) -- When Monastery Loremaster is turned face up, return target noncreature, nonland card from your graveyard to your hand. +mana={3}{U} +type=Creature +subtype=Djinn Wizard +power=3 +toughness=2 +[/card] +[card] +name=Monastery Mentor +auto=@movedTo(*[-creature]|mystack):1/1 ueot +auto=@movedTo(*[-creature]|mystack):choice name(Create Monk) token(-391883) 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 +subtype=Human Monk +power=2 +toughness=2 +[/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=Monastery Swiftspear +abilities=haste +auto=@movedTo(*[-creature]|mystack):1/1 ueot +text=Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) +mana={R} +type=Creature +subtype=Human Monk +power=1 +toughness=2 +[/card] ###The 2 cards below should stay together (Flip Card)### [card] name=Mondronen Shaman @@ -58116,7 +64477,8 @@ type=Sorcery name=Mordant Dragon abilities=flying auto={1}{R}:1/0 -auto=@combatdamaged(opponent) from(this):may name(same amount of damage to opponent's creature) damage:thatmuch target(creature|opponentbattlefield) +auto=@combatdamagefoeof(player) from(this):may name(same amount of damage to opponent's creature) damage:thatmuch target(creature|opponentbattlefield) +auto=@combatdamageof(player) from(this):may name(same amount of damage to controller creature) damage:thatmuch target(creature|mybattlefield) text=Flying -- {1}{R}: Mordant Dragon gets +1/+0 until end of turn. -- Whenever Mordant Dragon deals combat damage to a player, you may have it deal that much damage to target creature that player controls. mana={3}{R}{R}{R} type=Creature @@ -58289,6 +64651,16 @@ mana={2}{B}{B} type=Enchantment [/card] [card] +name=Mortal Obstinacy +target=creature|mybattlefield +auto=1/1 +auto=@combatdamaged(player) from(mytgt):may sacrifice(this) && destroy target(enchantment) +text=Enchant creature you control -- Enchanted creature gets +1/+1. -- Whenever enchanted creature deals combat damage to a player, you may sacrifice Mortal Obstinacy. If you do, destroy target enchantment. +mana={W} +type=Enchantment +subtype=Aura +[/card] +[card] name=Mortal Wound target=creature auto=@damaged(mytgt):destroy @@ -58328,7 +64700,7 @@ subtype=Equipment [/card] [card] name=Mortician Beetle -auto=@sacrificed(creature):may counter(1/1,1) +auto=@sacrificed(creature):name(counter +1/+1) ability$!may counter(1/1,1) all(mystored)!$ controller text=Whenever a player sacrifices a creature, you may put a +1/+1 counter on Mortician Beetle. mana={B} type=Creature @@ -58375,8 +64747,9 @@ toughness=2 [/card] [card] name=Mortivore +alias=1111 auto={B}:regenerate -auto=foreach(creature|graveyard) 1/1 +anyzone=type:creature:graveyard/type:creature:graveyard cdaactive text=Mortivore's power and toughness are each equal to the number of creature cards in all graveyards. -- {B}: Regenerate Mortivore. (The next time this creature would be destroyed this turn, it isn't. Instead tap it, remove all damage from it, and remove it from combat.) mana={2}{B}{B} type=Creature @@ -58771,8 +65144,7 @@ toughness=2 [card] name=Multani, Maro-Sorcerer abilities=shroud -auto=foreach(*|myhand) 1/1 -auto=foreach(*|opponenthand) 1/1 +anyzone=type:*:hand/type:*:hand cdaactive text=Shroud (This permanent can't be the target of spells or abilities.) -- Multani's power and toughness are each equal to the total number of cards in all players' hands. mana={4}{G}{G} type=Legendary Creature @@ -59297,6 +65669,16 @@ mana={4}{U} type=Instant [/card] [card] +name=Myth Realized +auto=@movedto(*[-creature]|mystack):counter(0/0,1,lore) +auto={2}{W}:counter(0/0,1,lore) +auto=counter{0%0.1.lore}/counter{0%0.1.lore} nonstatic +auto={W}:transforms((Monk Avatar Creature,setpower=counter{0%0.1.lore},settoughness=counter{0%0.1.lore})) ueot +text=Whenever you cast a noncreature spell, put a lore counter on Myth Realized. -- {2}{W}: Put a lore counter on Myth Realized. -- {W}: Until end of turn, Myth Realized becomes a Monk Avatar creature in addition to its other types and gains "This creature's power and toughness are each equal to the number of lore counters on it." +mana={W} +type=Enchantment +[/card] +[card] name=Mystic Compass auto={1}{T}:ueot name(land becomes a plains) loseabilities && losesubtypesof(land) && transforms((plains)) target(land) auto={1}{T}:ueot name(land becomes an island) loseabilities && losesubtypesof(land) && transforms((island)) target(land) @@ -59370,6 +65752,14 @@ text={T}: Add {1} to your mana pool. -- {(w/u)}, {T}: Add {W}{W}, {W}{U}, or {U} type=Land [/card] [card] +name=Mystic Meditation +auto=draw:3 +auto=transforms((,newability[choice name(discard 2 cards) reject target(<2>*|myhand)],newability[aslongas(creature|myHand) choice name(discard a creature card) reject target(creature|myhand)])) +text=Draw three cards. Then discard two cards unless you discard a creature card. +mana={3}{U} +type=Sorcery +[/card] +[card] name=Mystic Melting target=artifact,enchantment auto=destroy @@ -59381,7 +65771,7 @@ type=Instant [card] name=Mystic Might target=land|myBattlefield -auto=cumulativeupcost[{1}{U}] sacrifice +auto=cumulativeupcostmulti[{1}{U}] sacrifice all(this) auto=teach(land) {T}:2/2 target(creature) text=Enchant land you control -- Cumulative upkeep {1}{U} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.) -- Enchanted land has "{T}: Target creature gets +2/+2 until end of turn." mana={U} @@ -59389,6 +65779,27 @@ type=Enchantment subtype=Aura [/card] [card] +name=Mystic Monastery +auto=tap +auto={T}:Add{U} +auto={T}:Add{R} +auto={T}:Add{W} +text=Mystic Monastery enters the battlefield tapped. -- {T}: Add {U}, {R}, or {W} to your mana pool. +type=Land +[/card] +[card] +name=Mystic of the Hidden Way +abilities=unblockable +facedown={3} +autofacedown={2}{U}:morph +text=Mystic of the Hidden Way can't be blocked. -- Morph {2}{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={4}{U} +type=Creature +subtype=Human Monk +power=3 +toughness=2 +[/card] +[card] name=Mystic Penitent abilities=vigilance auto=aslongas(*|mygraveyard) 1/1 >6 @@ -59546,7 +65957,7 @@ subtype=Shapeshifter name=Nameless One facedown={3} autofacedown={2}{U}:morph -auto=foreach(wizard) 1/1 +anyzone=type:wizard:battlefield/type:wizard:battlefield cdaactive text=Nameless One's power and toughness are each equal to the number of Wizards on the battlefield. -- Morph {2}{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={3}{U} type=Creature @@ -60074,6 +66485,16 @@ mana={B}{G} type=Enchantment [/card] [card] +name=Necromancer's Assistant +auto=deplete:3 controller +text=When Necromancer's Assistant enters the battlefield, put the top three cards of your library into your graveyard. +mana={2}{B} +type=Creature +subtype=Zombie +power=3 +toughness=1 +[/card] +[card] name=Necromancer's Covenant auto=choice name(exile all creatures from opponent's graveyard) foreach(creature|opponentgraveyard) token(Zombie,Creature Zombie,2/2,black) && moveTo(exile) all(creature|opponentgraveyard) auto=choice name(exile all creatures from my graveyard) foreach(creature|mygraveyard) token(Zombie,Creature Zombie,2/2,black) && moveTo(exile) all(creature|mygraveyard) @@ -60093,6 +66514,21 @@ type=Enchantment 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 +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 +[/card] +[card] +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. +mana={4}{B} +type=Sorcery +[/card] +[card] name=Necromantic Thirst target=creature auto=@combatdamaged(player) from(mytgt):may moveTo(myhand) target(creature|mygraveyard) @@ -60102,6 +66538,17 @@ type=Enchantment subtype=Aura [/card] [card] +name=Necromaster Dragon +abilities=flying +auto=@combatdamaged(player) from(this):pay({2}) token(Zombie,Creature Zombie,2/2,black) controller && deplete:2 all(opponent) +text=Flying -- Whenever Necromaster Dragon deals combat damage to a player, you may pay {2}. If you do, put a 2/2 black Zombie creature token onto the battlefield and each opponent puts the top two cards of his or her library into his or her graveyard. +mana={3}{U}{B} +type=Creature +subtype=Dragon +power=4 +toughness=4 +[/card] +[card] name=Necropede abilities=infect auto=@movedTo(this|graveyard) from(battlefield):may counter(-1/-1) target(creature) @@ -60214,7 +66661,8 @@ type=Enchantment [card] name=Needle Specter abilities=flying,wither -auto=@combatdamaged(opponent) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@combatdamagefoeof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@combatdamageof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ controller text=Flying -- Wither (This deals damage to creatures in the form of -1/-1 counters.) -- Whenever Needle Specter deals combat damage to a player, that player discards that many cards. mana={1}{B}{B} type=Creature @@ -60388,6 +66836,17 @@ power=1 toughness=1 [/card] [card] +name=Nessian Asp +abilities=reach +auto=this(cantargetcard(*[-monstrous]) {6}{G}:becomes(monstrous) forever && counter(1/1,4) +text=Reach -- {6}{G}: Monstrosity 4. (If this creature isn't monstrous, put four +1/+1 counters on it and it becomes monstrous.) +mana={4}{G} +type=Creature +subtype=Snake +power=4 +toughness=5 +[/card] +[card] name=Nessian Courser mana={2}{G} type=Creature @@ -60427,6 +66886,17 @@ power=4 toughness=3 [/card] [card] +name=Netcaster Spider +abilities=reach +auto=@combat(blocking) source(this) from(creature[flying]):all(this) 2/0 ueot +text=Reach (This creature can block creatures with flying.) -- Whenever Netcaster Spider blocks a creature with flying, Netcaster Spider gets +2/+0 until end of turn. +mana={2}{G} +type=Creature +subtype=Spider +power=2 +toughness=3 +[/card] +[card] name=Nether Horror mana={3}{B} type=Creature @@ -60588,7 +67058,7 @@ toughness=2 [card] name=Neurok Stealthsuit auto=teach(creature) shroud -auto={U}{U}:name(attach) retarget target(creature|mybattlefield) +auto={U}{U}:name(attach) rehook target(creature|mybattlefield) auto={1}:equip text=Equipped creature has shroud. (It can't be the target of spells or abilities.) -- {U}{U}: Attach Neurok Stealthsuit to target creature you control. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) mana={2} @@ -60596,6 +67066,23 @@ type=Artifact subtype=Equipment [/card] [card] +name=Neutralizing Blast +target=*[multicolor]|stack +auto=fizzle +text=Counter target multicolored spell. +mana={1}{U} +type=Instant +[/card] +[card] +name=Neverending Torment +target=player +auto=moveto(exile) target(*|targetedpersonslibrary) +auto=if compare(epicactivated)~lessthan~1 then emblem transforms((,newability[epic controller],newability[@each my upkeep:castcard(copied named!:Neverending Torment:!)])) forever dontremove +text=Search target player's library for X cards, where X is the number of cards in your hand, and exile them. Then that player shuffles his or her library. -- Epic (For the rest of the game, you can't cast spells. At the beginning of each of your upkeeps, copy this spell except for its epic ability. You may choose a new target for the copy.) +mana={4}{B}{B} +type=Sorcery +[/card] +[card] name=Nevermaker abilities=flying other={3}{U} name(Evoke) @@ -60786,7 +67273,7 @@ toughness=2 name=Nicol Bolas auto=flying auto=upcost[{U}{B}{R}] sacrifice -auto=@damaged(opponent) from(this):reject all(*|opponenthand) +auto=@damagefoeof(player) from(this):reject all(*|opponenthand) text=Flying -- At the beginning of your upkeep, sacrifice Nicol Bolas unless you pay {U}{B}{R}. -- Whenever Nicol Bolas deals damage to an opponent, that player discards his or her hand. mana={2}{U}{U}{B}{B}{R}{R} type=Legendary Creature @@ -60808,25 +67295,28 @@ subtype=Bolas [/card] [card] name=Night Dealings -auto=@damaged(opponent) from(*|mybattlefield):counter(0/0,thatmuch,Theft) -auto=@damaged(opponent) from(*|mystack):counter(0/0,thatmuch,Theft) -auto=this(counter{0/0.1.Theft}<1) {2}{B}{B}:name(X = 0) (*[-land;manacost=0]) -auto=this(counter{0/0.1.Theft}=) {2}{B}{B}{C(0/0,-1,Theft)}:name(X = 1) moveTo(myhand) target(*[-land;manacost=1]|mylibrary) -auto=this(counter{0/0.2.Theft}=) {2}{B}{B}{C(0/0,-2,Theft)}:name(X = 2) moveTo(myhand) target(*[-land;manacost=2]|mylibrary) -auto=this(counter{0/0.3.Theft}=) {2}{B}{B}{C(0/0,-3,Theft)}:name(X = 3) moveTo(myhand) target(*[-land;manacost=3]|mylibrary) -auto=this(counter{0/0.4.Theft}=) {2}{B}{B}{C(0/0,-4,Theft)}:name(X = 4) moveTo(myhand) target(*[-land;manacost=4]|mylibrary) -auto=this(counter{0/0.5.Theft}=) {2}{B}{B}{C(0/0,-5,Theft)}:name(X = 5) moveTo(myhand) target(*[-land;manacost=5]|mylibrary) -auto=this(counter{0/0.6.Theft}=) {2}{B}{B}{C(0/0,-6,Theft)}:name(X = 6) moveTo(myhand) target(*[-land;manacost=6]|mylibrary) -auto=this(counter{0/0.7.Theft}=) {2}{B}{B}{C(0/0,-7,Theft)}:name(X = 7) moveTo(myhand) target(*[-land;manacost=7]|mylibrary) -auto=this(counter{0/0.8.Theft}=) {2}{B}{B}{C(0/0,-8,Theft)}:name(X = 8) moveTo(myhand) target(*[-land;manacost=8]|mylibrary) -auto=this(counter{0/0.9.Theft}=) {2}{B}{B}{C(0/0,-9,Theft)}:name(X = 9) moveTo(myhand) target(*[-land;manacost=9]|mylibrary) -auto=this(counter{0/0.10.Theft}=) {2}{B}{B}{C(0/0,-10,Theft)}:name(X = 10) moveTo(myhand) target(*[-land;manacost=10]|mylibrary) -auto=this(counter{0/0.11.Theft}=) {2}{B}{B}{C(0/0,-11,Theft)}:name(X = 11) moveTo(myhand) target(*[-land;manacost=11]|mylibrary) -auto=this(counter{0/0.12.Theft}=) {2}{B}{B}{C(0/0,-12,Theft)}:name(X = 12) moveTo(myhand) target(*[-land;manacost=12]|mylibrary) -auto=this(counter{0/0.13.Theft}=) {2}{B}{B}{C(0/0,-13,Theft)}:name(X = 13) moveTo(myhand) target(*[-land;manacost=13]|mylibrary) -auto=this(counter{0/0.14.Theft}=) {2}{B}{B}{C(0/0,-14,Theft)}:name(X = 14) moveTo(myhand) target(*[-land;manacost=14]|mylibrary) -auto=this(counter{0/0.15.Theft}=) {2}{B}{B}{C(0/0,-15,Theft)}:name(X = 15) moveTo(myhand) target(*[-land;manacost=15]|mylibrary) -auto=this(counter{0/0.16.Theft}=) {2}{B}{B}{C(0/0,-16,Theft)}:name(X = 16) moveTo(myhand) target(*[-land;manacost=16]|mylibrary) +auto=@damagefoeof(player) from(*|mybattlefield,mystack,mygraveyard,mylibrary,myexile):counter(0/0,thatmuch,Theft) +auto={2}{B}{B}:name(X = 0) && moveto(myhand) target(*[-land;manacost=0]|mylibrary) +auto=this(counter{0/0.1.Theft}=>) {2}{B}{B}{C(0/0,-1,Theft)}:name(X = 1) && moveTo(myhand) target(*[-land;manacost=1]|mylibrary) +auto=this(counter{0/0.2.Theft}=>) {2}{B}{B}{C(0/0,-2,Theft)}:name(X = 2) && moveTo(myhand) target(*[-land;manacost=2]|mylibrary) +auto=this(counter{0/0.3.Theft}=>) {2}{B}{B}{C(0/0,-3,Theft)}:name(X = 3) && moveTo(myhand) target(*[-land;manacost=3]|mylibrary) +auto=this(counter{0/0.4.Theft}=>) {2}{B}{B}{C(0/0,-4,Theft)}:name(X = 4) && moveTo(myhand) target(*[-land;manacost=4]|mylibrary) +auto=this(counter{0/0.5.Theft}=>) {2}{B}{B}{C(0/0,-5,Theft)}:name(X = 5) && moveTo(myhand) target(*[-land;manacost=5]|mylibrary) +auto=this(counter{0/0.6.Theft}=>) {2}{B}{B}{C(0/0,-6,Theft)}:name(X = 6) && moveTo(myhand) target(*[-land;manacost=6]|mylibrary) +auto=this(counter{0/0.7.Theft}=>) {2}{B}{B}{C(0/0,-7,Theft)}:name(X = 7) && moveTo(myhand) target(*[-land;manacost=7]|mylibrary) +auto=this(counter{0/0.8.Theft}=>) {2}{B}{B}{C(0/0,-8,Theft)}:name(X = 8) && moveTo(myhand) target(*[-land;manacost=8]|mylibrary) +auto=this(counter{0/0.9.Theft}=>) {2}{B}{B}{C(0/0,-9,Theft)}:name(X = 9) && moveTo(myhand) target(*[-land;manacost=9]|mylibrary) +auto=this(counter{0/0.10.Theft}=>) {2}{B}{B}{C(0/0,-10,Theft)}:name(X = 10) && moveTo(myhand) target(*[-land;manacost=10]|mylibrary) +auto=this(counter{0/0.11.Theft}=>) {2}{B}{B}{C(0/0,-11,Theft)}:name(X = 11) && moveTo(myhand) target(*[-land;manacost=11]|mylibrary) +auto=this(counter{0/0.12.Theft}=>) {2}{B}{B}{C(0/0,-12,Theft)}:name(X = 12) && moveTo(myhand) target(*[-land;manacost=12]|mylibrary) +auto=this(counter{0/0.13.Theft}=>) {2}{B}{B}{C(0/0,-13,Theft)}:name(X = 13) && moveTo(myhand) target(*[-land;manacost=13]|mylibrary) +auto=this(counter{0/0.14.Theft}=>) {2}{B}{B}{C(0/0,-14,Theft)}:name(X = 14) && moveTo(myhand) target(*[-land;manacost=14]|mylibrary) +auto=this(counter{0/0.15.Theft}=>) {2}{B}{B}{C(0/0,-15,Theft)}:name(X = 15) && moveTo(myhand) target(*[-land;manacost=15]|mylibrary) +auto=this(counter{0/0.16.Theft}=>) {2}{B}{B}{C(0/0,-16,Theft)}:name(X = 16) && moveTo(myhand) target(*[-land;manacost=16]|mylibrary) +auto=this(counter{0/0.17.Theft}=>) {2}{B}{B}{C(0/0,-17,Theft)}:name(X = 17) && moveTo(myhand) target(*[-land;manacost=17]|mylibrary) +auto=this(counter{0/0.18.Theft}=>) {2}{B}{B}{C(0/0,-18,Theft)}:name(X = 18) && moveTo(myhand) target(*[-land;manacost=18]|mylibrary) +auto=this(counter{0/0.19.Theft}=>) {2}{B}{B}{C(0/0,-19,Theft)}:name(X = 19) && moveTo(myhand) target(*[-land;manacost=19]|mylibrary) +auto=this(counter{0/0.20.Theft}=>) {2}{B}{B}{C(0/0,-20,Theft)}:name(X = 20) && moveTo(myhand) target(*[-land;manacost=20]|mylibrary) text=Whenever a source you control deals damage to another player, put that many theft counters on Night Dealings. -- {2}{B}{B}, Remove X theft counters from Night Dealings: Search your library for a nonland card with converted mana cost X, reveal it, and put it into your hand. Then shuffle your library. mana={2}{B}{B} type=Enchantment @@ -60890,6 +67380,17 @@ mana={B}{B} type=Instant [/card] [card] +name=Nightfire Giant +auto=aslongas(Mountain|myBattlefield) 1/1 +auto={4}{R}:damage:2 target(creature,player) +text=Nightfire Giant gets +1/+1 as long as you control a Mountain. -- {4}{R}: Nightfire Giant deals 2 damage to target creature or player. +mana={4}{B} +type=Creature +subtype=Zombie Giant +power=4 +toughness=3 +[/card] +[card] name=Nightguard Patrol abilities=first strike,vigilance text=First strike, vigilance @@ -60911,7 +67412,7 @@ type=Sorcery [card] name=Nightmare abilities=flying -auto=foreach(swamp|myBattlefield) 1/1 +anyzone=type:swamp:mybattlefield/type:swamp:mybattlefield cdaactive text=Flying -- Nightmare's power and toughness are each equal to the number of Swamps you control. mana={5}{B} type=Creature @@ -60946,6 +67447,14 @@ mana={3}{B} type=Sorcery [/card] [card] +name=Nightmarish End +target=creature +auto=foreach(*|myhand) -1/-1 +text=Target creature gets -X/-X until end of turn, where X is the number of cards in your hand. +mana={2}{B} +type=Instant +[/card] +[card] name=Nightscape Apprentice auto={U}{T}:moveTo(ownerLibrary) target(creature|myBattlefield) auto={R}{T}:first strike target(creature) @@ -60958,7 +67467,7 @@ toughness=1 [/card] [card] name=Nightscape Familiar -auto=lord(*[blue;red]|myhand) altercost(colorless,-1) +auto=lord(*[blue;red]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) auto={1}{B}:regenerate text=Blue spells and red spells you cast cost {1} less to cast. -- {1}{B}: Regenerate Nightscape Familiar. mana={1}{B} @@ -61021,7 +67530,7 @@ toughness=4 [/card] [card] name=Nightstalker Engine -auto=foreach(creature|myGraveyard) 1/0 +anyzone=type:creature:myGraveyard/3 cdaactive text=Nightstalker Engine's power is equal to the number of creature cards in your graveyard. mana={4}{B} type=Creature @@ -61193,6 +67702,16 @@ text={T}: Add {1} to your mana pool. -- {T}: Add {W} to your mana pool. Activate type=Land [/card] [card] +name=Nimbus of the Isles +abilities=flying +text=Flying (This creature can't be blocked except by creatures with flying or reach.) +mana={4}{U} +type=Creature +subtype=Elemental +power=3 +toughness=3 +[/card] +[card] name=Nimbus Swimmer abilities=flying auto=counter(1/1,X) @@ -61268,7 +67787,7 @@ toughness=2 [/card] [card] name=Nirkana Revenant -auto=@tappedformana(swamp|mybattlefield):Add{B} +auto=lord(swamp|mybattlefield) transforms((,newability[produceextra:{B}])) auto={B}:1/1 text=Whenever you tap a Swamp for mana, add {B} to your mana pool (in addition to the mana the land produces). -- {B}:Nirkana Revenant gets +1/+1 until end of turn. type=Creature @@ -61278,6 +67797,17 @@ toughness=4 mana={4}{B}{B} [/card] [card] +name=Nissa, Worldwaker +auto=counter(0/0,3,loyalty) +auto={C(0/0,1,Loyalty)}:name(land becomes 4/4) target(land|mybattlefield) becomes(Elemental Creature,4/4,trample) forever +auto={C(0/0,1,Loyalty)}:name(untap up to 4 forest) target(forest|mybattlefield) untap +auto={C(0/0,-7,Loyalty)}:name(search Lands) moveTo(mybattlefield) target(land[basic]|mylibrary) and!( becomes(Elemental Creature,4/4,trample) forever )! oneshot +text=+1: Target land you control becomes a 4/4 Elemental creature with trample. It's still a land. -- +1: Untap up to four target Forests. -- -7: Search your library for any number of basic land cards, put them onto the battlefield, then shuffle your library. Those lands become 4/4 Elemental creatures with trample. They're still lands. +mana={3}{G}{G} +type=Planeswalker +subtype=Nissa +[/card] +[card] name=Nissa Revane auto=counter(0/0,2,loyalty) auto={C(0/0,1,Loyalty)}:moveTo(mybattlefield) target(Nissa's Chosen|mylibrary) @@ -61299,6 +67829,13 @@ power=2 toughness=3 [/card] [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)!])) 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)!])) 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. +mana={2}{G} +type=Sorcery +[/card] +[card] name=Niveous Wisps target=creature auto=transforms((,white)) ueot @@ -61309,6 +67846,17 @@ mana={W} type=Instant [/card] [card] +name=Nivix Barrier +abilities=flash, defender +auto=target(creature[attacking]) -4/-0 ueot +text=Flash (You may cast this spell any time you could cast an instant.) -- Defender (This creature can't attack.) -- When Nivix Barrier enters the battlefield, target attacking creature gets -4/-0 until end of turn. +mana={3}{U} +type=Creature +subtype=Illusion Wall +power=0 +toughness=4 +[/card] +[card] name=Niv-Mizzet, Dracogenius auto=@damaged(player) from(this):may draw:1 controller auto={U}{R}:damage:1 target(creature,player) @@ -61323,7 +67871,7 @@ toughness=5 [card] name=Niv-Mizzet, the Firemind abilities=flying -auto=@drawn(controller):damage:1 target(creature,player) +auto=@drawof(player):damage:1 target(creature,player) auto={T}:draw:1 text=Flying -- Whenever you draw a card, Niv-Mizzet, the Firemind deals 1 damage to target creature or player. -- {T}: Draw a card. mana={2}{U}{U}{R}{R} @@ -61334,7 +67882,7 @@ toughness=4 [/card] [card] name=No Mercy -auto=@damaged(controller) from(creature):all(trigger[from]) destroy +auto=@damageof(player) from(creature):all(trigger[from]) destroy text=Whenever a creature deals damage to you, destroy it. mana={2}{B}{B} type=Enchantment @@ -61517,6 +68065,15 @@ power=2 toughness=2 [/card] [card] +name=Nomad Outpost +auto=tap +auto={T}:Add{R} +auto={T}:Add{W} +auto={T}:Add{B} +text=Nomad Outpost enters the battlefield tapped. -- {T}: Add {R}, {W}, or {B} to your mana pool. +type=Land +[/card] +[card] name=Nomad Stadium auto={T}:Add{W} && damage:1 controller auto=aslongas(*|mygraveyard) {W}{T}{S}:life:4 >6 @@ -61696,6 +68253,17 @@ power=0 toughness=0 [/card] [card] +name=Noxious Dragon +abilities=flying +auto=@movedTo(this|graveyard) from(Battlefield):may destroy target(creature[manacost<=3]) +text=Flying -- When Noxious Dragon dies, you may destroy target creature with converted mana cost 3 or less. +mana={4}{B}{B} +type=Creature +subtype=Dragon +power=4 +toughness=4 +[/card] +[card] name=Noxious Field target=land|myBattlefield auto=teach(land) {T}:damage:1 all(creature,player) @@ -61874,6 +68442,48 @@ power=1 toughness=1 [/card] [card] +name=Nykthos, Shrine to Nyx +auto={T}:Add{1} +auto={2}{T}:name(Green) thisforeach(variable{type:manaG}>0) add{G} +auto={2}{T}:name(Red) thisforeach(variable{type:manaR}>0) add{R} +auto={2}{T}:name(Blue) thisforeach(variable{type:manaU}>0) add{U} +auto={2}{T}:name(Black) thisforeach(variable{type:manaB}>0) add{B} +auto={2}{T}:name(White) thisforeach(variable{type:manaW}>0) add{W} +text={T}: Add {1} to your mana pool. -- {2}, {T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color. (Your devotion to a color is the number of mana symbols of that color in the mana costs of permanents you control.) +type=Legendary Land +[/card] +[card] +name=Nylea, God of the Hunt +abilities=indestructible +auto=lord(other creature|mybattlefield) trample +auto={3}{G}:2/2 target(creature) ueot +auto=this(variable{type:manag}>4) transforms((Creature,setpower=6,settoughness=6)) +text=Indestructible -- As long as your devotion to green is less than five, Nylea isn't a creature. (Each {G} in the mana costs of permanents you control counts toward your devotion to green.) -- Other creatures you control have trample. -- {3}{G}: Target creature gets +2/+2 until end of turn. +mana={3}{G} +type=Legendary Enchantment +subtype=God +[/card] +[card] +name=Nylea's Disciple +auto=life:type:manaG controller +text=When Nylea's Disciple enters the battlefield, you gain life equal to your devotion to green. (Each {G} in the mana costs of permanents you control counts toward your devotion to green.) +mana={2}{G}{G} +type=Creature +subtype=Centaur Archer +power=3 +toughness=3 +[/card] +[card] +name=Nylea's Presence +target=land +auto=draw:1 controller +auto=teach(land) transforms((plains forest mountain swamp island,newability[{t}:add{w}],newability[{t}:add{g}],newability[{t}:add{r}],newability[{t}:add{b}],newability[{t}:add{u}])) +text=Enchant land -- When Nylea's Presence enters the battlefield, draw a card. -- Enchanted land is every basic land type in addition to its other types. +mana={1}{G} +type=Enchantment +subtype=Aura +[/card] +[card] name=Nyxathid auto=foreach(*|opponenthand) -1/-1 text=As Nyxathid enters the battlefield, choose an opponent. -- Nyxathid gets -1/-1 for each card in the chosen player's hand. @@ -61884,6 +68494,38 @@ power=7 toughness=7 [/card] [card] +name=Nyx Infusion +target=creature +auto=teach(creature[enchantment]) 2/2 +auto=teach(creature[-enchantment]) -2/-2 +text=Enchant creature -- Enchanted creature gets +2/+2 as long as it's an enchantment. Otherwise, it gets -2/-2. +mana={2}{B} +type=Enchantment +subtype=Aura +[/card] +[card] +name=Nyx Weaver +abilities=reach +auto=@each myupkeep:deplete:2 controller +auto={1}{B}{G}{E}:moveto(ownerhand) target(*|mygraveyard) +text=Reach -- At the beginning of your upkeep, put the top two cards of your library into your graveyard. -- {1}{B}{G}, Exile Nyx Weaver: Return target card from your graveyard to your hand. +mana={1}{B}{G} +type=Enchantment Creature +subtype=Spider +power=2 +toughness=3 +[/card] +[card] +name=Nyx-Fleece Ram +auto=@each my upkeep:life:1 controller +text=At the beginning of your upkeep, you gain 1 life. +mana={1}{W} +type=Enchantment Creature +subtype=Sheep +power=0 +toughness=5 +[/card] +[card] name=O-Naginata auto={2}:equip target(creature[power >=3]|mybattlefield) auto=teach(creature) 3/0 @@ -61895,7 +68537,7 @@ subtype=Equipment [/card] [card] name=Oak Street Innkeeper -auto=this(variable{opponentturn}) lord(creature[tapped]|mybattlefield) opponentshroud +auto=this(variable{opponentturn}>0) lord(creature[tapped]|mybattlefield) opponentshroud text=As long as it's not your turn, tapped creatures you control have hexproof. mana={2}{G} type=Creature @@ -61923,6 +68565,17 @@ power=5 toughness=7 [/card] [card] +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. +mana={2}{G} +type=Enchantment Creature +subtype=Nymph Dryad +power=2 +toughness=3 +[/card] +[card] name=Oasis auto={T}:prevent:1 target(creature) text={T}: Prevent the next 1 damage that would be dealt to target creature this turn. @@ -61953,6 +68606,14 @@ mana={1}{R} type=Enchantment [/card] [card] +name=Oath of the Ancient Wood +auto=may counter(1/1,1) target(creature) restriction{type(creature|battlefield)~morethan~0} +auto=@movedTo(enchantment|myBattlefield) restriction{type(creature|battlefield)~morethan~0}:may counter(1/1,1) target(creature) +text=Whenever Oath of the Ancient Wood or another enchantment enters the battlefield under your control, you may put a +1/+1 counter on target creature. +mana={2}{G} +type=Enchantment +[/card] +[card] name=Oathsworn Giant abilities=vigilance auto=lord(other creature|myBattlefield) 0/2 @@ -62000,7 +68661,7 @@ type=Artifact [/card] [card] name=Ob Nixilis, the Fallen -auto=@movedTo(land|myBattlefield):may counter(1/1,3) && life:-3 opponent +auto=@movedTo(land|myBattlefield):may life:-3 target(player) && counter(1/1,3) all(this) text=Landfall - Whenever a land enters the battlefield under your control, you may have target player lose 3 life. If you do, put three +1/+1 counters on Ob Nixilis, the Fallen. mana={3}{B}{B} type=Legendary Creature @@ -62132,7 +68793,7 @@ name=Obsidian Battle-Axe auto={3}:equip auto=2/1 auto=haste -auto=@movedto(creature[warrior]|battlefield):may all(trigger[to]) retarget +auto=@movedto(creature[warrior]|battlefield):may all(trigger[to]) rehook text=Equipped creature gets +2/+1 and has haste. -- Whenever a Warrior creature enters the battlefield, you may attach Obsidian Battle-Axe to it. -- Equip {3} mana={3} type=Tribal Artifact @@ -62177,7 +68838,7 @@ type=Sorcery [card] name=Obzedat, Ghost Council auto=ability$!choice life:-2 target(opponent) && life:2 controller!$ controller -auto=@each my end:may name(exile) all(this) transforms((,newability[moveto(exile)],newability[phaseactionmulti[my upkeep once] moveto(ownerbattlefield) && all(this) haste])) +auto=@each my end:may name(exile) all(this) transforms((,newability[moveto(exile)],newability[phaseactionmulti[my upkeep once checkex] moveto(ownerbattlefield) && all(this) haste])) text=When Obzedat, Ghost Council enters the battlefield, target opponent loses 2 life and you gain 2 life. -- At the beginning of your end step, you may exile Obzedat. If you do, return it to the battlefield under its owner's control at the beginning of your next upkeep. It gains haste. mana={1}{W}{W}{B}{B} type=Legendary Creature @@ -62229,8 +68890,8 @@ toughness=2 [card] name=Odylic Wraith abilities=swampwalk -auto=@damaged(opponent) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent -auto=@damaged(controller) from(this):reject target(*|myhand) +auto=@damagefoeof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@damageof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ controller text=Swampwalk -- Whenever Odylic Wraith deals damage to a player, that player discards a card. mana={3}{B} type=Creature @@ -62289,6 +68950,17 @@ power=3 toughness=3 [/card] [card] +name=Ogre Battledriver +auto=@movedto(creature|myBattlefield):all(trigger) 2/0 ueot +auto=@movedto(creature|myBattlefield):all(trigger) haste ueot +text=Whenever another creature enters the battlefield under your control, that creature gets +2/+0 and gains haste until end of turn. +mana={2}{R}{R} +type=Creature +subtype=Ogre Warrior +power=3 +toughness=3 +[/card] +[card] name=Ogre Berserker abilities=haste text=Haste @@ -62429,8 +69101,54 @@ power=1 toughness=3 [/card] [card] +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} +type=Legendary Creature +subtype=Dragon +power=5 +toughness=6 +[/card] +[card] +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)!])) 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. +mana={2}{W}{W} +type=Creature +subtype=Human Monk +power=4 +toughness=4 +[/card] +[card] +name=Ojutai Interceptor +abilities=flying +facedown={3} +autofacedown={3}{U}:morph +autofaceup=counter(1/1,1) +text=Flying -- Megamorph {3}{U} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) +mana={3}{U} +type=Creature +subtype=Bird Soldier +power=3 +toughness=1 +[/card] +[card] +name=Ojutai Monument +auto={T}:add{W} +auto={T}:add{U} +auto={4}{W}{U}:becomes(Artifact Creature Dragon,4/4,flying,white,blue) ueot +text={T}: Add {W} or {U} to your mana pool. -- {4}{W}{U}: Ojutai Monument becomes a 4/4 white and blue Dragon artifact creature with flying until end of turn. +mana={3} +type=Artifact +[/card] +[card] name=Okiba-Gang Shinobi -auto=@combatdamaged(opponent) from(this):ability$!name(discard 2 cards) target(<2>*|myhand) reject!$ opponent +auto=@combatdamagefoeof(player) from(this):ability$!name(discard 2 cards) target(<2>*|myhand) reject!$ opponent +auto=@combatdamageof(player) from(this):ability$!name(discard 2 cards) target(<2>*|myhand) reject!$ controller autohand={3}{B}{N}:ninjutsu text=Ninjutsu {3}{B} ({3}{B}, Return an unblocked attacker you control to hand: Put this card onto the battlefield from your hand tapped and attacking.) -- Whenever Okiba-Gang Shinobi deals combat damage to a player, that player discards two cards. mana={3}{B}{B} @@ -62485,6 +69203,13 @@ power=3 toughness=3 [/card] [card] +name=Omniscience +auto=lord(*[-land]|myhand) zerocast forcedalive +text=You may cast nonland cards from your hand without paying their mana costs. +mana={7}{U}{U}{U} +type=Enchantment +[/card] +[card] name=Ondu Cleric auto=may life:type:ally:mybattlefield controller auto=@movedTo(other ally|myBattlefield):may life:type:ally:mybattlefield controller @@ -62637,7 +69362,8 @@ type=Artifact name=Oona's Blackguard abilities=flying auto=@movedto(other rogue|myBattlefield):all(trigger[to]) counter(1/1,1) -auto=@combatdamaged(opponent) from(creature[counter{1/1.1}]|mybattlefield):ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@combatdamagefoeof(player) from(creature[counter{1/1.1}]|mybattlefield):ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@combatdamageof(player) from(creature[counter{1/1.1}]|mybattlefield):ability$!name(discard) target(*|myhand) reject!$ controller text=Flying -- Each other Rogue creature you control enters the battlefield with an additional +1/+1 counter on it. -- Whenever a creature you control with a +1/+1 counter on it deals combat damage to a player, that player discards a card. mana={1}{B} type=Creature @@ -62784,6 +69510,20 @@ power=2 toughness=2 [/card] [card] +name=Opaline Unicorn +auto={T}:Add{G} +auto={T}:Add{W} +auto={T}:Add{U} +auto={T}:Add{B} +auto={T}:Add{R} +text={T}: Add one mana of any color to your mana pool. +mana={3} +type=Artifact Creature +subtype=Unicorn +power=1 +toughness=2 +[/card] +[card] name=Open the Vaults auto=moveTo(myBattlefield) all(artifact,enchantment|myGraveyard) auto=moveTo(opponentBattlefield) all(artifact,enchantment|opponentGraveyard) @@ -62805,7 +69545,7 @@ toughness=3 name=Ophidian Eye abilities=flash target=creature -auto=@damaged(opponent) from(mytgt):may draw:1 controller +auto=@damagefoeof(player) from(mytgt):may draw:1 controller text=Flash (You may cast this spell any time you could cast an instant.) -- Enchant creature -- Whenever enchanted creature deals damage to an opponent, you may draw a card. mana={2}{U} type=Enchantment @@ -62845,6 +69585,15 @@ mana={1}{B}{B} type=Enchantment [/card] [card] +name=Opulent Palace +auto=tap +auto={T}:Add{B} +auto={T}:Add{G} +auto={T}:Add{U} +text=Opulent Palace enters the battlefield tapped. -- {T}: Add {B}, {G}, or {U} to your mana pool. +type=Land +[/card] +[card] name=Oracle of Nectars auto={X}{T}:life:X text={X}, {T}: You gain X life. @@ -62886,6 +69635,17 @@ power=1 toughness=1 [/card] [card] +name=Orator of Ojutai +abilities=defender,flying +auto=if type(dragon|mybattlefield)~morethan~0 then choice draw:1 controller else if type(dragon|myhand)~morethan~0 then choice draw:1 controller +text=As an additional cost to cast Orator of Ojutai, you may reveal a Dragon card from your hand. -- Defender, flying -- When Orator of Ojutai enters the battlefield, if you revealed a Dragon card or controlled a Dragon as you cast Orator of Ojutai, draw a card. +mana={1}{W} +type=Creature +subtype=Bird Monk +power=0 +toughness=4 +[/card] +[card] name=Oraxid abilities=Protection from red text=Protection from red @@ -62946,6 +69706,16 @@ power=2 toughness=2 [/card] [card] +name=Orc Sureshot +auto=@movedTo(other creature|myBattlefield):target(creature|opponentbattlefield) -1/-1 ueot +text=Whenever another creature enters the battlefield under your control, target creature an opponent controls gets -1/-1 until end of turn. +mana={3}{B} +type=Creature +subtype=Orc Archer +power=4 +toughness=2 +[/card] +[card] name=Orcish Artillery auto={T}:damage:2 target(creature,player) && damage:3 controller text={T}: Orcish Artillery deals 2 damage to target creature or player and 3 damage to you. @@ -63174,8 +69944,8 @@ toughness=4 [card] name=Order of Yawgmoth abilities=fear -auto=@damaged(opponent) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent -auto=@damaged(controller) from(this):reject target(*|myhand) +auto=@damagefoeof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@damageof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ controller text=Fear (This creature can't be blocked except by artifact creatures and/or black creatures.) -- Whenever Order of Yawgmoth deals damage to a player, that player discards a card. mana={2}{B}{B} type=Creature @@ -63235,6 +70005,14 @@ power=2 toughness=2 [/card] [card] +name=Oreskos Swiftclaw +mana={1}{W} +type=Creature +subtype=Cat Warrior +power=3 +toughness=1 +[/card] +[card] name=Organ Grinder auto={T}{E(*|mygraveyard)}{E(*|mygraveyard)}{E(*|mygraveyard)}:life:-3 target(player) text={T}, Exile three cards from your graveyard: Target player loses 3 life. @@ -63248,7 +70026,7 @@ toughness=1 name=Orgg abilities=trample auto=cantbeblockerof(creature[white;power>=3]) -auto=aslongas(creature[power>=3;-tapped]|opponentbattlefield]) cantattack +auto=aslongas(creature[power>=3;-tapped]|opponentbattlefield) cantattack text=Trample -- Orgg can't attack if defending player controls an untapped creature with power 3 or greater. -- Orgg can't block creatures with power 3 or greater. mana={3}{R}{R} type=Creature @@ -63558,6 +70336,17 @@ mana={3}{B} type=Sorcery [/card] [card] +name=Outland Colossus +abilities=oneblocker +auto=this(cantargetcard(*[-renown]) transforms((,newability[@combatdamaged(player) from(this):counter(1/1.6) && becomes(renown) forever])) +text=Renown 6 (When this creature deals combat damage to a player, if it isn't renowned, put six +1/+1 counters on it and it becomes renowned.) -- Outland Colossus can't be blocked by more than one creature. +mana={3}{G}{G} +type=Creature +subtype=Giant +power=6 +toughness=6 +[/card] +[card] name=Outrage Shaman auto=damage:type:manar target(creature) text=Chroma - When Outrage Shaman enters the battlefield, it deals damage to target creature equal to the number of red mana symbols in the mana costs of permanents you control. @@ -63579,7 +70368,7 @@ toughness=2 [/card] [card] name=Overbeing of Myth -auto=foreach(*|myhand) 1/1 +anyzone=type:*:myhand/type:*:myhand cdaactive auto=@each my draw:draw:1 text=Overbeing of Myth's power and toughness are each equal to the number of cards in your hand. -- At the beginning of your draw step, draw an additional card. mana={GU}{GU}{GU}{GU}{GU} @@ -63635,7 +70424,7 @@ subtype=Swamp Forest [card] name=Overgrowth target=land -auto=@tappedformana(mytgt):Add{G}{G} targetcontroller +auto=teach(land) transforms((,newability[produceextra:{G}{G}])) text=Enchant land (Target a land as you cast this. This card enters the battlefield attached to that land.) -- Whenever enchanted land is tapped for mana, its controller adds {G}{G} to his or her mana pool (in addition to the mana the land produces). mana={2}{G} type=Enchantment @@ -63724,7 +70513,7 @@ type=Instant [/card] [card] name=Overwhelming Stampede -auto=all(creature|mybattlefield) power:highest:creature:mybattlefield/power:highest:creature:mybattlefield +auto=lord(creature|mybattlefield) power:highest:creature:mybattlefield/power:highest:creature:mybattlefield auto=all(creature|mybattlefield) trample text=Until end of turn, creatures you control gain trample and get +X/+X, where X is the greatest power among creatures you control. (If a creature you control 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.) mana={3}{G}{G} @@ -63832,7 +70621,7 @@ type=Sorcery [/card] [card] name=Pack Rat -auto=foreach(creature[rat]|mybattlefield) 1/1 +anyzone=type:rat:mybattlefield/type:rat:mybattlefield cdaactive auto={2}{B}{discard(*|myhand)}:token(253624) 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} @@ -63880,7 +70669,7 @@ toughness=2 [/card] [card] name=Pain Magnification -auto=@damaged(opponent) restriction{compare(thatmuch)~morethan~2}:ability$!reject notatarget(*|myhand)!$ opponent +auto=@damagefoeof(player) restriction{compare(thatmuch)~morethan~2}:ability$!reject notatarget(*|myhand)!$ opponent text=Whenever an opponent is dealt 3 or more damage by a single source, that player discards a card. mana={1}{B}{R} type=Enchantment @@ -63937,6 +70726,25 @@ power=5 toughness=4 [/card] [card] +name=Palace Familiar +abilities=flying +auto=@movedto(this|graveyard) from(mybattlefield):draw:1 +text=Flying -- When Palace Familiar dies, draw a card. +mana={1}{U} +type=Creature +subtype=Bird +power=1 +toughness=1 +[/card] +[card] +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. +mana={3}{B}{B} +type=Enchantment +[/card] +[card] name=Paladin en-Vec abilities=first strike,protection from black,protection from red text=First strike, protection from black and from red (This creature deals combat damage before creatures without first strike. It can't be blocked, targeted, dealt damage, or enchanted by anything black or red.) @@ -64057,7 +70865,7 @@ toughness=4 [/card] [card] name=Pallimud -auto=foreach(land[tapped]|opponentBattlefield) 1/0 +anyzone=type:land[tapped]:opponentbattlefield/3 cdaactive text=As Pallimud enters the battlefield, choose an opponent. -- Pallimud's power is equal to the number of tapped lands the chosen player controls. mana={2}{R} type=Creature @@ -64174,12 +70982,68 @@ subtype=Equipment [/card] [card] name=Paradise Plume +alias=1000 auto=chooseacolor transforms((,newability[{T}:add{chosencolor}],newability[@movedto(*[chosencolor]|stack):life:1 controller])) forever chooseend text=As Paradise Plume enters the battlefield, choose a color. -- Whenever a player casts a spell of the chosen color, you may gain 1 life. -- {T}: Add one mana of the chosen color to your mana pool. mana={4} type=Artifact [/card] [card] +name=Paragon of Eternal Wilds +auto=lord(other creature[green]|myBattlefield) 1/1 +auto={G}{T}:target(other creature[green]|myBattlefield):trample ueot +text=Other green creatures you control get +1/+1. -- {G}{T}: Another target green creature you control gains trample until end of turn. +mana={3}{G} +type=Creature +subtype=Human Druid +power=2 +toughness=2 +[/card] +[card] +name=Paragon of Fierce Defiance +auto=lord(other creature[red]|myBattlefield) 1/1 +auto={R}{T}:target(other creature[red]|myBattlefield):haste ueot +text=Other red creatures you control get +1/+1. -- {R}{T}: Another target red creature you control gains haste until end of turn. +mana={3}{R} +type=Creature +subtype=Human Warrior +power=2 +toughness=2 +[/card] +[card] +name=Paragon of Gathering Mists +auto=lord(other creature[blue]|myBattlefield) 1/1 +auto={U}{T}:target(other creature[blue]|myBattlefield):flying ueot +text=Other blue creatures you control get +1/+1. -- {G}{T}: Another target blue creature you control gains flying until end of turn. +mana={3}{U} +type=Creature +subtype=Human Wizard +power=2 +toughness=2 +[/card] +[card] +name=Paragon of New Dawns +auto=lord(other creature[white]|myBattlefield) 1/1 +auto={W}{T}:target(other creature[white]|myBattlefield):vigilance ueot +text=Other white creatures you control get +1/+1. -- {W}{T}: Another target white creature you control gains vigilance until end of turn. +mana={3}{W} +type=Creature +subtype=Human Soldier +power=2 +toughness=2 +[/card] +[card] +name=Paragon of Open Graves +auto=lord(other creature[black]|myBattlefield) 1/1 +auto={1}{B}{T}:target(other creature[black]|myBattlefield):deathtouch ueot +text=Other black creatures you control get +1/+1. -- {1}{B}{T}: Another target black creature you control gains deathtouch until end of turn. +mana={3}{B} +type=Creature +subtype=Skeleton Warrior +power=2 +toughness=2 +[/card] +[card] name=Paragon of the Amesha abilities=first strike auto={W}{U}{B}{R}{G}:3/3 && transforms((Angel Creature,flying,lifelink)) ueot @@ -64211,7 +71075,7 @@ type=Artifact [card] name=Parallax Nexus auto=fading:5 -auto={C(0/0,-1,Fade)}:target(opponent) ability$!name(exile card from hand) (blink)forsrc target(*|myhand)!$ targetedplayer +auto={C(0/0,-1,Fade)}:target(opponent) ability$!name(exile card from hand) hand(blink)forsrc target(*|myhand)!$ targetedplayer text=Fading 5 (This enchantment enters the battlefield with five fade counters on it. At the beginning of your upkeep, remove a fade counter from it. If you can't, sacrifice it.) -- Remove a fade counter from Parallax Nexus: Target opponent exiles a card from his or her hand. Activate this ability only any time you could cast a sorcery. -- When Parallax Nexus leaves the battlefield, each player returns to his or her hand all cards he or she owns exiled with Parallax Nexus. mana={2}{B} type=Enchantment @@ -64249,6 +71113,13 @@ mana={3}{G}{G} type=Sorcery [/card] [card] +name=Parallel Lives +abilities=tokenizer +text=If an effect would put one or more tokens onto the battlefield under your control, it puts twice that many of those tokens onto the battlefield instead. +mana={3}{G} +type=Enchantment +[/card] +[card] name=Paralyze target=creature auto=tap @@ -64441,6 +71312,14 @@ type=Instant subtype=Arcane [/card] [card] +name=Path of Bravery +auto=this(variable{abundantlife}) lord(creature|mybattlefield) 1/1 +auto=@each my blockers:life:type:creature[attacking]|mybattlefield controller +text=Enchantment. -- As long as your life total is greater than or equal to your starting life total, creatures you control get +1/+1. -- Whenever one or more creatures you control attack, you gain life equal to the number of attacking creatures. +mana={2}{W} +type=Enchantment +[/card] +[card] name=Path of Peace target=creature auto=destroy @@ -64509,6 +71388,77 @@ power=1 toughness=1 [/card] [card] +name=Patron of the Akki +other={kgoblin} name(Goblin Offering) +abilities=offering +auto=@combat(attacking) source(this):all(creature[attacking]) 2/0 ueot +text=Goblin offering (You may cast this card any time you could cast an instant by sacrificing a Goblin and paying the difference in mana costs between this and the sacrificed Goblin. Mana cost includes color.) -- Whenever Patron of the Akki attacks, creatures you control get +2/+0 until end of turn. +mana={4}{R}{R} +type=Legendary Creature +subtype=Spirit +power=5 +toughness=5 +[/card] +[card] +name=Patron of the Kitsune +other={kfox} name(Fox Offering) +abilities=offering +auto=@each blockers:may life:type:creature[attacking]:battlefield controller +text=Fox offering (You may cast this card any time you could cast an instant by sacrificing a Fox and paying the difference in mana costs between this and the sacrificed Fox. Mana cost includes color.) -- Whenever a creature attacks, you may gain 1 life. +mana={4}{W}{W} +type=Legendary Creature +subtype=Spirit +power=5 +toughness=6 +[/card] +[card] +name=Patron of the Moon +other={kmoonfolk} name(Moonfolk Offering) +abilities=flying,offering +auto={1}:name(put 2 lands in play) moveto(mybattlefield) and!(tap)! notatarget(land|myhand) +text=Moonfolk offering (You may cast this card any time you could cast an instant by sacrificing a Moonfolk and paying the difference in mana costs between this and the sacrificed Moonfolk. Mana cost includes color.) -- Flying -- {1}: Put up to two land cards from your hand onto the battlefield tapped. +mana={5}{U}{U} +type=Legendary Creature +subtype=Spirit +power=5 +toughness=4 +[/card] +[card] +name=Patron of the Nezumi +other={krat} name(Rat Offering) +abilities=offering +auto=@movedto(*|opponentgraveyard) from(battlefield):life:-1 opponent +text=Rat offering (You may cast this card any time you could cast an instant by sacrificing a Rat and paying the difference in mana costs between this and the sacrificed Rat. Mana cost includes color.) -- Whenever a permanent is put into an opponent's graveyard, that player loses 1 life. +mana={5}{B}{B} +type=Legendary Creature +subtype=Spirit +power=6 +toughness=6 +[/card] +[card] +name=Patron of the Orochi +other={ksnake} name(Snake Offering) +abilities=offering +auto={T}:name(untap all green creatures and forests) untap all(forest) && untap all(creature[green]) limit:1 +text=Snake offering (You may cast this card any time you could cast an instant by sacrificing a Snake and paying the difference in mana costs between this and the sacrificed Snake. Mana cost includes color.) -- {T}: Untap all Forests and all green creatures. Activate this ability only once each turn. +mana={6}{G}{G} +type=Legendary Creature +subtype=Spirit +power=7 +toughness=7 +[/card] +[card] +name=Patron of the Valiant +abilities=flying +auto=choice all(creature[counter{1/1}|mybattlefield) counter(1/1) +text=Flying -- When Patron of the Valiant enters the battlefield, put a +1/+1 counter on each creature you control with a +1/+1 counter on it. +mana={3}{W}{W} +type=Creature +subtype=Angel +power=4 +toughness=4 +[/card] +[card] name=Patron of the Wild facedown={3} autofacedown={2}{G}:morph @@ -64611,6 +71561,15 @@ mana={W} type=Sorcery [/card] [card] +name=Peak Eruption +target=mountain +auto=destroy +auto=Damage:3 targetController +text=Destroy target Mountain. Peak Eruption deals 3 damage to that land's controller. +mana={2}{R} +type=Sorcery +[/card] +[card] name=Pearl Dragon abilities=flying auto={1}{W}:0/1 @@ -64622,8 +71581,20 @@ power=4 toughness=4 [/card] [card] +name=Pearl Lake Ancient +abilities=flash,nofizzle +auto=@movedTo(*[-creature]|mystack):1/1 ueot +auto={H(land|myBattlefield)}{H(land|myBattlefield)}{H(land|myBattlefield)}: moveto(ownerhand) +text=Flash. -- Pearl Lake Ancient can't be countered. -- Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) -- Return three lands you control to their owner's hand: Return Pearl Lake Ancient to its owner's hand. +mana={5}{U}{U} +type=Creature +subtype=Leviathan +power=6 +toughness=7 +[/card] +[card] name=Pearl Medallion -auto=lord(*[white]|myhand) altercost(colorless,-1) +auto=lord(*[white]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) text=White spells you cast cost {1} less to cast. mana={2} type=Artifact @@ -64648,9 +71619,8 @@ toughness=2 name=Peat Bog auto=tap auto=counter(0/0,2,Depletion) -auto={T}{C(0/0,-1,Depletion)}:Add{B}{B} -auto=@tapped(this):bury all(peat bog[-counter{0/0.1.Depletion}]|myBattlefield) -auto=this(counter{0/0.1.Depletion}<1) {0}:sacrifice all(this) +auto=this(counter{0/0,1,Depletion}>1) {T}{C(0/0,-1,Depletion)}:Add{B}{B} +auto=this(counter{0/0,1,Depletion}=1) {T}{C(0/0,-1,Depletion)}:Add{B}{B} && sacrifice text=Peat Bog enters the battlefield tapped with two depletion counters on it. -- {T}, Remove a depletion counter from Peat Bog: Add {B}{B} to your mana pool. If there are no depletion counters on Peat Bog, sacrifice it. type=Land [/card] @@ -64782,6 +71752,14 @@ type=Artifact subtype=Equipment [/card] [card] +name=Pensive Minotaur +mana={2}{R} +type=Creature +subtype=Minotaur Warrior +power=2 +toughness=3 +[/card] +[card] name=Pentad Prism abilities=sunburst auto=counter(0/0,sunburst,charge) @@ -64796,6 +71774,7 @@ type=Artifact [/card] [card] name=Pentarch Paladin +alias=1000 abilities=flanking auto=chooseacolor {W}{W}{T}:destroy target(*[chosencolor]) chooseend text=Flanking (Whenever a creature without flanking blocks this creature, the blocking creature gets -1/-1 until end of turn.) -- As Pentarch Paladin enters the battlefield, choose a color. -- {W}{W}, {T}: Destroy target permanent of the chosen color. @@ -64807,6 +71786,8 @@ toughness=3 [/card] [card] name=Pentarch Ward +alias=1000 +abilities=auraward target=creature auto=chooseacolor teach(creature) protection from(*[chosencolor]) chooseend auto=draw:1 @@ -64957,6 +71938,13 @@ power=0 toughness=4 [/card] [card] +name=Perilous Vault +auto={5}{T}{E}:moveTo(exile) all(*[-land]|battlefield) +text={5},{T}, exile Perilous Vault: Exile all nonland permanents. +mana={4} +type=Artifact +[/card] +[card] name=Perimeter Captain abilities=defender auto=@combat(blocking) source(creature[defender]|mybattlefield):life:2 controller @@ -65083,7 +72071,7 @@ toughness=6 [/card] [card] name=Pestilence Rats -auto=foreach(other rat) 1/0 +anyzone=othertype:rat:battlefield/3 cdaactive text=Pestilence Rats's power is equal to the number of other Rats on the battlefield. (For example, as long as there are two other Rats on the battlefield, Pestilence Rats's power and toughness are 2/3.) mana={2}{B} type=Creature @@ -65172,12 +72160,12 @@ subtype=Golem power=4 toughness=2 [/card] -##the cantlose on phage only last until the ability checks if she was played from hand enjoy :) [card] name=Phage the Untouchable auto=ifnot casted(this) then wingame opponent auto=@combatdamaged(creature) from(this):all(trigger[to]) bury -auto=@combatdamaged(player) from(this):winGame controller +auto=@combatdamagefoeof(player) from(this):winGame controller +auto=@combatdamageof(player) from(this):winGame opponent text=When Phage the Untouchable enters the battlefield, if you didn't cast it from your hand, you lose the game. Whenever Phage deals combat damage to a creature, destroy that creature. It can't be regenerated. -- Whenever Phage deals combat damage to a player, that player loses the game. mana={3}{B}{B}{B}{B} type=Legendary Creature @@ -65186,6 +72174,16 @@ power=4 toughness=4 [/card] [card] +name=Phalanx Leader +auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):counter(1/1,1) all(creature|mybattlefield) +text=Heroic - Whenever you cast a spell that targets Phalanx Leader, put a+1/+1 counter on each creature you control. +mana={W}{W} +type=Creature +subtype=Human Soldier +power=1 +toughness=1 +[/card] +[card] name=Phantasmal Abomination abilities=defender auto=@targeted(this):sacrifice @@ -65453,6 +72451,46 @@ power=2 toughness=0 [/card] [card] +name=Pharika's Chosen +abilities=deathtouch +text=Deathtouch (Any amount of damage this deals to a creature is enough to destroy it.) +mana={B} +type=Creature +subtype=Snake +power=1 +toughness=1 +[/card] +[card] +name=Pharika's Cure +target=creature +auto=Damage:2 +auto=life:2 controller +text=Pharika's Cure deals 2 damage to target creature and you gain 2 life. +mana={B}{B} +type=Instant +[/card] +[card] +name=Pharika's Disciple +abilities=deathtouch +auto=this(cantargetcard(*[-renown]) transforms((,newability[@combatdamaged(player) from(this):counter(1/1) && becomes(renown) forever])) +text=Deathtouch (Any amount of damage this deals to a creature is enough to destroy it.) -- Renown 1 (When this creature deals combat damage to a player, if it isn't renowned, put a +1/+1 counter on it and it becomes renowned.) +mana={3}{G} +type=Creature +subtype=Centaur Warrior +power=2 +toughness=3 +[/card] +[card] +name=Pharika's Mender +auto=may moveTo(myhand) target(creature,enchantment|mygraveyard) +text=When Pharika's Mender enters the battlefield, you may return target creature or enchantment card from your graveyard to your hand. +mana={3}{B}{G} +type=Creature +subtype=Gorgon +power=4 +toughness=3 +[/card] +[card] name=Phelddagrif auto={G}:trample && token(Hippo,Creature Hippo,1/1,green) && moveTo(opponentBattlefield) all(hippo[token]|myBattlefield) auto={W}:flying && life:2 opponent @@ -65478,6 +72516,14 @@ power=4 toughness=7 [/card] [card] +name=Pheres-Band Centaur +mana={4}{G} +type=Creature +subtype=Centaur Warrior +power=3 +toughness=7 +[/card] +[card] name=Pheres-Band Raiders auto=@untapped(this):name(pay 2G for 3/3 Centaur) pay[[{2}{G}]] name(Pay 2G) token(Centaur,Enchantment Creature Centaur,3/3,green) controller text=Inspired -- Whenever Pheres-Band Raiders becomes untapped, you may pay {2}{G}. If you do, put a 3/3 green Centaur enchantment creature token onto the battlefield. @@ -65488,6 +72534,16 @@ power=5 toughness=5 [/card] [card] +name=Pheres-Band Thunderhoof +auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):counter(1/1,2) +text=Heroic —- Whenever you cast a spell that targets Pheres-Band Thunderhoof, put two +1/+1 counters on Pheres-Band Thunderhoof. +mana={4}{G} +type=Creature +subtype=Centaur Warrior +power=3 +toughness=4 +[/card] +[card] name=Pheres-Band Tromper auto=@untapped(this):counter(1/1) text=Inspired -- Whenever Pheres-Band Tromper becomes untapped, put a +1/+1 counter on it. @@ -65498,6 +72554,19 @@ power=3 toughness=3 [/card] [card] +name=Pheres-Band Warchief +abilities=vigilance,trample +auto=lord(other Centaur|myBattlefield) 1/1 +auto=lord(other Centaur|myBattlefield) vigilance +auto=lord(other Centaur|myBattlefield) trample +text=Vigilance, trample -- Other Centaur creatures you control get +1/+1 and have vigilance and trample. +mana={3}{G} +type=Creature +subtype=Centaur Warrior +power=3 +toughness=3 +[/card] +[card] name=Phobian Phantasm abilities=flying,fear auto=cumulativeupcost[{B}] sacrifice @@ -65931,8 +73000,8 @@ type=Sorcery [/card] [card] name=Phyrexian Tyranny -auto=@drawn(opponent):name(pay or lifeloss) ability$!name(pay or lifeloss) pay[[{2}]] name(pay 2 mana) donothing?life:-2!$ opponent -auto=@drawn(controller):name(pay or lifeloss) ability$!name(pay or lifeloss) pay[[{2}]] name(pay 2 mana) donothing?life:-2!$ controller +auto=@drawfoeof(player):name(pay or lifeloss) ability$!name(pay or lifeloss) pay[[{2}]] name(pay 2 mana) donothing?life:-2!$ opponent +auto=@drawof(player):name(pay or lifeloss) ability$!name(pay or lifeloss) pay[[{2}]] name(pay 2 mana) donothing?life:-2!$ controller text=Whenever a player draws a card, that player loses 2 life unless he or she pays {2}. mana={U}{B}{R} type=Enchantment @@ -66001,6 +73070,27 @@ power=1 toughness=1 [/card] [card] +name=Phytotitan +autograveyard=@movedTo(this|graveyard) from(myBattlefield):phaseaction[my upkeep once]:moveTo(myBattlefield) and!(tap)! +text=When Phytotitan dies, return it to the battlefield tapped under its owner's control at the beginning of his or her next upkeep. +mana={4}{G}{G} +type=Creature +subtype=Plant Elemental +power=7 +toughness=2 +[/card] +[card] +name=Pia and Kiran Nalaar +auto=choice token(Thopter,Artifact Creature Thopter,1/1,flying)*2 +auto={2}{R}{S(artifact|mybattlefield)}:damage:2 target(creature,player) +text=When Pia and Kiran Nalaar enters the battlefield, put two 1/1 colorless Thopter artifact creature tokens with flying onto the battlefield. -- {2}{R}, Sacrifice an artifact: Pia and Kiran Nalaar deals 2 damage to target creature or player. +mana={2}{R}{R} +type=Legendary Creature +subtype=Human Artificer +power=2 +toughness=2 +[/card] +[card] name=Pianna, Nomad Captain auto=@combat(attacking) source(this):all(creature[attacking]) 1/1 ueot text=Whenever Pianna, Nomad Captain attacks, attacking creatures get +1/+1 until end of turn. @@ -66061,6 +73151,16 @@ power=1 toughness=1 [/card] [card] +name=Pilgrim of the Fires +abilities=first strike,trample +text=First strike, Trample +mana={7} +type=Artifact Creature +subtype=Golem +power=6 +toughness=4 +[/card] +[card] name=Pilgrim's Eye abilities=flying auto=may moveTo(ownerhand) target(land[basic]|mylibrary) @@ -66100,6 +73200,14 @@ mana={R} type=Sorcery [/card] [card] +name=Pillar of Light +target=creature[toughness>=4] +auto=moveTo(exile) +text=Exile target creature with toughness 4 or greater. +mana={2}{W} +type=Instant +[/card] +[card] name=Pillar of War abilities=defender auto=this(auras >= 1) canattack @@ -66140,6 +73248,15 @@ type=Enchantment subtype=Aura [/card] [card] +name=Pin to the Earth +target=creature +auto=-6/0 +text=Enchant creature -- Enchanted creature gets -6/-0. +mana={1}{U} +type=Enchantment +subtype=Aura +[/card] +[card] name=Pincer Spider abilities=reach kicker={3} @@ -66179,6 +73296,15 @@ text={T}: Add {1} to your mana pool. -- {T}: Add {R} or {G} to your mana pool. P type=Land [/card] [card] +name=Pinion Feast +target=creature[flying]|battlefield +auto=destroy +auto=abliity$!name(Bolster) notatarget(creature[toughness=toughness:lowest:creature:mybattlefield]|mybattlefield) counter(1/1,2)!$ controller +text=Destroy target creature with flying. Bolster 2. (Choose a creature with the least toughness among creatures you control and put two +1/+1 counters on it.) +mana={4}{G} +type=Instant +[/card] +[card] name=Pinnacle of Rage target=<2>creature,player auto=damage:3 @@ -66246,7 +73372,7 @@ toughness=3 [/card] [card] name=Piston Sledge -auto=aslongas(parents) retarget target(creature|mybattlefield) <1 +auto=aslongas(parents) rehook target(creature|mybattlefield) <1 auto=teach(creature) 3/1 auto={S(artifact|mybattlefield)}:equip text=When Piston Sledge enters the battlefield, attach it to target creature you control. -- Equipped creature gets +3/+1. -- Equip - Sacrifice an artifact. @@ -66365,6 +73491,18 @@ power=2 toughness=4 [/card] [card] +name=Pitiless Horde +other={2}{B}{B} name(Dash) +auto=@each my upkeep:life:-2 controller +auto=if paid(alternative) then transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveto(ownerhand) all(this)])) forever +text=At the beginning of your upkeep, you lose 2 life. -- Dash {2}{B}{B} (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={2}{B} +type=Creature +subtype=Orc Berserker +power=5 +toughness=3 +[/card] +[card] name=Pixie Queen abilities=flying auto={G}{G}{G}{T}:flying target(creature) @@ -66437,7 +73575,7 @@ toughness=1 [/card] [card] name=Plague Rats -auto=foreach(plague rats) 1/1 +anyzone=allmyname/allmyname cdaactive text=Plague Rats's power and toughness are each equal to the number of creatures named Plague Rats on the battlefield. mana={2}{B} type=Creature @@ -66447,8 +73585,7 @@ toughness=* [/card] [card] name=Plague Sliver -auto=@each my upkeep:life:-type:sliver:mybattlefield controller -auto=@each opponent upkeep:life:-type:sliver:opponentbattlefield opponent +auto=lord(sliver) transforms((,newabililty[@each my upkeep:damage:1 controller])) text=All Slivers have "At the beginning of your upkeep, this permanent deals 1 damage to you." mana={2}{B}{B} type=Creature @@ -66592,7 +73729,7 @@ type=Sorcery [/card] [card] name=Planar Gate -auto=lord(creature|myhand) altercost(colorless,-2) +auto=lord(creature|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) text=Creature spells you cast cost up to {2} less to cast. mana={6} type=Artifact @@ -66757,6 +73894,7 @@ type=Sorcery [/card] [card] name=Pledge of Loyalty +abilities=auraward target=creature auto=aslongas(*[red]|mybattlefield) protection from red auto=aslongas(*[green]|mybattlefield) protection from green @@ -66864,6 +74002,17 @@ power=11 toughness=11 [/card] [card] +name=Polis Crusher +abilities=Trample, protection from(enchantment) +auto=this(cantargetcard(*[-monstrous]) {4}{R}{G}:becomes(monstrous) forever && counter(1/1,3) && transforms((,newAbility[@combatdamaged(player) source(this[monstrous]):destroy target(enchantment|opponentbattlefield)])) forever +text=Trample, protection from enchantments -- {4}{R}{G}: Monstrosity 3. (If this creature isn't monstrous, put three +1/+1 counters on it and it becomes monstrous.) -- Whenever Polis Crusher deals combat damage to a player, if Polis Crusher is monstrous, destroy target enchantment that player controls. +mana={2}{R}{G} +type=Creature +subtype=Cyclops +power=4 +toughness=4 +[/card] +[card] name=Pollenbright Wings target=creature auto=flying @@ -66925,6 +74074,19 @@ power=2 toughness=7 [/card] [card] +name=Ponyback Brigade +auto=token(Goblin,Creature Goblin,1/1, haste, red) *3 +facedown={3} +autofacedown={2}{R}{W}{B}:morph +autofaceup=token(Goblin,Creature Goblin,1/1, haste, red) *3 +text=When Ponyback Brigade enters the battlefield or is turned face up, put three 1/1 red Goblin creature tokens onto the battlefield. -- Morph {2}{R}{W}{B}: (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) +mana={3}{R}{W}{B} +type=Creature +subtype=Goblin Warrior +power=2 +toughness=2 +[/card] +[card] name=Pooling Venom target=land auto=@tapped(mytgt):life:-2 targetController @@ -67031,6 +74193,17 @@ mana={8} type=Artifact [/card] [card] +name=Possessed Skaab +auto=moveto(myhand) target(*[instant;sorcery]|mygraveyard) +auto=@movedto(this|graveyard) from(battlefield):moveto(exile) +text=When Possessed Skaab enters the battlefield, return target instant, sorcery, or creature card from your graveyard to your hand. -- If Possessed Skaab would die, exile it instead. +mana={3}{U}{B} +type=Creature +subtype=Zombie +power=3 +toughness=2 +[/card] +[card] name=Poultice Sliver auto=lord(sliver) {2}{T}:regenerate target(sliver) text=All Slivers have "{2}, {T}: Regenerate target Sliver." @@ -67270,6 +74443,16 @@ power=3 toughness=2 [/card] [card] +name=Predatory Sliver +auto=lord(sliver|mybattlefield) 1/1 +text=All Sliver creatures you control get +1/+1. +mana={1}{G} +type=Creature +subtype=Sliver +power=1 +toughness=1 +[/card] +[card] name=Predatory Urge target=creature auto=transforms((,newability[{T}:target(creature) dynamicability])) @@ -67321,6 +74504,24 @@ mana={2}{W}{W} type=Sorcery [/card] [card] +name=Press the Advantage +target=creature|battlefield +auto=2/2 ueot +auto=trample ueot +text=Up to two target creatures each get +2/+2 and gain trample until end of turn. +mana={2}{G}{G} +type=Instant +[/card] +[card] +name=Pressure Point +target=creature +auto=tap +auto=draw:1 controller +text=Tap target creature. -- Draw a card. +mana={1}{W} +type=Instant +[/card] +[card] name=Pretender's Claim target=creature auto=@combat(blocked,turnlimited) source(mytgt):tap all(land|opponentbattlefield) @@ -67340,6 +74541,7 @@ type=Sorcery [/card] [card] name=Preyseizer Dragon +abilities=flying auto=may target(other creature|mybattlefield) sacrifice && counter(1/1,2) all(this) auto=@combat(attacking) source(this)::target(creature,player) dynamicability text=Flying -- Devour 2 (As this enters the battlefield, you may sacrifice any number of creatures. This creature enters the battlefield with twice that many +1/+1 counters on it.) -- Whenever Preyseizer Dragon attacks, it deals damage to target creature or player equal to the number of +1/+1 counters on Preyseizer Dragon. @@ -67365,6 +74567,17 @@ mana={1}{R} type=Instant [/card] [card] +name=Prickleboar +auto=this(variable{controllerturn}) 2/0 +auto=this(variable{controllerturn}) first strike +text=As long as it's your turn, Prickleboar gets +2/+0 and has first strike. (It deals combat damage before creatures without first strike.) +mana={4}{R} +type=Creature +subtype=Boar +power=3 +toughness=3 +[/card] +[card] name=Prickly Boggart abilities=fear text=Fear (This creature can't be blocked except by artifact creatures and/or black creatures.) @@ -67418,6 +74631,27 @@ power=2 toughness=1 [/card] [card] +name=Priest of Iroas +auto={3}{W}{S}:destroy target(enchantment) +text={3}{W}, Sacrifice Priest of Iroas: Destroy target enchantment. +mana={R} +type=Creature +subtype=Human Cleric +power=1 +toughness=1 +[/card] +[card] +name=Priest of the Blood Rite +auto=choice token(Demon,Creature Demon,5/5,flying,black) controller +auto=@each my upkeep:life:-2 controller +text=When Priest of the Blood Rite enters the battlefield, put a 5/5 black Demon creature token with flying onto the battlefield. -- At the beginning of your upkeep, you lose 2 life. +mana={3}{B}{B} +type=Creature +subtype=Human Cleric +power=2 +toughness=2 +[/card] +[card] name=Priest of Titania auto={T}:foreach(elf) add{G} text={T}: Add {G} to your mana pool for each Elf on the battlefield. @@ -67477,8 +74711,8 @@ type=Instant [card] name=Primal Clay auto=choice name(enter as 3/3) transforms((,setpower=3,settoughness=3)) forever -auto=choice name(enter as 2/2 fly) transforms((,flying,setpower=2,settoughness=2)) forever -auto=choice name(enter as a wall) transforms((Wall,defender,setpower=1,settoughness=6)) forever +auto=choice name(enter as 2/2 fly) transforms((,newability[flying],setpower=2,settoughness=2)) forever +auto=choice name(enter as a wall) transforms((Wall,newability[defender],setpower=1,settoughness=6)) forever text=As Primal Clay enters the battlefield, it becomes your choice of a 3/3 artifact creature, a 2/2 artifact creature with flying, or a 1/6 Shapeshifter Wall artifact creature with defender. mana={4} type=Artifact Creature @@ -67576,7 +74810,7 @@ subtype=Aura [card] name=Primalcrux abilities=trample -auto=thisforeach(variable{type:manag:mybattlefield}>0) 1/1 +anyzone=type:manag:mybattlefield/type:manag:mybattlefield cdaactive text=Trample -- Chroma - Primalcrux's power and toughness are each equal to the number of green mana symbols in the mana costs of permanents you control. mana={G}{G}{G}{G}{G}{G} type=Creature @@ -67586,7 +74820,7 @@ toughness=* [/card] [card] name=Prime Speaker Zegana -auto=counter(1/1,power:highest:creature:mybattlefield) && draw:power +auto=counter(1/1,otherpower:highest:creature:mybattlefield) && draw:power text=Prime Speaker Zegana enters the battlefield with X +1/+1 counters on it, where X is the greatest power among other creatures you control. -- When Prime Speaker Zegana enters the battlefield, draw cards equal to its power. mana={2}{G}{G}{U}{U} type=Legendary Creature @@ -67595,6 +74829,15 @@ power=1 toughness=1 [/card] [card] +name=Primeval Bounty +auto=@movedTo(creature|mystack):token(Beast,Creature Beast,3/3,green) controller +auto=@movedTo(*[-creature]|mystack):counter(1/1,3) target(creature|mybattlefield) +auto=@movedTo(land|myBattlefield):life:3 controller +text=Enchantment. -- Whenever you cast a creature spell, put a 3/3 green Beast creature token onto the battlefield. -- Whenever you cast a noncreature spell, put three +1/+1 counters on target creature you control. -- Whenever a land enters the battlefield under your control, you gain 3 life. +mana={5}{G} +type=Enchantment +[/card] +[card] name=Primeval Force auto=aslongas(forest|mybattlefield) choice name(sacrifice forests) target(<3>forest|mybattlefield) sacrifice oneshot >2 auto=choice name(sacrifice this) sacrifice all(this) @@ -67679,6 +74922,14 @@ power=5 toughness=4 [/card] [card] +name=Prism Ring +alias=1000 +auto=activatechooseacolor transforms((,newability[@movedto(*[chosencolor]|mystack):life:1 controller])) forever activatechooseend +text=As Prism Ring enters the battlefield, choose a color. -- Whenever you cast a spell of the chosen color, you gain 1 life. +mana={1} +type=Artifact +[/card] +[card] name=Prismatic Boon target=creature auto=choice name(white) protection from white @@ -67821,6 +75072,18 @@ power=4 toughness=4 [/card] [card] +name=Pristine Skywise +abilities=flying +auto=@movedto(*[-creature]|mystack):activatechooseacolor protection from(*[chosencolor]) ueot activatechooseend +auto=@movedto(*[-creature]|mystack):untap +text=Flying -- Whenever you cast a noncreature spell, untap Pristine Skywise. It gains protection from the color of your choice until end of turn. +mana={4}{W}{U} +type=Creature +subtype=Dragon +power=6 +toughness=4 +[/card] +[card] name=Pristine Talisman auto={T}:add{1} && life:1 text={T}: Add {1} to your mana pool.You gain 1 life. @@ -67904,6 +75167,13 @@ power=1 toughness=1 [/card] [card] +name=Profane Memento +auto=@movedto(creature|opponentgraveyard):life:1 controller +text=Whenever a creature card is put into an opponent's graveyard from anywhere, you gain 1 life. +mana={1} +type=Artifact +[/card] +[card] name=Profane Prayers target=creature,player auto=damage:type:cleric:battlefield @@ -67914,8 +75184,8 @@ type=Sorcery [/card] [card] name=Progenitus +abilities=shufflelibrarydeath auto=protection from(*) -autograveyard=moveTo(ownerlibrary) && shuffle text=Protection from everything -- If Progenitus would be put into a graveyard from anywhere, reveal Progenitus and shuffle it into its owner's library instead. mana={W}{W}{U}{U}{B}{B}{R}{R}{G}{G} type=Legendary Creature @@ -67976,6 +75246,17 @@ mana={3}{W} type=Enchantment [/card] [card] +name=Prophet of Kruphix +auto=@each opponent untap:untap all(creature,land|mybattlefield) +auto=lord(creature|myhand) flash forcedalive +text=Untap all creatures and lands you control during each other player's untap step. -- You may cast creature cards as though they had flash. +mana={3}{G}{U} +type=Creature +subtype=Human Wizard +power=2 +toughness=3 +[/card] +[card] name=Prophetic Prism auto=draw:1 auto={1}{T}:add{W} @@ -68045,6 +75326,15 @@ type=Tribal Enchantment subtype=Elf [/card] [card] +name=Prowler's Helm +auto={2}:equip +auto=teach(creature) cantBeBlockedBy(creature[-wall]) +text=Equipped creature can't be blocked except by Walls. -- Equip {2}. +mana={2} +type=Artifact +subtype=Equipment +[/card] +[card] name=Prowling Nightstalker auto=cantbeblockedby(creature[-black]) text=Prowling Nightstalker can't be blocked except by black creatures. @@ -68104,6 +75394,7 @@ toughness=2 [/card] [card] name=Psychic Allergy +alias=1000 auto=upcost[{S(island|mybattlefield)}{S(island|mybattlefield)}] sacrifice auto=chooseacolor transforms((,newability[@each opponent upkeep:damage:type:*[-token&chosencolor]:opponentbattlefield opponent])) chooseend text=As Psychic Allergy enters the battlefield, choose a color. -- At the beginning of each opponent's upkeep, Psychic Allergy deals X damage to that player, where X is the number of nontoken permanents of the chosen color he or she controls. -- At the beginning of your upkeep, destroy Psychic Allergy unless you sacrifice two Islands. @@ -68151,8 +75442,9 @@ subtype=Aura [/card] [card] name=Psychic Possession +target=opponent auto=phasealter(remove,draw,controller) -auto=@drawn(opponent):may draw:1 controller +auto=@drawn(targetedplayer):may draw:1 controller text=Enchant opponent -- Skip your draw step. -- Whenever enchanted opponent draws a card, you may draw a card. mana={2}{U}{U} type=Enchantment @@ -68208,8 +75500,8 @@ type=Enchantment [/card] [card] name=Psychosis Crawler -auto=foreach(*|myhand) 1/1 -auto=@drawn(controller):life:-1 opponent +anyzone=type:*:myhand/type:*:myhand cdaactive +auto=@drawof(player):life:-1 opponent text=Psychosis Crawler's power and toughness are each equal to the number of cards in your hand. - Whenever you draw a card, each opponent loses 1 life. mana={5} type=Artifact Creature @@ -68276,7 +75568,7 @@ subtype=Arcane [card] name=Pulmonic Sliver auto=lord(sliver) flying -auto=lord(sliver) transforms((,newability[@movedTo(this|graveyard) from(battlefield):all(trigger[to]) moveTo(ownerlibrary)])) +auto=lord(sliver) transforms((,newability[librarydeath])) text=All Sliver creatures have flying. -- All Slivers have "If this permanent would be put into a graveyard, you may put it on top of its owner's library instead." mana={3}{W}{W} type=Creature @@ -68406,7 +75698,7 @@ type=Instant name=Punishing Fire target=creature,player auto=damage:2 -autograveyard=@lifed(opponent):pay({R}) moveto(ownerhand) +autograveyard=@lifefoeof(player):pay({R}) moveto(ownerhand) text=Punishing Fire deals 2 damage to target creature or player. -- Whenever an opponent gains life, you may pay {R}. If you do, return Punishing Fire from your graveyard to your hand. mana={1}{R} type=Instant @@ -68467,6 +75759,17 @@ mana={W} type=Instant [/card] [card] +name=Puresteel Paladin +auto=@movedTo(equipment|mybattlefield):may draw:1 controller +auto=lord(equipment|mybattlefield) transforms((,newability[{0}:name(Equip Zero) rehook target(creature|mybattlefield) assorcery restriction{type(artifact|mybattlefield)~morethan~2}])) +text=Whenever an Equipment enters the battlefield under your control, you may draw a card. -- Metalcraft - As long as you control 3 or more artifacts, each Equipment you control has equip {0}. +mana={W}{W} +type=Creature +subtype=Human Knight +power=2 +toughness=2 +[/card] +[card] name=Purge target=creature[black;artifact] auto=bury @@ -68506,6 +75809,17 @@ mana={W} type=Instant [/card] [card] +name=Purphoros, God of the Forge +abilities=indestructible +auto=@movedto(other creature|mybattlefield):damage:2 opponent +auto={2}{R}:all(creature|mybattlefield) 1/0 ueot +auto=this(variable{type:manar}>4) transforms((Creature,setpower=6,settoughness=5)) +text=Indestructible -- As long as your devotion to red is less than five, Purphoros isn't a creature. Whenever another creature enters the battlefield under your control, Purphoros deals 2 damage to each opponent. -- {2}{R}: Creatures you control get +1/+0 until end of turn. +mana={3}{R} +type=Legendary Enchantment +subtype=God +[/card] +[card] name=Purraj of Urborg auto=@combat(attacking) source(this):first strike ueot auto=@movedto(*[black]|stack):pay({B}) counter(1/1,1) @@ -68606,8 +75920,7 @@ toughness=4 [/card] [card] name=Putrid Warrior -auto=@damaged(creature) from(this):all(this) transforms((,newability[chocie all(player) life:-1],newability[choice all(player) life:1])) ueot -auto=@damaged(opponent) from(this):all(this) transforms((,newability[choice all(player) life:-1],newability[choice all(player) life:1])) ueot +auto=@damaged(creature,player) from(this):all(this) transforms((,newability[chocie all(player) life:-1],newability[choice all(player) life:1])) ueot text=Whenever Putrid Warrior deals damage, choose one - each player loses 1 life; or each player gains 1 life. mana={W}{B} type=Creature @@ -68796,6 +76109,27 @@ power=3 toughness=2 [/card] [card] +name=Qal Sisma Behemoth +auto=@combat(attacking) source(this):pay({2}) donothing?removefromcombat && untap +auto=@combat(blocking) source(this):pay({2}) donothing?removefromcombat && untap +text=Qal Sisma Behemoth can't attack or block unless you pay {2}. +mana={2}{R} +type=Creature +subtype=Ogre Warrior +power=5 +toughness=5 +[/card] +[card] +name=Qarsi Sadist +auto=may name(Exploit) sacrifice notatarget(creature|mybattlefield) && transforms((,newability[target(opponent) life:-2],newability[life:2 controller])) forever +text=Exploit (When this creature enters the battlefield, you may sacrifice a creature.) -- When Qarsi Sadist exploits a creature, target opponent loses 2 life and you gain 2 life. +mana={1}{B} +type=Creature +subtype=Human Cleric +power=1 +toughness=3 +[/card] +[card] name=Qasali Pridemage abilities=exalted auto={1}{S}:destroy target(artifact,enchantment) @@ -68909,7 +76243,7 @@ type=Enchantment [card] name=Quest for the Holy Relic auto=@movedTo(creature|mystack):may counter(0/0,1,Quest) all(this) -auto={C(0/0,-5,Quest)}{S}:name(move and attach) target(equipment|mylibrary) transforms((,newability[retarget target(creature|mybattlefield)],newability[moveto(mybattlefield)])) +auto={C(0/0,-5,Quest)}{S}:name(move and attach) target(equipment|mylibrary) moveto(mybattlefield) and!(transforms((,newability[rehook target(creature|mybattlefield)])))! text=Whenever you cast a creature spell, you may put a quest counter on Quest for the Holy Relic. -- Remove five quest counters from Quest for the Holy Relic and sacrifice it: Search your library for an Equipment card, put it onto the battlefield, and attach it to a creature you control. Then shuffle your library. mana={W} type=Enchantment @@ -68985,6 +76319,18 @@ mana={1}{U} type=Instant [/card] [card] +name=Quickling +abilities=flying,flash +auto=aslongas(other creature|mybattlefield) choice notatarget(other creature|mybattlefield) moveTo(ownerhand) oneshot +auto=choice sacrifice +text=Flash (You may cast this spell any time you could cast an instant.) -- Flying -- When Quickling enters the battlefield, sacrifice it unless you return another creature you control to its owner's hand. +mana={1}{U} +type=Creature +subtype=Faerie Rogue +power=2 +toughness=2 +[/card] +[card] name=Quicksand auto={T}:Add{1} auto={T}{S}:-1/-2 target(creature[attacking;-flying]) @@ -69038,6 +76384,13 @@ mana={4}{U} type=Instant [/card] [card] +name=Quiet Contemplation +auto=@movedTo(*[-creature]|mystack):pay({1}) name(tap target creature) target(creature|opponentbattlefield) transforms((,newability[tap],newability[frozen])) +text=Enchantment. -- Whenever you cast a noncreatrue spell, you may pay 1. If you do, tap target creature an opponent controls and it doesn't untap during its controller's next untap step. +mana={2}{U} +type=Enchantment +[/card] +[card] name=Quiet Purity target=enchantment auto=destroy @@ -69051,8 +76404,7 @@ name=Quietus Spike text=Equipped creature has deathtouch. -- Whenever equipped creature deals combat damage to a player, that player loses half his or her life, rounded up. -- Equip {3} mana={3} auto={3}:equip -auto=teach(creature) deathtouch -auto=@combatdamaged(opponent) from(mytgt):life:-halfupopponentlifetotal opponent +auto=teach(creature) transforms((,newability[deathtouch],newability[@combatdamagefoeof(player) from(this):life:-halfupopponentlifetotal opponent],newability[@combatdamageof(player) from(this):life:-halfuplifetotal controller])) type=Artifact subtype=Equipment [/card] @@ -69138,6 +76490,7 @@ toughness=1 [/card] [card] name=Quirion Elves +alias=1000 auto={T}:Add{G} auto=chooseacolor {T}:add{chosencolor} chooseend text=As Quirion Elves enters the battlefield, choose a color. -- {T}: Add {G} to your mana pool. -- {T}: Add one mana of the chosen color to your mana pool. @@ -69148,6 +76501,20 @@ power=1 toughness=1 [/card] [card] +name=Quirion Explorer +auto=this(variable{olandg}>0) {t}:add{g} +auto=this(variable{olandu}>0) {t}:add{u} +auto=this(variable{olandr}>0) {t}:add{r} +auto=this(variable{olandb}>0) {t}:add{b} +auto=this(variable{olandw}>0) {t}:add{w} +text={T}: Add to your mana pool one mana of any color that a land an opponent controls could produce. +mana={1}{G} +type=Creature +subtype=Elf Druid Scout +power=1 +toughness=1 +[/card] +[card] name=Quirion Ranger auto={H(forest|myBattlefield)}:untap target(creature) limit:1 text=Return a Forest you control to its owner's hand: Untap target creature. Activate this ability only once each turn. @@ -69203,6 +76570,17 @@ power=1 toughness=1 [/card] [card] +name=Rabid Bloodsucker +abilities=flying +auto=choice all(player) life:-2 +text=Flying (This creature can't be blocked except by creatures with flying or reach.) -- When Rabid Bloodsucker enters the battlefield, each player loses 2 life. +mana={4}{B} +type=Creature +subtype=Vampire +power=3 +toughness=2 +[/card] +[card] name=Rabid Elephant auto=rampage(2/2,0) text=Whenever Rabid Elephant becomes blocked, it gets +2/+2 until end of turn for each creature blocking it. @@ -69292,6 +76670,13 @@ power=2 toughness=3 [/card] [card] +name=Radiant Fountain +auto=life:2 +auto={T}:Add{1} +text=When Radiant Fountain enters the battlefield, you gain 2 life. -- {T}: Add {1} to your mana pool. +type=Land +[/card] +[card] name=Radiant Kavu auto={R}{G}{W}:fog from(creature[blue]) oneshot && fog from(creature[black]) oneshot text={R}{G}{W}: Prevent all combat damage blue creatures and black creatures would deal this turn. @@ -69302,6 +76687,14 @@ power=3 toughness=3 [/card] [card] +name=Radiant Purge +auto=choice name(creature) moveto(exile) target(creature[multicolor]|battlefield) restriction{type(creature[multicolor]|battlefield)~morethan~0} +auto=choice name(enchantment) moveto(exile) target(enchantment[multicolor]|battlefield) restriction{type(enchantment[multicolor]|battlefield)~morethan~0} +text=Exile target multicolored creature or multicolored enchantment. +mana={1}{W} +type=Instant +[/card] +[card] name=Radiant's Dragoons auto=life:5 auto=upcost[{3}{W};next upkeep] sacrifice @@ -69424,6 +76817,18 @@ power=2 toughness=1 [/card] [card] +name=Rageblood Shaman +abilities=trample +auto=lord(other minotaur|mybattlefield) +1/+1 +auto=lord(other minotaur|mybattlefield) trample +text=Trample. -- Other Minotaur creatures you control get +1/+1 and have trample. +mana={1}{R}{R} +type=Creature +subtype=Minotaur Shaman +power=2 +toughness=3 +[/card] +[card] name=Ragged Veins abilities=flash target=creature @@ -69520,8 +76925,8 @@ toughness=3 [/card] [card] name=Ragemonger -auto=lord(minotaur|myhand) altercost(black,-1) -auto=lord(minotaur|myhand) altercost(red,-1) +auto=lord(minotaur|myhand,mylibrary,mygraveyard,myexile) altercost(black,-1) +auto=lord(minotaur|myhand,mylibrary,mygraveyard,myexile) altercost(red,-1) text=Minotaur spells you cast cost BlackRed less to cast. This effect reduces only the amount of colored mana you pay. (For example, if you cast a Minotaur spell with mana cost 2Red, it costs 2 to cast.) mana={1}{B}{R} type=Creature @@ -69547,6 +76952,14 @@ mana={2}{R} type=Enchantment [/card] [card] +name=Raiders' Spoils +auto=lord(creature|mybattlefield) 1/0 +auto=@combatdamaged(player) from(warrior|mybattlefield):pay({L}) draw:1 controller +text=Creatures you control get +1/+0. -- Whenever a Warrior you control deals combat damage to a player, you may pay 1 life. If you do, draw a card. +mana={3}{B} +type=Enchantment +[/card] +[card] name=Raiding Nightstalker abilities=swampwalk text=Swampwalk @@ -69803,8 +77216,8 @@ toughness=3 [/card] [card] name=Rakdos Ringleader -auto=@combatdamaged(opponent) from(this):discard:1 opponent -auto=@combatdamaged(controller) from(this):discard:1 controller +auto=@combatdamagefoeof(player) from(this):discard:1 opponent +auto=@combatdamageof(player) from(this):discard:1 controller auto={B}:regenerate abilities=first strike text=First strike -- Whenever Rakdos Ringleader deals combat damage to a player, that player discards a card at random. -- {B}: Regenerate Rakdos Ringleader. @@ -69835,8 +77248,8 @@ type=Artifact name=Rakdos the Defiler abilities=flying,trample auto=@combat(attacking) source(this):choice target(*|mybattlefield) sacrifice -auto=@combatdamaged(opponent) from(this):ability$!name(sacrifice) target(*|mybattlefield) sacrifice!$ opponent -auto=@combatdamaged(controller) from(this):ability$!name(sacrifice) target(*|mybattlefield) sacrifice!$ controller +auto=@combatdamagefoeof(player) from(this):ability$!name(sacrifice) target(*|mybattlefield) sacrifice!$ opponent +auto=@combatdamageof(player) from(this):ability$!name(sacrifice) target(*|mybattlefield) sacrifice!$ controller text=Flying, trample -- Whenever Rakdos the Defiler attacks, sacrifice half the non-Demon permanents you control, rounded up. -- Whenever Rakdos deals combat damage to a player, that player sacrifices half the non-Demon permanents he or she controls, rounded up. mana={2}{B}{B}{R}{R} type=Legendary Creature @@ -69904,6 +77317,56 @@ power=3 toughness=4 [/card] [card] +name=Rakshasa Gravecaller +auto=may name(Exploit) sacrifice notatarget(creature|mybattlefield) && token(Zombie,Creature Zombie,2/2,black)*2 +text=Exploit (When this creature enters the battlefield, you may sacrifice a creature.) -- When Rakshasa Gravecaller exploits a creature, put two 2/2 black Zombie creature tokens onto the battlefield. +mana={4}{B} +type=Creature +subtype=Cat Demon +power=3 +toughness=6 +[/card] +[card] +name=Rakshasa Deathdealer +auto={B}{G}:2/2 ueot +auto={B}{G}:regenerate +text={B}{G}: Rakshasa Deathdealer gets +2/+2 until end of turn. -- {B}{G}: Regenerate Rakshasa Deathdealer. +mana={B}{G} +type=Creature +subtype=Cat Demon +power=2 +toughness=2 +[/card] +[card] +name=Rakshasa Vizier +auto=@movedTo(*|exile) from(mygraveyard):counter(1/1,1) +text=Whenever one or more cards are put into exile from your graveyard, put that many +1/+1 counters on Rakasha Vizier. +mana={2}{B}{G}{U} +type=Creature +subtype=Cat Demon +power=4 +toughness=4 +[/card] +[card] +name=Rakshasa's Secret +target=opponent +auto=ability$!reject notatarget(<2>*|myhand)!$ targetedplayer +auto=deplete:2 controller +text=Target opponent discards two cards. Put the top two cards of your library into your graveyard. +mana={2}{B} +type=Sorcery +[/card] +[card] +name=Ral Zarek +auto={C(0/0,1,Loyalty)}:tap target(*) && ability$!untap target(*)!$ controller +auto={C(0/0,-2,Loyalty)}:damage:3 target(creature,player) +auto={C(0/0,-7,Loyalty)}:flipacoin winability turns:+1 controller winabilityend flipend && flipacoin winability turns:+1 controller winabilityend flipend && flipacoin winability turns:+1 controller winabilityend flipend && flipacoin winability turns:+1 controller winabilityend flipend && flipacoin winability turns:+1 controller winabilityend flipend +text=+1: Tap target permanent, then untap another target permanent. -- -2: Ral Zarek deals 3 damage to target creature or player. -- -7: Flip five coins. Take an extra turn after this one for each coin that comes up heads. +mana={2}{U}{R} +type=Planeswalker +subtype=Ral +[/card] +[card] name=Rally auto=lord(creature[blocking]) 1/1 text=Blocking creatures get +1/+1 until end of turn. @@ -69911,6 +77374,14 @@ mana={W}{W} type=Instant [/card] [card] +name=Rally the Ancestors +auto=moveTo(exile) +auto=moveTo(mybattlefield) all(creature[manacost<=X]|mygraveyard) and!( transforms((,newability[phaseaction[my upkeep sourceinplay]:moveto(exile)])) forever )! +text=Return each creature card with converted mana cost X or less from your graveyard to the battlefield. Exile those creatures at the beginning of your next upkeep. Exile Rally the Ancestors. +mana={X}{W}{W} +type=Instant +[/card] +[card] name=Rally the Forces auto=all(creature[attacking]) 1/0 auto=all(creature[attacking]) first strike @@ -70053,6 +77524,17 @@ power=1 toughness=1 [/card] [card] +name=Ramroller +abilities=mustattack +auto=aslongas(other artifact|mybattlefield) 2/0 +text=Ramroller attacks each turn if able. -- Ramroller gets +2/+0 as long as you control another artifact. +mana={3} +type=Artifact Creature +subtype=Juggernaut +power=2 +toughness=3 +[/card] +[card] name=Ramses Overdark auto={T}:destroy target(creature[enchanted]) text={T}: Destroy target enchanted creature. @@ -70335,6 +77817,21 @@ power=5 toughness=3 [/card] [card] +name=Rattleclaw Mystic +facedown={3} +autofacedown={2}:morph +autofaceup=Add{G}{U}{R} +auto={T}:Add{G} +auto={T}:Add{U} +auto={T}:Add{R} +text={T}: Add {G}, {U}, or {R} to your mana pool.-- Morph {2}. (You may cast this card face down as a 2/2 creature for 3. Turn it face up any time for its morph cost.) -- When Rattleclaw Mystic is turned face up, add {G}{U}{R} to your mana pool. +mana={1}{G} +type=Creature +subtype=Human Shaman +power=2 +toughness=1 +[/card] +[card] name=Ravaged Highlands auto=tap auto={T}:Add{R} @@ -70354,6 +77851,15 @@ mana={3}{W} type=Sorcery [/card] [card] +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. +mana={X}{R}{R} +type=Instant +[/card] +[card] name=Ravaging Horde auto=destroy target(land) text=When Ravaging Horde enters the battlefield, destroy target land. @@ -70390,7 +77896,8 @@ toughness=4 name=Raven Guild Master facedown={3} autofacedown={2}{U}{U}:morph -auto=@combatdamaged(player) from(this):deplete:10 opponent +auto=@combatdamagefoeof(player) from(this):deplete:10 opponent +auto=@combatdamageof(player) from(this):deplete:10 controller text=Whenever Raven Guild Master deals combat damage to a player, that player exiles the top ten cards of his or her library. -- Morph {2}{U}{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={1}{U}{U} type=Creature @@ -70462,6 +77969,17 @@ toughness=9 [/card] ###The 2 cards above should stay together (Flip Card)### [card] +name=Ravenous Leucrocota +abilities=vigilance +auto=this(cantargetcard(*[-monstrous]) {6}{G}:becomes(monstrous) forever && counter(1/1,3) +text={6}{G}: Monstrosity 3. (If this creature isn't monstrous, put three +1/+1 counters on it and it becomes monstrous.) +mana={3}{G} +type=Creature +subtype=Beast +power=2 +toughness=4 +[/card] +[card] name=Ravenous Rats auto=target(opponent) ability$!name(discard) target(*|myhand) reject!$ targetedplayer text=When Ravenous Rats enters the battlefield, target opponent discards a card. @@ -70527,6 +78045,15 @@ mana={3}{U} type=Instant [/card] [card] +name=Ray of Dissolution +target=enchantment +auto=destroy +auto=life:3 controller +text=Destroy target enchantment. -- You gain 3 life. +mana={2}{W} +type=Instant +[/card] +[card] name=Ray of Distortion target=artifact,enchantment auto=destroy @@ -70736,6 +78263,14 @@ type=Tribal Instant subtype=Treefolk [/card] [card] +name=Reach of Shadows +target=creature[white;blue;black;red;green] +auto=destroy +text=Destroy target creature that's one or more colors. +mana={4}{B} +type=Instant +[/card] +[card] name=Reach Through Mists auto=draw:1 text=Draw a card. @@ -70895,6 +78430,14 @@ power=1 toughness=1 [/card] [card] +name=Reave Soul +target=creature[power<=3]|battlefield +auto=destroy +text=Destroy target creature with power 3 or less. +mana={1}{B} +type=Sorcery +[/card] +[card] name=Rebel Informer auto=cantbetargetof(*[white]) auto={3}:bottomoflibrary target(rebel[-token]|battlefield) @@ -70951,18 +78494,8 @@ type=Sorcery [card] name=Recantation auto=@each my upkeep:may counter(0/0,1,Verse) -auto=this(counter{0/0.1.Verse}=) {U}{S}:moveTo(ownerhand) target(*|battlefield) -auto=this(counter{0/0.2.Verse}=) {U}{S}:moveTo(ownerhand) target(*|battlefield) -auto=this(counter{0/0.3.Verse}=) {U}{S}:moveTo(ownerhand) target(*|battlefield) -auto=this(counter{0/0.4.Verse}=) {U}{S}:moveTo(ownerhand) target(*|battlefield) -auto=this(counter{0/0.5.Verse}=) {U}{S}:moveTo(ownerhand) target(*|battlefield) -auto=this(counter{0/0.6.Verse}=) {U}{S}:moveTo(ownerhand) target(*|battlefield) -auto=this(counter{0/0.7.Verse}=) {U}{S}:moveTo(ownerhand) target(*|battlefield) -auto=this(counter{0/0.8.Verse}=) {U}{S}:moveTo(ownerhand) target(*|battlefield) -auto=this(counter{0/0.9.Verse}=) {U}{S}:moveTo(ownerhand) target(*|battlefield) -auto=this(counter{0/0.10.Verse}=) {U}{S}:moveTo(ownerhand) target(*|battlefield) -auto=this(counter{0/0.11.Verse}=) {U}{S}:moveTo(ownerhand) target(*|battlefield) -auto=this(counter{0/0.12.Verse}=) {U}{S}:moveTo(ownerhand) target(*|battlefield) +auto=this(counter{0/0.1.Verse}<1) {U}{S}:name(do nothing) donothing +auto=this(counter{0/0.1.Verse}>0) {U}{S}:moveTo(ownerhand) target(*|battlefield) text=At the beginning of your upkeep, you may put a verse counter on Recantation. -- {U}, Sacrifice Recantation: Return up to X target permanents to their owners' hands, where X is the number of verse counters on Recantation. mana={3}{U}{U} type=Enchantment @@ -71020,6 +78553,18 @@ power=2 toughness=2 [/card] [card] +name=Reckless Imp +abilities=flying,cantblock +other={1}{B} name(Dash) +auto=if paid(alternative) then transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveto(ownerhand) all(this)])) forever +text=Flying -- Reckless Imp can't block. -- Dash {1}{B} (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={2}{B} +type=Creature +subtype=Imp +power=2 +toughness=2 +[/card] +[card] name=Reckless Ogre auto=@combat(attackedalone) source(this):3/0 ueot text=Whenever Reckless Ogre attacks alone, it gets +3/+0 until end of turn. @@ -71032,7 +78577,7 @@ toughness=2 [card] name=Reckless One abilities=haste -auto=foreach(goblin) 1/1 +anyzone=type:goblin:battlefield/type:goblin:battlefield cdaactive text=Haste -- Reckless One's power and toughness are each equal to the number of Goblins on the battlefield. mana={3}{R} type=Creature @@ -71100,6 +78645,27 @@ mana={G} type=Instant [/card] [card] +name=Reclamation Sage +auto=may destroy target(artifact,enchantment) +text=When Reclamation Sage enters the battlefield, you may destroy target artifact or enchantment. +mana={2}{G} +type=Creature +subtype=Elf Shaman +power=2 +toughness=1 +[/card] +[card] +name=Reclusive Artificer +abilities=haste +auto=may damage:type:artifact:mybattlefield target(creature) +text=Haste (This creature can attack and {T} as soon as it comes under your control.) -- When Reclusive Artificer enters the battlefield, you may have it deal damage to target creature equal to the number of artifacts you control. +mana={2}{U}{R} +type=Creature +subtype=Human Artificer +power=2 +toughness=3 +[/card] +[card] name=Reclusive Wight auto=@each my upkeep restriction{type(*[-land]|myBattlefield)~morethan~1}:sacrifice text=At the beginning of your upkeep, if you control another nonland permanent, sacrifice Reclusive Wight. @@ -71234,6 +78800,7 @@ type=Sorcery [/card] [card] name=Red Ward +abilities=auraward target=creature auto=protection from red text=Enchant creature -- Enchanted creature has protection from red. This effect doesn't remove Red Ward. @@ -71250,6 +78817,15 @@ mana={1}{W} type=Instant [/card] [card] +name=Reduce in Stature +target=creature|battlefield +auto=teach(creature) becomes(0/2) +text=Enchant creature -- Enchanted creature has base power and toughness 0/2. +mana={2}{U} +type=Enchantment +subtype=Aura +[/card] +[card] name=Reduce to Dreams auto=moveto(ownerhand) all(artifact,enchantment) text=Return all artifacts and enchantments to their owners' hands. @@ -71266,7 +78842,7 @@ toughness=6 [/card] [card] name=Reef Pirates -auto=@damaged(opponent) from(this):deplete:1 opponent +auto=@damagefoeof(player) from(this):deplete:1 opponent text=Whenever Reef Pirates deals damage to an opponent, that player puts the top card of his or her library into his or her graveyard. mana={1}{U}{U} type=Creature @@ -71289,6 +78865,16 @@ power=0 toughness=2 [/card] [card] +name=Reflecting Pool +auto=this(variable{plandg}>0) {t}:add{g} +auto=this(variable{plandu}>0) {t}:add{u} +auto=this(variable{plandr}>0) {t}:add{r} +auto=this(variable{plandb}>0) {t}:add{b} +auto=this(variable{plandw}>0) {t}:add{w} +text={T}: Add to your mana pool one mana of any type that a land you control could produce. +type=Land +[/card] +[card] name=Reflex Sliver auto=lord(sliver) haste text=All Sliver creatures have haste. @@ -71308,11 +78894,20 @@ type=Enchantment subtype=Aura [/card] [card] +name=Refocus +target=creature +auto=untap +auto=draw:1 controller +text=Untap target creature. Draw a card. +mana={1}{U} +type=Instant +[/card] +[card] name=Reforge the Soul auto=reject all(*|hand) auto=draw:7 opponent auto=draw:7 controller -autohand=restriction{miracle} pay[[{1}{R}]] name(Miracle) activate name(Miracle) castcard(normal) +autohand=restriction{miracle} pay[[{1}{R}]] name(Miracle) activate name(Miracle) castcard(restricted) text=Each player discards his or her hand and draws seven cards. -- Miracle {1}{R} (You may cast this card for its miracle cost when you draw it if it's the first card you drew this turn.) mana={3}{R}{R} type=Sorcery @@ -71355,6 +78950,15 @@ power=2 toughness=3 [/card] [card] +name=Regathan Firecat +text= +mana={2}{R} +type=Creature +subtype=Elemental Cat +power=4 +toughness=1 +[/card] +[card] name=Regenerate target=creature auto=regenerate @@ -71579,6 +79183,16 @@ type=Enchantment subtype=Aura [/card] [card] +name=Relic Seeker +auto=this(cantargetcard(*[-renown]) transforms((,newability[@combatdamaged(player) from(this):counter(1/1) && becomes(renown) forever],newability[may moveto(myhand) notatarget(equipment|mylibrary)])) +text=Renown 1 (When this creature deals combat damage to a player, if it isn't renowned, put a +1/+1 counter on it and it becomes renowned.) -- When Relic Seeker becomes renowned, you may search your library for an Equipment card, reveal it, put it into your hand, then shuffle your library. +mana={1}{W} +type=Creature +subtype=Human Soldier +power=2 +toughness=2 +[/card] +[card] name=Reliquary Monk auto=@movedTo(this|mygraveyard) from(battlefield):destroy target(artifact,enchantment) text=When Reliquary Monk dies, destroy target artifact or enchantment. @@ -71596,6 +79210,15 @@ text=You have no maximum hand size. -- {T}: Add {1} to your mana pool. type=Land [/card] [card] +name=Remand +target=*|stack +auto=fizzleto(hand) +auto=draw:1 controller +text=Counter target spell. If that spell is countered this way, put it into its owner's hand instead of into that player's graveyard. -- Draw a card. +mana={1}{U} +type=Instant +[/card] +[card] name=Remembrance auto=@movedTo(creature|graveyard) from(mybattlefield):may all(trigger[to]) transforms((,newability[target(creature[share!name!]|mylibrary) moveTo(myhand)])) text=Whenever a nontoken creature you control dies, you may search your library for a card with the same name as that creature, reveal it, and put it into your hand. If you do, shuffle your library. @@ -71615,9 +79238,8 @@ type=Sorcery name=Remote Farm auto=tap auto=counter(0/0,2,Depletion) -auto={T}{C(0/0,-1,Depletion)}:Add{W}{W} -auto=@tapped(this):bury all(remote farm[-counter{0/0.1.Depletion}]|myBattlefield) -auto=this(counter{0/0.1.Depletion}<1) {0}:sacrifice all(this) +auto=this(counter{0/0,1,Depletion}>1) {T}{C(0/0,-1,Depletion)}:Add{W}{W} +auto=this(counter{0/0,1,Depletion}=1) {T}{C(0/0,-1,Depletion)}:Add{W}{W} && sacrifice text=Remote Farm enters the battlefield tapped with two depletion counters on it. -- {T}, Remove a depletion counter from Remote Farm: Add {W}{W} to your mana pool. If there are no depletion counters on Remote Farm, sacrifice it. type=Land [/card] @@ -71685,6 +79307,15 @@ type=Instant subtype=Arcane [/card] [card] +name=Rending Volley +abilities=nofizzle +target=creature[white;blue]|battlefield +auto=damage:4 +text=Rending Volley can't be countered by spells or abilities. Rending Volley deals 4 damage to target white or blue creature. +mana={R} +type=Instant +[/card] +[card] name=Render Silent target=*|stack auto=fizzle @@ -71771,6 +79402,16 @@ mana={1}{W} type=Instant [/card] [card] +name=Renowned Weaver +auto={1}{G}{S}:token(Spider,Enchantment Creature Spider,1/3,green,reach) +text={1}{G}, Sacrifice Renowned Weaver: Put a 1/3 green Spider enchantment creature token with reach onto the battlefield. (It can block creatures with flying.) +mana={G} +type=Creature +subtype=Human Shaman +power=1 +toughness=1 +[/card] +[card] name=Repay in Kind auto=all(player) lifeset:lowestlifetotal text=Each player's life total becomes the lowest life total among all players. @@ -71894,6 +79535,16 @@ power=5 toughness=5 [/card] [card] +name=Research Assistant +auto={3}{U}{T}:draw:1 && transforms((,newability[target(*|myhand) reject])) forever +text={3}{U}{T}: Draw a card, then discard a card. +mana={1}{U} +type=Creature +subtype=Human Wizard +power=1 +toughness=3 +[/card] +[card] name=Rescind target=* auto=moveTo(ownerhand) @@ -71960,6 +79611,17 @@ mana={1}{G} type=Instant [/card] [card] +name=Resolute Archangel +abilities=flying +auto=if compare(lifetotal)~lessthan~compare(startinglife) then lifeset:startinglife controller +text=Flying. -- When Resolute Archangel enters the battlefield, if your life total is less than your starting life total, it becomes equal to your starting life total. +mana={5}{W}{W} +type=Creature +subtype=Angel +power=4 +toughness=4 +[/card] +[card] name=Resounding Roar target=creature auto=3/3 @@ -72024,6 +79686,14 @@ power=2 toughness=2 [/card] [card] +name=Resupply +auto=life:6 +auto=draw:1 +text=You gain 6 life. -- Draw a card. +mana={5}{W} +type=Instant +[/card] +[card] name=Rest for the Weary target=player auto=life:4 @@ -72033,6 +79703,14 @@ mana={1}{W} type=Instant [/card] [card] +name=Rest in Peace +abilities=mygraveexiler,oppgraveexiler +auto=moveto(exile) all(*|graveyard) +text=When Rest in Peace enters the battlefield, exile all cards from all graveyards. -- If a card or token would be put into a graveyard from anywhere, exile it instead. +mana={1}{W} +type=Enchantment +[/card] +[card] name=Restless Apparition abilities=persist auto={WB}{WB}{WB}:3/3 @@ -72085,6 +79763,13 @@ power=3 toughness=4 [/card] [card] +name=Restore the Peace +auto=all(creature[damager]) moveto(ownerhand) +text=Return each creature that dealt damage this turn to its owner's hand. +mana={1}{W}{U} +type=Instant +[/card] +[card] name=Restrain target=creature[attacking] auto=0/0 && fog from(mytgt) oneshot @@ -72125,8 +79810,7 @@ type=Instant [card] name=Retaliator Griffin abilities=flying -auto=@damaged(controller) from(*|opponentbattlefield):may all(trigger[to]) dynamicability -auto=@damaged(controller) from(*|opponentstack):may all(trigger[to]) dynamicability +auto=@damageof(player) from(*|opponentbattlefield,opponentstack,opponentgraveyard,opponentlibrary,opponentexile):may all(trigger[to]) dynamicability text=Flying -- Whenever a source an opponent controls deals damage to you, you may put that many +1/+1 counters on Retaliator Griffin. mana={1}{R}{G}{W} type=Creature @@ -72203,6 +79887,46 @@ mana={2}{W}{W} type=Instant [/card] [card] +name=Return to the Earth +auto=choice name(artifact) destroy target(artifact|battlefield) restriction{type(artifact|battlefield)~morethan~0} +auto=choice name(enchantment) destroy target(enchantment|battlefield) restriction{type(enchantment|battlefield)~morethan~0} +auto=choice name(Creature with Flying) destroy target(creature[flying]|battlefield) restriction{type(creature[flying]|battlefield)~morethan~0} +text=Destroy target artifact, enchantment, or creature with flying. +mana={3}{G} +type=Instant +[/card] +[card] +name=Returned Centaur +auto=deplete:4 target(player) +text=When Returned Centaur enters the battlefield, target player puts the top four cards of his or her library into his or her graveyard. +mana={3}{B} +type=Creature +subtype=Zombie Centaur +power=2 +toughness=4 +[/card] +[card] +name=Returned Phalanx +abilities=defender +auto={1}{U}:canattack ueot +text=Defender (This creature can't attack.) -- {1}{U}: Returned Phalanx can attack this turn as though it didn't have defender. +mana={1}{B} +type=Creature +subtype=Zombie Soldier +power=3 +toughness=3 +[/card] +[card] +name=Returned Reveler +auto=@movedto(this|graveyard) from(battlefield):deplete:3 controller && deplete:3 opponent +text=When Returned Reveler dies, each player puts the top three cards of his or her library into his or her graveyard. +mana={1}{B} +type=Creature +subtype=Zombie Satyr +power=1 +toughness=3 +[/card] +[card] name=Reveillark abilities=flying other={5}{W} name(Evoke) @@ -72236,6 +79960,13 @@ power=0 toughness=1 [/card] [card] +name=Revel of the Fallen God +auto=token(Satyr,Creature Satyr,2/2,red green,haste)*4 controller +text=Put four 2/2 red and green Satyr creature tokens with haste onto the battlefield. +mana={3}{R}{R}{G}{G} +type=Sorcery +[/card] +[card] name=Revelsong Horn auto={1}{T(other creature|myBattlefield)}{T}:1/1 target(creature) text={1}, {T}, Tap an untapped creature you control: Target creature gets +1/+1 until end of turn. @@ -72244,8 +79975,9 @@ type=Artifact [/card] [card] name=Revenant +alias=1111 abilities=flying -auto=foreach(creature|mygraveyard) 1/1 +anyzone=type:creature:mygraveyard/type:creature:mygraveyard cdaactive text=Flying -- Revenant's power and toughness are each equal to the number of creature cards in your graveyard. mana={4}{B} type=Creature @@ -72276,7 +80008,7 @@ target=creature auto=6/6 auto=trample auto=lure -autohand=restriction{miracle} pay[[{G}]] name(Miracle) activate name(Miracle) castcard(normal) +autohand=restriction{miracle} pay[[{G}]] name(Miracle) activate name(Miracle) castcard(restricted) text=Until end of turn, target creature gets +6/+6 and gains trample, and all creatures able to block it this turn do so. -- Miracle {G} (You may cast this card for its miracle cost when you draw it if it's the first card you drew this turn.) mana={4}{G}{G} type=Sorcery @@ -72328,6 +80060,16 @@ mana={2}{W}{W} type=Enchantment [/card] [card] +name=Reverent Hunter +auto=thisforeach(variable{type:manaG}>0) counter(1/1,1) +text=When Reverent Hunter enters the battlefield, put a number of +1/+1 counters on it equal to your devotion to green. (Each {G} in the mana costs of permanents you control counts toward your devotion to green.) +mana={2}{G} +type=Creature +subtype=Human Archer +power=1 +toughness=1 +[/card] +[card] name=Reverent Mantra other={E(*[white]|myhand)} name(Exile a White Card from Hand) auto=choice name(all creatures gain protection from white) lord(creature) protection from white @@ -72366,6 +80108,18 @@ mana={2}{W} type=Instant [/card] [card] +name=Reviving Melody +auto=alternative @movedto(creature|myhand) source(this):moveto(myhand) target(enchantment|mygraveyard) +auto=alternative @movedto(enchantment|myhand) source(this):moveto(myhand) target(creature|mygraveyard) +other={2}{G} name(Both) +target=creature,enchantment|mygraveyard +auto=moveto(myhand) +text=Choose one or both - Return target creature card from your graveyard to your hand; and/or return target enchantment card from your graveyard to your hand. +otherrestriction=type(creature|mygraveyard)~morethan~0,type(enchantment|mygraveyard)~morethan~0 +mana={2}{G} +type=Sorcery +[/card] +[card] name=Revoke Existence target=artifact,enchantment auto=moveTo(exile) @@ -72449,6 +80203,17 @@ power=3 toughness=3 [/card] [card] +name=Rhox Maulers +abilities=trample +auto=this(cantargetcard(*[-renown]) transforms((,newability[@combatdamaged(player) from(this):counter(1/1.2) && becomes(renown) forever])) +text=Trample (This creature can deal excess combat damage to defending player or planeswalker while attacking.) -- Renown 2 (When this creature deals combat damage to a player, if it isn't renowned, put two +1/+1 counters on it and it becomes renowned.) +mana={4}{G} +type=Creature +subtype=Rhino Soldier +power=4 +toughness=4 +[/card] +[card] name=Rhox Meditant auto=aslongas(*[green]|myBattlefield) draw:1 controller oneshot text=When Rhox Meditant enters the battlefield, if you control a green permanent, draw a card. @@ -72829,6 +80594,14 @@ mana={5} type=Artifact [/card] [card] +name=Ring of Three Wishes +auto=counter(0/0,3,Wish) +auto={5}{T}{C(0/0,-1,Wish)}:moveTo(myHand) notatarget(*|mylibrary) +text=Ring of Three Wishes enters the battlefield with three wish counters on it. -- {5}{T}, Remove a wish counter from Ring of Three Wishes: Search your library for a card and put that card into your hand. Then shuffle your library. +mana={5} +type=Artifact +[/card] +[card] name=Ring of Thune auto={1}:equip auto=vigilance @@ -72859,6 +80632,17 @@ type=Artifact subtype=Equipment [/card] [card] +name=Ringwarden Owl +abilities=flying +auto=@movedTo(*[-creature]|mystack):1/1 ueot +text=Flying (This creature can't be blocked except by creatures with flying or reach.) -- Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) +mana={3}{U}{U} +type=Creature +subtype=Bird +power=3 +toughness=3 +[/card] +[card] name=Riot Control auto=life:type:creature:opponentbattlefield controller auto=preventalldamage to(controller) ueot @@ -72942,6 +80726,17 @@ power=1 toughness=2 [/card] [card] +name=Riptide Chimera +abilities=flying +auto=@each my upkeep:moveTo(ownerhand) notatarget(enchantment|myBattlefield) +text=Flying -- At the beginning of your upkeep, return an enchantment you control to its owner's hand. +mana={2}{U} +type=Enchantment Creature +subtype=Chimera +power=3 +toughness=4 +[/card] +[card] name=Riptide Chronologist auto={U}{S}:activatechooseatype untap all(creature[chosentype]) activatechooseend text={U}, Sacrifice Riptide Chronologist: Untap all creatures of the creature type of your choice. @@ -72976,7 +80771,7 @@ toughness=3 name=Riptide Entrancer facedown={3} autofacedown={U}{U}:morph -auto=@combatdamaged(player) from(this):may moveTo(mybattlefield) target(creature|myBattlefield) && sacrifice all(this) +auto=@combatdamagefoeof(player) from(this):may moveTo(mybattlefield) target(creature|opponentBattlefield) && sacrifice all(this) text=Whenever Riptide Entrancer deals combat damage to a player, you may sacrifice it. If you do, gain control of target creature that player controls. (This effect lasts indefinitely.) -- Morph {U}{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={1}{U}{U} type=Creature @@ -72993,7 +80788,8 @@ type=Land [/card] [card] name=Riptide Pilferer -auto=@combatdamaged(opponent) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@combatdamagefoeof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@combatdamageof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ controller autofacedown={U}:morph facedown={3} text=Whenever Riptide Pilferer deals combat damage to a player, that player discards a card. -- Morph {U} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) @@ -73025,6 +80821,14 @@ power=2 toughness=1 [/card] [card] +name=Rise of the Dark Realms +auto=moveTo(myBattlefield) all(creature|mygraveyard) +auto=moveTo(myBattlefield) all(creature|opponentgraveyard) +text=Put all creature cards from all graveyards onto the battlefield under your control. +mana={7}{B}{B} +type=Sorcery +[/card] +[card] name=Rise of the Hobgoblins auto={RW}:lord(creature[white;red]|myBattlefield) first strike auto=Token(Goblin Soldier,Creature Goblin Soldier,1/1,red white)*x @@ -73161,6 +80965,15 @@ mana={2}{U}{U} type=Sorcery [/card] [card] +name=Rite of the Serpent +target=creature +auto=if cantargetcard(creature[counter{1/1.1}]|battlefield) then token(Snake,Creature Snake,1/1,green) controller +auto=destroy +text=Destroy target creature. If that creature had a +1/+1 counter on it, put a 1/1 green Snake creature token onto the battlefield. +mana={4}{B}{B} +type=Sorcery +[/card] +[card] name=Rites of Flourishing auto=maxplay(land)+1 opponent auto=maxplay(land)+1 @@ -73296,7 +81109,8 @@ toughness=1 [/card] [card] name=River of Tears -auto={t}:name(Add Mana) if type(land[fresh]|mybattlefield)~morethan~0 then add{B} else add{U} +auto=aslongas(land[fresh]|mybattlefield) {T}:add{B} >0 +auto=aslongas(land[fresh]|mybattlefield) {T}:add{U} <1 text={T}: Add {U} to your mana pool. If you played a land this turn, add {B} to your mana pool instead. type=Land [/card] @@ -73311,6 +81125,17 @@ power=2 toughness=1 [/card] [card] +name=Riverwheel Aerialists +abilities=flying +auto=@movedTo(*[-creature]|mystack):1/1 ueot +text=Flying -- Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) -- Whenever Jeskai Elder deals combat damage to a player, you may draw a card. If you do, discard a card. +mana={5}{U} +type=Creature +subtype=Djinn Monk +power=4 +toughness=5 +[/card] +[card] name=Rix Maadi Guildmage auto={B}{R}:name(target creature -1/-1) target(creature[blocking]) -1/-1 ueot auto={B}{R}:name(target controller life -1) target(controller) life:-1 restriction{compare(lifelost)~morethan~0} @@ -73330,6 +81155,15 @@ text={T}: Add {1} to your mana pool. -- {1}{B}{R}, {T}: Each player discards a c type=Land [/card] [card] +name=Roar of Challenge +target=creature +auto=lure ueot +auto=if type(creature[power>=4]|mybattlefield)~morethan~0 then indestructible ueot +text=All creatures able to block target creature this turn do so. -- Ferocious - That creature gains indestructible until end of turn if you control a creature with power 4 or greater. +mana={2}{G} +type=Sorcery +[/card] +[card] name=Roar of the Kha other={2}{W}{W} name(Entwine) auto=if paid(alternative) then all(creature|mybattlefield) 1/1 ueot && untap all(creature|mybattlefield) @@ -73383,6 +81217,14 @@ power=6 toughness=4 [/card] [card] +name=Roast +target=creature[-flying]|battlefield +auto=damage:5 +text=Roast deals 5 damage to target creature without flying. +mana={1}{R} +type=Sorcery +[/card] +[card] name=Robber Fly abilities=flying auto=@combat(blocked,turnlimited) source(this):all(*|opponenthand) transforms((,newability[reject],newability[draw:1])) ueot @@ -73587,6 +81429,15 @@ power=3 toughness=4 [/card] [card] +name=Rogue's Gloves +auto={2}:equip +auto=@damaged(player) from(mytgt):may draw:1 controller +text=Whenever equipped creature deals combat damage to a player, you may draw a card. -- Equip: 2 +mana={2} +type=Artifact +subtype=Equipment +[/card] +[card] name=Rogue's Passage auto={T}:Add{1} auto={4}{T}:unblockable target(creature) @@ -73614,6 +81465,13 @@ mana={2}{R}{R} type=Sorcery [/card] [card] +name=Rollick of Abandon +auto=all(creature) 2/-2 ueot +text=All creatures get +2/-2 until end of turn. +mana={3}{R}{R} +type=Sorcery +[/card] +[card] name=Rolling Earthquake auto=damage:X all(player) auto=damage:X all(creature[-horsemanship]) @@ -73679,7 +81537,7 @@ toughness=2 [/card] [card] name=Ronin Warclub -auto=@movedto(creature|myBattlefield):choice all(trigger[to]) retarget +auto=@movedto(creature|myBattlefield):all(trigger[to]) rehook auto=+2/+1 text=Equipped creature gets +2/+1. -- Whenever a creature enters the battlefield under your control, attach Ronin Warclub to that creature. -- Equip {5} ({5}: Attach to target creature you control. Equip only as a sorcery.) mana={3} @@ -73772,7 +81630,7 @@ type=Enchantment [/card] [card] name=Root Spider -auto=@combat(blocking) source(this):choice 1/0 && first strike ueot +auto=@combat(blocking) source(this):all(this) 1/0 ueot && all(this) first strike ueot text=Whenever Root Spider blocks, it gets +1/+0 and gains first strike until end of turn. mana={3}{G} type=Creature @@ -73918,7 +81776,8 @@ toughness=1 [card] name=Rootwater Thief auto={U}:flying -auto=@combatdamaged(player) from(this):pay({2}) moveto(exile) and!(shuffle)! notatarget(*|opponentlibrary) +auto=@combatdamagefoeof(player) from(this):pay({2}) moveto(exile) and!(shuffle)! notatarget(*|opponentlibrary) +auto=@combatdamageof(player) from(this):pay({2}) moveto(exile) and!(shuffle)! notatarget(*|mylibrary) text={U}: Rootwater Thief gains flying until end of turn. -- Whenever Rootwater Thief deals combat damage to a player, you may pay {2}. If you do, search that player's library for a card and exile it, then the player shuffles his or her library. mana={1}{U} type=Creature @@ -73980,6 +81839,16 @@ power=0 toughness=2 [/card] [card] +name=Rotfeaster Maggot +auto=moveTo(exile) target(creature|graveyard) and!( dynamicability )! +text=When Rotfeaster Maggot enters the battlefield, exile target creature card from a graveyard. You gain life equal to that card’s toughness. +mana={4}{B} +type=Creature +subtype=Insect +power=3 +toughness=3 +[/card] +[card] name=Rotlung Reanimator auto=@movedTo(this|graveyard) from(battlefield):token(Zombie,Creature Zombie, 2/2,black) auto=@movedTo(graveyard) from(other cleric|battlefield):token(Zombie,Creature Zombie, 2/2,black) @@ -73991,6 +81860,14 @@ power=2 toughness=2 [/card] [card] +name=Rotted Hulk +mana={3}{B} +type=Creature +subtype=Elemental +power=2 +toughness=5 +[/card] +[card] name=Rotted Hystrix mana={4}{G} type=Creature @@ -74027,6 +81904,15 @@ power=4 toughness=5 [/card] [card] +name=Rotting Mastodon +text= +mana={4}{B} +type=Creature +subtype=Zombie Elephant +power=2 +toughness=8 +[/card] +[card] name=Rotting Rats auto=transforms((,newability[ability$!name(discard) notatarget(*|myhand) reject!$ controller],newability[ability$!name(discard) notatarget(*|myhand) reject!$ opponent])) ueot autograveyard={1}{B}:moveto(mybattlefield) && transforms((,unearth,haste)) asSorcery forever @@ -74148,7 +82034,7 @@ toughness=3 [/card] [card] name=Rubblehulk -auto=type:land:mybattlefield/type:land:mybattlefield nonstatic +anyzone=type:land:mybattlefield/type:land:mybattlefield cdaactive autohand={1}{R}{G}{discard}:name(bloodrush) target(creature[attacking]) type:land:mybattlefield/type:land:mybattlefield ueot text=Rubblehulk's power and toughness are each equal to the number of lands you control. -- Bloodrush — {1}{R}{G}, Discard Rubblehulk: Target attacking creature gets +X/+X until end of turn, where X is the number of lands you control. mana={4}{R}{G} @@ -74160,7 +82046,7 @@ toughness=* [card] name=Ruby Leech abilities=first strike -auto=lord(*[red]|myhand) altercost(red,+1) +auto=lord(*[red]|myhand,mylibrary,mygraveyard,myexile) altercost(red,+1) text=First strike -- Red spells you cast cost {R} more to cast. mana={1}{R} type=Creature @@ -74170,7 +82056,7 @@ toughness=2 [/card] [card] name=Ruby Medallion -auto=lord(*[red]|myhand) altercost(colorless,-1) +auto=lord(*[red]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) text=Red spells you cast cost {1} less to cast. mana={2} type=Artifact @@ -74185,6 +82071,15 @@ mana={4}{G} type=Sorcery [/card] [card] +name=Rugged Highlands +auto=tap +auto=life:1 +auto={T}:Add{G} +auto={T}:Add{R} +text=Rugged Highlands enters the battlefield tapped. -- When Rugged Highlands enters the battlefield, you gain 1 life. -- {T}: Add {G} or {R} to your mana pool. +type=Land +[/card] +[card] name=Rugged Prairie auto={T}:Add{1} auto={RW}{T}:Add{R}{R} @@ -74220,7 +82115,7 @@ toughness=6 [/card] [card] name=Ruinous Minotaur -auto=@damaged(opponent) from(this):moveto(graveyard) notatarget(land|mybattlefield) +auto=@damagefoeof(player) from(this):moveto(graveyard) notatarget(land|mybattlefield) text=Whenever Ruinous Minotaur deals damage to an opponent, sacrifice a land. mana={1}{R}{R} type=Creature @@ -74265,20 +82160,19 @@ mana={2}{W} type=Enchantment [/card] [card] +name=Rumbling Baloth +text= +mana={2}{G}{G} +type=Creature +subtype=Beast +power=4 +toughness=4 +[/card] +[card] name=Rumbling Crescendo auto=@each my upkeep:may counter(0/0,1,Verse) -auto=this(counter{0/0.1.Verse}=) {R}{S}:destroy target(land) -auto=this(counter{0/0.2.Verse}=) {R}{S}:destroy target(land) -auto=this(counter{0/0.3.Verse}=) {R}{S}:destroy target(land) -auto=this(counter{0/0.4.Verse}=) {R}{S}:destroy target(land) -auto=this(counter{0/0.5.Verse}=) {R}{S}:destroy target(land) -auto=this(counter{0/0.6.Verse}=) {R}{S}:destroy target(land) -auto=this(counter{0/0.7.Verse}=) {R}{S}:destroy target(land) -auto=this(counter{0/0.8.Verse}=) {R}{S}:destroy target(land) -auto=this(counter{0/0.9.Verse}=) {R}{S}:destroy target(land) -auto=this(counter{0/0.10.Verse}=) {R}{S}:destroy target(land) -auto=this(counter{0/0.11.Verse}=) {R}{S}:destroy target(land) -auto=this(counter{0/0.12.Verse}=) {R}{S}:destroy target(land) +auto=this(counter{0/0.1.Verse}<1) {R}{S}:name(do nothing) donothing +auto=this(counter{0/0.1.Verse}>0) {R}{S}:destroy target(land) text=At the beginning of your upkeep, you may put a verse counter on Rumbling Crescendo. -- {R}, Sacrifice Rumbling Crescendo: Destroy up to X target lands, where X is the number of verse counters on Rumbling Crescendo. mana={3}{R}{R} type=Enchantment @@ -74465,7 +82359,7 @@ target=creature auto=teach(creature[red]) 1/1 auto=teach(creature[red]) double strike auto=teach(creature[green]) 1/1 -auto=teach(creature[green]) flying +auto=teach(creature[green]) trample text=Enchant creature -- As long as enchanted creature is red, it gets +1/+1 and has double strike. (It deals both first-strike and regular combat damage.) -- As long as enchanted creature is green, it gets +1/+1 and has trample. mana={4}{RG} type=Enchantment @@ -74505,6 +82399,14 @@ text=Rupture Spire enters the battlefield tapped. -- When Rupture Spire enters t type=Land [/card] [card] +name=Rush of Battle +auto=all(creature|myBattlefield) 2/1 ueot +auto=all(Warrior|myBattlefield) lifelink ueot +text=Creature you control get +2/+1 until end of turn. Warrior creatures you control also gain lifelink until end of turn. (Damage dealt by those Warriors also causes their controller to gain that much life.) +mana={3}{W} +type=Sorcery +[/card] +[card] name=Rush of Blood target=creature auto=dynamicability ueot @@ -74599,7 +82501,7 @@ toughness=3 [card] name=Rust Elemental abilities=flying -auto=upcostmult[{S(other artifact|mybattlefield)}] tap && life:-4 controller +auto=upcostmulti[{S(other artifact|mybattlefield)}] tap && life:-4 controller text=Flying -- At the beginning of your upkeep, sacrifice an artifact other than Rust Elemental. If you can't, tap Rust Elemental and you lose 4 life. mana={4} type=Artifact Creature @@ -74656,7 +82558,7 @@ type=Artifact [card] name=Rusting Golem auto=fading:5 -auto=thisforeach(counter{0/0.1.Fade}) 1/1 +anyzone=counter{0%0.1.Fade}/counter{0%0.1.Fade} cdaactive text=Fading 5 (This creature enters the battlefield with five fade counters on it. At the beginning of your upkeep, remove a fade counter from it. If you can't, sacrifice it.) -- Rusting Golem's power and toughness are each equal to the number of fade counters on it. mana={4} type=Artifact Creature @@ -74666,7 +82568,8 @@ toughness=* [/card] [card] name=Rustmouth Ogre -auto=@combatdamaged(player) from(this):may destroy target(artifact|opponentBattlefield) +auto=@combatdamagefoeof(player) from(this):may destroy target(artifact|opponentBattlefield) +auto=@combatdamageof(player) from(this):may destroy target(artifact|myBattlefield) text=Whenever Rustmouth Ogre deals combat damage to a player, you may destroy target artifact that player controls. mana={4}{R}{R} type=Creature @@ -74705,6 +82608,25 @@ power=2 toughness=1 [/card] [card] +name=Ruthless Deathfang +abilities=flying +auto=@sacrificed(creature|mybattlefield):target(opponent) ability$!sacrifice notatarget(creature|mybattlefield)!$ targetedplayer +text=Flying -- Whenever you sacrifice a creature, target opponent sacrifices a creature. +mana={4}{U}{B} +type=Creature +subtype=Dragon +power=4 +toughness=4 +[/card] +[card] +name=Ruthless Instincts +auto=choice name(reach and deathtouch) target(creature[-attacking]) transforms((,newability[reach ueot],newability[deathtouch ueot],newability[untap])) ueot +auto=choice name(+2/+2 and Trample) target(creature[attacking]) transforms((,newability[2/2 ueot],newability[trample ueot])) ueot +text=Choose one: -- Target nonattacking creature gains reach and deathtouch until end of turn. Untap it. -- Target attacking creature gets +2/+2 and gains trample until end of turn. +mana={2}{G} +type=Instant +[/card] +[card] name=Ruthless Invasion auto=all(creature[-artifact]) cantblock text=({p(R)} may be paid for with either {R} or 2 life.) -- Nonartifact creatures can't block this turn. @@ -74775,6 +82697,17 @@ power=5 toughness=5 [/card] [card] +name=Sabertooth Outrider +abilities=trample +auto=@combat(attacking) source(this) restriction{compare(powertotalinplay)~morethan~7}:first strike ueot +text=Trample -- Formidable — Whenever Sabertooth Outrider attacks, if creatures you control have total power 8 or greater, Sabertooth Outrider gains first strike until end of turn. +mana={3}{R} +type=Creature +subtype=Human Warrior +power=4 +toughness=2 +[/card] +[card] name=Sabertooth Wyvern abilities=flying,first strike text=Flying, first strike @@ -74816,6 +82749,13 @@ power=1 toughness=3 [/card] [card] +name=Sacred Armory +auto={2}:1/0 target(creature) +text={2}: Target creatures gets +1/+0 until end of turn. +mana={2} +type=Artifact +[/card] +[card] name=Sacred Foundry auto=tap auto=may untap && life:-2 controller @@ -74930,6 +82870,14 @@ text={2}, {T}: Exile target creature you control. -- At the beginning of your up type=Land [/card] [card] +name=Safe Passage +auto=all(creature|mybattlefield) prevent:9999 +auto=prevent:9999 controller +text=Prevent all damage that would be dealt to you and creatures you control this turn. +mana={2}{W} +type=Instant +[/card] +[card] name=Safeguard auto={2}{W}:name(prevent all combat damage from target creature) donothing target(creature) && fog from(mytgt) oneshot text={2}{W}: Prevent all combat damage that would be dealt by target creature this turn. @@ -75006,12 +82954,27 @@ power=1 toughness=2 [/card] [card] -name=Safe Passage -auto=all(creature|mybattlefield) prevent:9999 -auto=prevent:9999 controller -text=Prevent all damage that would be dealt to you and creatures you control this turn. -mana={2}{W} -type=Instant +name=Sage of the Inward Eye +abilities=flying +auto=@movedTo(*[-creature]|mystack):all(creature|myBattlefield) lifelink ueot +text=Flying -- Whenever you cast a noncreature spell, creatures you control gain lifelink until end of turn. (Damage dealt by those creatures also causes their controller to gain that much life.) +mana={2}{U}{R}{W} +type=Creature +subtype=Djinn Wizard +power=3 +toughness=4 +[/card] +[card] +name=Sage-Eye Harrier +abilities=flying +facedown={3} +autofacedown={3}{W}:morph +text=Flying -- Morph {3}{W} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) +mana={4}{W} +type=Creature +subtype=Bird Warrior +power=1 +toughness=5 [/card] [card] name=Sage's Dousing @@ -75042,10 +83005,34 @@ power=2 toughness=3 [/card] [card] +name=Sagu Archer +abilities=Reach +facedown={3} +autofacedown={4}{G}:morph +text=Reach -- Morph {4}{G} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) +mana={4}{G} +type=Creature +subtype=Naga Archer +power=2 +toughness=5 +[/card] +[card] +name=Sagu Mauler +abilities=trample,opponentshroud +facedown={3} +autofacedown={3}{G}{U}:morph +text=Trample, hexproof. -- Morph {3}{G}{U} (You may cast this card face down as a 2/2 creature for 3. Turn it face up any time for its morph cost.) +mana={4}{G}{U} +type=Creature +subtype=Beast +power=6 +toughness=6 +[/card] +[card] name=Sai of the Shinobi auto={2}:equip auto=1/1 -auto=@movedto(creature|mybattlefield):may all(trigger[to]) retarget +auto=@movedto(creature|mybattlefield):may all(trigger[to]) rehook text=Equipped creature gets +1/+1. -- Whenever a creature enters the battlefield under your control, you may attach Sai of the Shinobi to it. -- Equip {2} mana={1} type=Artifact @@ -75121,6 +83108,27 @@ text=Salt Marsh enters the battlefield tapped. -- {T}: Add {U} or {B} to your ma type=Land [/card] [card] +name=Salt Road Patrol +auto={1}{W}{T}:counter(1/1,1) asSorcery +text=Outlast {1}{W} ({1}{W}, {T}: Put a +1/+1 counter on this creature. Outlast only as a sorcery.) +mana={3}{W} +type=Creature +subtype=Human Scout +power=2 +toughness=5 +[/card] +[card] +name=Salt Road Quartermasters +auto=counter(1/1,2) +auto={2}{G}{C(1/1,-1)}:counter(1/1,1) target(creature|battlefield) +text=Salt Road Quartermasters enters the battlefield with two +1/+1 counters on it. -- {2}{G}, Remove a +1/+1 counter from Salt Road Quartermasters: Put a +1/+1 counter on target creature. +mana={2}{G} +type=Creature +subtype=Human Soldier +power=1 +toughness=1 +[/card] +[card] name=Saltskitter auto=@movedTo(other creature|battlefield):(blink)ueot text=Whenever another creature enters the battlefield, exile Saltskitter. Return Saltskitter to the battlefield under its owner's control at the beginning of the next end step. @@ -75268,6 +83276,14 @@ power=2 toughness=2 [/card] [card] +name=Sanctified Charge +auto=all(creature|myBattlefield) 2/1 ueot +auto=all(creature[white]|myBattlefield) first strike ueot +text=Creature you control get +2/+1 until end of turn. White creatures you control also gain first strike until end of turn. (They deal combat damage before creatures without first strike.) +mana={4}{W} +type=Instant +[/card] +[card] name=Sanctimony auto=@tappedformana(mountain|opponentbattlefield):may life:1 controller text=Whenever an opponent taps a Mountain for mana, you may gain 1 life. @@ -75364,6 +83380,24 @@ power=3 toughness=4 [/card] [card] +name=Sandblast +target=creature[attacking;blocking] +auto=damage:5 +text=Sandblast deals 5 damage to target attacking creature or blocking creature. +mana={2}{W} +type=Instant +[/card] +[card] +name=Sandcrafter Mage +auto=ability$!name(Bolster) notatarget(creature[toughness=toughness:lowest:creature:mybattlefield]|mybattlefield) counter(1/1,1)!$ controller +text=When Sandcrafter Mage enters the battlefield, bolster 1. (Choose a creature with the least toughness among creatures you control and put a +1/+1 counter on it.) +mana={2}{W} +type=Creature +subtype=Human Wizard +power=2 +toughness=2 +[/card] +[card] name=Sands of Delirium auto={x}{T}:deplete:x target(player) text={X}, {T}: Target player puts the top X cards of his or her library into his or her graveyard. @@ -75391,6 +83425,47 @@ power=1 toughness=3 [/card] [card] +name=Sandsteppe Citadel +auto=tap +auto={T}:Add{W} +auto={T}:Add{B} +auto={T}:Add{G} +text=Sandsteppe Citadel enters the battlefield tapped. -- {T}: Add {W}, {B}, or {G} to your mana pool. +type=Land +[/card] +[card] +name=Sandsteppe Mastodon +abilities=Reach +auto=ability$!name(Bolster) notatarget(creature[toughness=toughness:lowest:creature:mybattlefield]|mybattlefield) counter(1/1,5)!$ controller +text=When Sandsteppe Mastodon enters the battlefield Bolster 5 (Choose a creature with the least toughness or tied with the least toughness among creatures you control. Put 5 +1/+1 counters on it.) +mana={5}{G}{G} +type=Creature +subtype=Elephant +power=5 +toughness=5 +[/card] +[card] +name=Sandsteppe Outcast +auto=choice name(+1/+1 counter) counter(1/1,1) +auto=choice name(Spirit Token) token(Spirit,Creature Spirit,1/1,white,flying) +text=When Sandsteppe Outcast enters the battlefield, choose one: -- Put a +1/+1 counter on Sandsteppe Outcast. -- Put a 1/1 white Spirit creature token with flying onto the battlefield. +mana={2}{W} +type=Creature +subtype=Human Warrior +power=2 +toughness=1 +[/card] +[card] +name=Sandsteppe Scavenger +auto=ability$!name(Bolster) notatarget(creature[toughness=toughness:lowest:creature:mybattlefield]|mybattlefield) counter(1/1,2)!$ controller +text=When Sandsteppe Scavenger enters the battlefield, bolster 2. (Choose a creature with the least toughness among creatures you control and put two +1/+1 counters on it.) +mana={4}{G} +type=Creature +subtype=Hound Scout +power=2 +toughness=2 +[/card] +[card] name=Sandstone Deadfall auto={T}{S(land|myBattlefield)}{S(land|myBattlefield)}{S}:destroy target(creature[attacking]) text={T}, Sacrifice two lands and Sandstone Deadfall: Destroy target attacking creature. @@ -75401,9 +83476,8 @@ type=Artifact name=Sandstone Needle auto=tap auto=counter(0/0,2,Depletion) -auto={T}{C(0/0,-1,Depletion)}:Add{R}{R} -auto=@tapped(this):bury all(sandstone needle[-counter{0/0.1.Depletion}]|myBattlefield) -auto=this(counter{0/0.1.Depletion}<1) {0}:sacrifice all(this) +auto=this(counter{0/0,1,Depletion}>1) {T}{C(0/0,-1,Depletion)}:Add{R}{R} +auto=this(counter{0/0,1,Depletion}=1) {T}{C(0/0,-1,Depletion)}:Add{R}{R} && sacrifice text=Sandstone Needle enters the battlefield tapped with two depletion counters on it. -- {T}, Remove a depletion counter from Sandstone Needle: Add {R}{R} to your mana pool. If there are no depletion counters on Sandstone Needle, sacrifice it. type=Land [/card] @@ -75426,6 +83500,18 @@ mana={G} type=Instant [/card] [card] +name=Sandstorm Charger +facedown={3} +autofacedown={4}{W}:morph +autofaceup=counter(1/1,1) +text=Megamorph {4}{W} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) +mana={4}{W} +type=Creature +subtype=Beast +power=3 +toughness=4 +[/card] +[card] name=Sandstorm Eidolon auto={R}{S}:cantblock target(creature) autograveyard=@movedTo(*[multicolor]|mystack):may moveTo(myhand) @@ -75487,7 +83573,7 @@ type=Sorcery [/card] [card] name=Sanguine Bond -auto=@lifed(controller):dynamicability +auto=@lifeof(player):dynamicability text=Whenever you gain life, target opponent loses that much life. mana={3}{B}{B} type=Enchantment @@ -75537,7 +83623,7 @@ toughness=4 [card] name=Sapphire Leech abilities=flying -auto=lord(*[blue]|myhand) altercost(blue,+1) +auto=lord(*[blue]|myhand,mylibrary,mygraveyard,myexile) altercost(blue,+1) text=Flying -- Blue spells you cast cost {U} more to cast. mana={1}{U} type=Creature @@ -75547,7 +83633,7 @@ toughness=2 [/card] [card] name=Sapphire Medallion -auto=lord(*[blue]|myhand) altercost(colorless,-1) +auto=lord(*[blue]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) text=Blue spells you cast cost {1} less to cast. mana={2} type=Artifact @@ -75627,9 +83713,8 @@ toughness=2 name=Saprazzan Skerry auto=tap auto=counter(0/0,2,Depletion) -auto={T}{C(0/0,-1,Depletion)}:Add{U}{U} -auto=@tapped(this):bury all(saprazzan skerry[-counter{0/0.1.Depletion}]|myBattlefield) -auto=this(counter{0/0.1.Depletion}<1) {0}:sacrifice all(this) +auto=this(counter{0/0,1,Depletion}>1) {T}{C(0/0,-1,Depletion)}:Add{U}{U} +auto=this(counter{0/0,1,Depletion}=1) {T}{C(0/0,-1,Depletion)}:Add{U}{U} && sacrifice text=Saprazzan Skerry enters the battlefield tapped with two depletion counters on it. -- {T}, Remove a depletion counter from Saprazzan Skerry: Add {U}{U} to your mana pool. If there are no depletion counters on Saprazzan Skerry, sacrifice it. type=Land [/card] @@ -75683,6 +83768,44 @@ type=Planeswalker subtype=Sarkhan [/card] [card] +name=Sarkhan, the Dragonspeaker +auto=counter(0/0,4,loyalty) +auto={C(0/0,1,Loyalty)}:name(+1: becomes dragon) transforms((Creature Dragon,setpower=4,settoughness=4,indestructible,flying,haste,newability[preventAllDamage to(this)])) ueot +auto={C(0/0,-3,Loyalty)}:name(-3: 4 Damage to creature) damage:4 target(creature) +auto={C(0/0,-6,Loyalty)}:name(-6: Emblem) emblem transforms((,newability[@each my draw:draw:2 controller],newability[@each my end:moveTo(graveyard) all(*|myhand)])) forever dontremove +mana={3}{R}{R} +text=+1 Until end of turn, Sarkhan, the Dragonspeaker becomes a legendary 4/4 red Dragon creature with flying, indestructible, and haste. (He doesn't lose loyalty while he's not a planeswalker. -- -3: Sarkhan, the Dragonspeaker deals 4 damage to target creature. -- -6: You get an emblem with "At the beginning of your draw step, draw two additional cards" and "At the beginning of your end step, discard your hand." -- Starting Loyalty (4) +type=Planeswalker +subtype=Sarkhan +[/card] +[card] +name=Sarkhan Unbroken +auto=counter(0/0,9,Loyalty) +auto={C(0/0,1,Loyalty)}:name(+1: Draw card add mana) draw:1 controller && transforms((,newability[activatechooseacolor add{chosencolor} activatechooseend])) forever asSorcery +auto={C(0/0,-2,Loyalty)}:name(-2: 4/4 dragon token) token(Dragon,creature dragon,4/4,flying,red) controller asSorcery +auto={C(0/0,-8,Loyalty)}:name(-8: Search for any number of dragons) moveto(mybattlefield) notatarget(creature[dragon]|mylibrary) asSorcery +text=+1: Draw a card, then add one mana of any color to your mana pool. -- -2: Put a 4/4 red Dragon creature token with flying onto the battlefield. -- -8: Search your library for any number of Dragon creature cards and put them onto the battlefield. Then shuffle your library. -- Starting Loyalty (4) +mana={2}{G}{U}{R} +type=Planeswalker +subtype=Sarkhan +[/card] +[card] +name=Sarkhan's Rage +target=creature,player|battlefield +auto=damage:5 +auto=if type(dragon|mybattlefield)~lessthan~1 then damage:2 controller +text=Sarkhan's Rage deals 5 damage to target creature or player. If you control no Dragons, Sarkhan's Rage deals 2 damage to you. +mana={4}{R} +type=Instant +[/card] +[card] +name=Sarkhan's Triumph +auto=moveto(myhand) notatarget(creature[dragon]|mylibrary) +text=Search your library for a Dragon creature card, reveal it, put it into your hand, then shuffle your library. +mana={2}{R} +type=Instant +[/card] +[card] name=Sarpadian Empires, Vol. VII auto=choice name(white citizen) counter(0/0,1,White Citizen) all(this) auto=choice name(blue camarid) counter(0/0,1,Blue Camarid) all(this) @@ -75749,9 +83872,39 @@ power=2 toughness=4 [/card] [card] +name=Satyr Grovedancer +auto=counter(1/1,1) target(creature) +text=When Satyr Grovedancer enters the battlefield, put a +1/+1 counter on target creature. +mana={1}{G} +type=Creature +subtype=Satyr Shaman +power=1 +toughness=1 +[/card] +[card] +name=Satyr Hedonist +auto={R}{S}:Add{R}{R}{R} +text={R}, Sacrifice Satyr Hedonist: Add {R}{R}{R} to your mana pool. +mana={1}{G} +type=Creature +subtype=Satyr +power=2 +toughness=1 +[/card] +[card] +name=Satyr Hoplite +auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):counter(1/1,1) +text=Heroic —- Whenever you cast a spell that targets Satyr Hoplite, put a +1/+1 counter on Satyr Hoplite. +mana={R} +type=Creature +subtype=Satyr Soldier +power=1 +toughness=1 +[/card] +[card] name=Satyr Firedancer -auto=@damaged(opponent) from(instant|mystack):damage:thatmuch target(creature|opponentbattlefield) -auto=@damaged(opponent) from(sorcery|mystack):damage:thatmuch target(creature|opponentbattlefield) +auto=@damagefoeof(player) from(instant|mystack):damage:thatmuch target(creature|opponentbattlefield) +auto=@damagefoeof(player) from(sorcery|mystack):damage:thatmuch target(creature|opponentbattlefield) text=Whenever an instant or sorcery spell you control deals damage to an opponent, Satyr Firedancer deals that much damage to target creature that player controls. mana={1}{R} type=Enchantment Creature @@ -75770,6 +83923,16 @@ power=2 toughness=1 [/card] [card] +name=Satyr Rambler +abilities=trample +text=Trample +mana={1}{R} +type=Creature +subtype=Satyr +power=2 +toughness=1 +[/card] +[card] name=Savage Beating restriction=during battle otherrestriction=during battle @@ -75822,6 +83985,18 @@ type=Enchantment subtype=Aura [/card] [card] +name=Savage Knuckleblade +auto={2}{G}: 2/2 ueot limit:1 +auto={2}{U}:moveto(ownerhand) +auto={R}:haste +text={2}{G}: Savage Knuckleblade gets +2/+2 until end of turn. Activate this ability only once each turn. -- {2}{U}: Return Savage Knuckleblade to its owner's hand. -- {R}: Savage Knuckleblade gains haste until end of turn. +mana={G}{U}{R} +type=Creature +subtype=Ogre Warrior +power=4 +toughness=4 +[/card] +[card] name=Savage Lands auto=tap auto={T}:Add{B} @@ -75840,6 +84015,16 @@ mana={1}{R} type=Sorcery [/card] [card] +name=Savage Punch +target=creature|mybattlefield +auto=transforms((,newability[target(creature|opponentbattlefield) dynamicability])) ueot +restriction=type(creature|opponentbattlefield)~morethan~0 +auto=if type(creature[power>=4]|mybattlefield)~morethan~0 then 2/2 ueot +text=Target creature you control fights target creature you don't control. -- Ferocious - The creature you control gets +2/+2 until end of turn before it fights if you control a creature with power 4 or greater. +mana={1}{G} +type=Sorcery +[/card] +[card] name=Savage Silhouette target=creature auto=2/2 @@ -75921,7 +84106,7 @@ type=Sorcery [card] name=Savra, Queen of the Golgari auto=@sacrificed(creature[black]|mybattlefield):may life:-2 && ability$!sacrifice notatarget(creature|mybattlefield)!$ opponent -auto=@sacrificed(creature[green]|mybattlefield):may life:2 controller +auto=@sacrificed(creature[green]|mybattlefield):name(gain life) ability$!may life:2!$ controller text=Whenever you sacrifice a black creature, you may pay 2 life. If you do, each other player sacrifices a creature. -- Whenever you sacrifice a green creature, you may gain 2 life. mana={2}{B}{G} type=Legendary Creature @@ -75985,6 +84170,18 @@ text=Scabland enters the battlefield tapped. -- {T}: Add {1} to your mana pool. type=Land [/card] [card] +name=Scab-Clan Berserker +abilities=haste +auto=this(cantargetcard(*[-renown]) transforms((,newability[@combatdamaged(player) from(this):counter(1/1) && becomes(renown) forever])) +auto=this(cantargetcard(*[renown]) transforms((,newability[@movedto(*[-creature]|opponentstack):damage:2 opponent])) +text=Haste -- Renown 1 (When this creature deals combat damage to a player, if it isn't renowned, put a +1/+1 counter on it and it becomes renowned.) -- Whenever an opponent casts a noncreature spell, if Scab-Clan Berserker is renowned, Scab-Clan Berserker deals 2 damage to that player. +mana={1}{R}{R} +type=Creature +subtype=Human Berserker +power=2 +toughness=2 +[/card] +[card] name=Scab-Clan Charger autohand={1}{G}{discard}:name(bloodrush) target(creature[attacking]) 2/4 ueot text=Bloodrush — {1}{G}, Discard Scab-Clan Charger: Target attacking creature gets +2/+4 until end of turn. @@ -76014,6 +84211,17 @@ mana={1}{R} type=Enchantment [/card] [card] +name=Scaldkin +abilities=flying +auto={2}{R}{S}:damage:2 target(creature,player) +text=Flying -- {2}{R}, Sacrifice Scaldkin: Scaldkin deals 2 damage to target creature or player. +mana={3}{U} +type=Creature +subtype=Elemental +power=2 +toughness=2 +[/card] +[card] name=Scalding Devil auto={2}{R}:damage:1 target(player) text={2}{R}: Scalding Devil deals 1 damage to target player. @@ -76075,6 +84283,13 @@ power=7 toughness=6 [/card] [card] +name=Scale Blessing +auto=name(Bolster) notatarget(creature[toughness=toughness:lowest:creature:mybattlefield]|mybattlefield) transforms((,newability[counter(1/1.2)],newability[counter(1/1.1) all(other creature[counter{1/1.1}]|mybattlefield)])) forever +text=Bolster 1, then put a +1/+1 counter on each creature you control with a +1/+1 counter on it. (To bolster 1, choose a creature with the least toughness among creatures you control and put a +1/+1 counter on it.) +mana={3}{W} +type=Instant +[/card] +[card] name=Scale of Chiss-Goria abilities=affinityartifacts,flash auto={T}:0/1 target(creature) @@ -76083,6 +84298,16 @@ mana={3} type=Artifact [/card] [card] +name=Scaleguard Sentinels +auto=if type(dragon|mybattlefield)~morethan~0 then counter(1/1,1) else if type(dragon|myhand)~morethan~0 then counter(1/1,1) +text=As an additional cost to cast Scaleguard Sentinels, you may reveal a Dragon card from your hand. -- Scaleguard Sentinels enters the battlefield with a +1/+1 counter on it if you revealed a Dragon card or controlled a Dragon as you cast Scaleguard Sentinels. +mana={G}{G} +type=Creature +subtype=Human Soldier +power=2 +toughness=3 +[/card] +[card] name=Scapegoat target=creature|mybattlefield auto=moveTo(ownerhand) @@ -76333,6 +84558,16 @@ mana={1}{U}{U} type=Artifact [/card] [card] +name=Scholar of Athreos +auto={2}{B}:life:-1 opponent && life:1 controller +text={2}{B}: Each opponent loses 1 life. You gain life equal to the life lost this way. +mana={2}{W} +type=Creature +subtype=Human Cleric +power=1 +toughness=4 +[/card] +[card] name=School of Piranha auto=upcost[{1}{U}] sacrifice text=At the beginning of your upkeep, sacrifice School of Piranha unless you pay {1}{U}. @@ -76356,7 +84591,8 @@ type=Land [card] name=Scion of Darkness abilities=trample -auto=@combatdamaged(player) from(this):may moveTo(myBattlefield) target(creature|opponentgraveyard) +auto=@combatdamagefoeof(player) from(this):may moveTo(myBattlefield) target(creature|opponentgraveyard) +auto=@combatdamageof(player) from(this):may moveTo(myBattlefield) target(creature|mygraveyard) autohand=__CYCLING__({3}) text=Trample -- Whenever Scion of Darkness deals combat damage to a player, you may put target creature card from that player's graveyard onto the battlefield under your control. -- Cycling {3} ({3}, Discard this card: Draw a card.) mana={5}{B}{B}{B} @@ -76366,6 +84602,16 @@ power=6 toughness=6 [/card] [card] +name=Scion of Glaciers +auto={U}:1/-1 ueot +text={U}: Scion of Glaciers gets +1/-1 until end of turn. +mana={2}{U}{U} +type=Creature +subtype=Elemental +power=2 +toughness=5 +[/card] +[card] name=Scion of Oona abilities=flash,flying auto=lord(other faerie|myBattlefield) 1/1 @@ -76379,7 +84625,7 @@ toughness=1 [/card] [card] name=Scion of the Wild -auto=foreach(creature|myBattlefield) 1/1 +anyzone=type:creature:myBattlefield/type:creature:myBattlefield cdaactive text=Scion of the Wild's power and toughness are each equal to the number of creatures you control. mana={1}{G}{G} type=Creature @@ -76388,6 +84634,16 @@ power=* toughness=* [/card] [card] +name=Scion of Ugin +abilities=flying +text=Flying +mana={6} +type=Creature +subtype=Dragon Spirit +power=4 +toughness=4 +[/card] +[card] name=Scion of Vitu-Ghazi auto=if casted(this) then token(Bird,Creature Bird,1/1,flying,white) auto=if casted(this) then ability$! name(populate) clone notatarget(creature[token]|mybattlefield) !$ controller @@ -76556,6 +84812,15 @@ mana={2}{W}{W} type=Instant [/card] [card] +name=Scoured Barrens +auto=tap +auto=life:1 +auto={T}:Add{W} +auto={T}:Add{B} +text=Scoured Barrens enters the battlefield tapped. -- When Scoured Barrens enters the battlefield, you gain 1 life. -- {T}: Add {W} or {B} to your mana pool. +type=Land +[/card] +[card] name=Scourge Devil auto=1/0 all(creature|myBattlefield) autograveyard={2}{R}:moveto(mybattlefield) && transforms((,unearth,haste)) asSorcery forever @@ -76567,6 +84832,16 @@ power=3 toughness=3 [/card] [card] +name=Scourge of Fleets +auto=moveto(ownerhand) all(creature[toughness<=type:island:mybattlefield]|opponentbattlefield) +text=When Scourge of Fleets enters the battlefield, return each creature your opponents control with toughness X or less to its owner's hand, where X is the number of Islands you control. +mana={5}{U}{U} +type=Creature +subtype=Kraken +power=6 +toughness=6 +[/card] +[card] name=Scourge of Geier Reach auto=foreach(creature|opponentbattlefield) 1/1 text=Scourge of Geier Reach gets +1/+1 for each creature your opponents control. @@ -76633,6 +84908,29 @@ power=3 toughness=3 [/card] [card] +name=Scourge of Valkas +abilities=flying +auto={R}:1/0 ueot +auto=damage:type:dragon:mybattlefield target(creature,player) +auto=lord(dragon[-scourge of valkas]|mybattlefield) transforms((,newability[name(damage creature) damage:type:dragon:mybattlefield target(creature)],newability[name(damage player) damage:type:dragon:mybattlefield target(player)])) +text=Flying. -- Whenever Scourge of Valkas or another Dragon enters the battlefield under your control, it deals X damage to target creature or player, where X is the number of Dragons you control. -- {R}: Scourge of Valkas gets +1/+0 until end of turn. +mana={2}{R}{R}{R} +type=Creature +subtype=Dragon +power=4 +toughness=4 +[/card] +[card] +name=Scourgemark +target=creature +auto=1/0 +auto=draw:1 controller +text=Enchant creature -- When Scourgemark enters the battlefield, draw a card. -- Enchanted creature gets +1/+0. +mana={1}{B} +type=Enchantment +subtype=Aura +[/card] +[card] name=Scourglass auto={T}{S}:all(*[-artifact;-land]) destroy myUpkeepOnly text={T}, Sacrifice Scourglass: Destroy all permanents except for artifacts and lands. Activate this ability only during your upkeep. @@ -76720,6 +85018,17 @@ power=2 toughness=3 [/card] [card] +name=Scrapyard Mongrel +auto=aslongas(Artifact|myBattlefield) 2/0 +auto=aslongas(Artifact|myBattlefield) trample +text=As long as you control an artifact, Scrapyard Mongrel gets +2/+0 and has trample. +mana={3}{R} +type=Creature +subtype=Hound +power=3 +toughness=3 +[/card] +[card] name=Scrapyard Salvo target=player auto=damage:type:artifact:mygraveyard @@ -76748,6 +85057,17 @@ power=2 toughness=2 [/card] [card] +name=Screamreach Brawler +other={1}{R} name(Dash) +auto=if paid(alternative) then transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveto(ownerhand) all(this)])) forever +text=Dash {1}{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={2}{R} +type=Creature +subtype=Orc Berserker +power=2 +toughness=3 +[/card] +[card] name=Screams of the Damned auto={1}{B}{E(*|mygraveyard)}:damage:1 all(creature,player) text={1}{B}, Exile a card from your graveyard: Screams of the Damned deals 1 damage to each creature and each player. @@ -76835,7 +85155,8 @@ toughness=2 [card] name=Screeching Silcaw abilities=flying -auto=@combatdamaged(player) from(this) restriction{type(artifact|myBattlefield)~morethan~2}:deplete:4 opponent +auto=@combatdamagefoeof(player) from(this) restriction{type(artifact|myBattlefield)~morethan~2}:deplete:4 opponent +auto=@combatdamageof(player) from(this) restriction{type(artifact|myBattlefield)~morethan~2}:deplete:4 controller text=Flying -- Metalcraft - Whenever Screeching Silcaw deals combat damage to a player, if you control three or more artifacts, that player puts the top four cards of his or her library into his or her graveyard. mana={1}{U} type=Creature @@ -76885,6 +85206,14 @@ mana={2} type=Artifact [/card] [card] +name=Scroll of the Masters +auto=@movedTo(*[-creature]|mystack):counter (0/0,Lore) all(this) +auto={3}{T}:thisforeach(counter{0/0.1.Lore}) 1/1 target(creature|mybattlefield) ueot +text=Whenever you cast a noncreature spell, put a lore counter on Scroll of the Masters. -- {3}{T}: Target creature you control gets +1/+1 until end of turn for each lore counter on Scroll of the Masters. +mana={2} +type=Artifact +[/card] +[card] name=Scroll Thief auto=@combatdamaged(player) from(this):draw:1 text=Whenever Scroll Thief deals combat damage to a player, draw a card. @@ -77001,6 +85330,17 @@ power=4 toughness=2 [/card] [card] +name=Scuttling Doom Engine +auto=cantbeblockedby(creature[power<=2]) +autograveyard=@movedTo(this|graveyard) from(mybattlefield):damage:6 target(opponent) +text=Scuttling Doom Engine can't be blocked by creatures with power 2 or less. -- When Scuttling Doom Engine dies, it deals 6 damage to target opponent. +mana={6} +type=Artifact Creature +subtype=Construct +power=6 +toughness=6 +[/card] +[card] name=Scuzzback Marauders abilities=trample,persist text=Trample -- Persist (When this creature dies, if it had no -1/-1 counters on it, return it to the battlefield under its owner's control with a -1/-1 counter on it.) @@ -77036,7 +85376,7 @@ toughness=2 name=Scythe of the Wretched auto=teach(creature) +2/+2 auto={4}:equip -auto=@vampired(creature) from(mytgt):all(trigger[to]) moveto(mybattlefield) and!(retarget)! +auto=@vampired(creature) from(mytgt):all(trigger[to]) moveto(mybattlefield) and!(rehook)! text=Equipped creature gets +2/+2. -- Whenever a creature dealt damage by equipped creature this turn is put into a graveyard, return that card to the battlefield under your control. Attach Scythe of the Wretched to that creature. -- Equip {4} mana={2} type=Artifact @@ -77177,6 +85517,16 @@ text=Seachrome Coast enters the battlefield tapped unless you control two or few type=Land [/card] [card] +name=Seacoast Drake +abilities=flying +text=Flying. +mana={1}{U} +type=Creature +subtype=Drake +power=1 +toughness=3 +[/card] +[card] name=Seafloor Debris auto=tap auto={T}:Add{U} @@ -77241,6 +85591,18 @@ mana={G} type=Enchantment [/card] [card] +name=Sealock Monster +abilities=cantattack +auto=aslongas(island|opponentBattlefield) -cantattack +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} +type=Creature +subtype=Octopus +power=5 +toughness=5 +[/card] +[card] name=Seance auto=@each my upkeep:may target(creature|mygraveyard) moveto(exile) and!(clone with(unearth) addtype(spirit))! text=At the beginning of each upkeep, you may exile target creature card from your graveyard. If you do, put a token onto the battlefield that's a copy of that card except it's a Spirit in addition to its other types. Exile it at the beginning of the next end step. @@ -77275,6 +85637,16 @@ subtype=Spirit power=2 toughness=1 [/card] +#creature deals secondary damage not Searing Blood +[card] +name=Searing Blood +target=creature +auto=damage:2 +auto=transforms((newability[@movedto(this|graveyard) from(battlefield):damage:3 controller])) ueot +text=Searing Blood deals 2 damage to target creature. When that creature dies this turn, Searing Blood deals 3 damage to the creature's controller. +mana={R}{R} +type=Instant +[/card] [card] name=Searing Flesh auto=damage:7 opponent @@ -77284,7 +85656,7 @@ type=Sorcery [/card] [card] name=Searing Meditation -auto=@lifed(controller):pay({2}) target(creature,player) damage:2 +auto=@lifeof(player):pay({2}) target(creature,player) damage:2 text=Whenever you gain life, you may pay {2}. If you do, Searing Meditation deals 2 damage to target creature or player. mana={1}{R}{W} type=Enchantment @@ -77457,6 +85829,13 @@ mana={2}{U} type=Enchantment [/card] [card] +name=Secure the Wastes +auto=token(Warrior,Creature Warrior,1/1,white)*X +text=Put X 1/1 white Warrior creature tokens onto the battlefield. +mana={X}{W} +type=Instant +[/card] +[card] name=Security Blockade target=land auto=teach(land) transforms((,newability[{T}:prevent:1 controller])) @@ -77474,6 +85853,16 @@ mana={3}{W} type=Enchantment [/card] [card] +name=Sedge Scorpion +abilities=deathtouch +text=Deathtouch +mana={G} +type=Creature +subtype=Scorpion +power=1 +toughness=1 +[/card] +[card] name=Sedge Sliver auto=aslongas(swamp|myBattlefield) lord(sliver) 1/1 auto=lord(sliver) {B}:regenerate @@ -77508,7 +85897,8 @@ toughness=2 [card] name=Sedraxis Specter abilities=flying -auto=@combatdamaged(opponent) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@combatdamagefoeof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@combatdamageof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ controller autograveyard={1}{B}:moveto(mybattlefield) && transforms((,unearth,haste)) asSorcery forever text=Flying -- Whenever Sedraxis Specter deals combat damage to a player, that player discards a card. -- Unearth {1}{B} ({1}{B}: Return this card from your graveyard to the battlefield. It gains haste. Exile it at the beginning of the next end step or if it would leave the battlefield. Unearth only as a sorcery.) mana={U}{B}{R} @@ -77608,6 +85998,17 @@ type=Enchantment subtype=Aura [/card] [card] +name=Seeker of the Way +auto=@movedTo(*[-creature]|mystack):1/1 ueot +auto=@movedTo(*[-creature]|mystack):lifelink ueot +text=Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) -- Whenever you cast a noncreature spell, Seeker of the Way gains lifelink until end of turn. +mana={1}{W} +type=Creature +subtype=Human Warrior +power=2 +toughness=2 +[/card] +[card] name=Seedtime restriction=during my turn auto=if casted(*[blue]|opponentstack) then turns:+1 controller @@ -77666,6 +86067,18 @@ mana={2}{R} type=Instant [/card] [card] +name=Segmented Krotiq +facedown={3} +autofacedown={6}{G}:morph +autofaceup=counter(1/1,1) +text=Megamorph {6}{G} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) +mana={5}{G} +type=Creature +subtype=Insect +power=6 +toughness=5 +[/card] +[card] name=Segmented Wurm auto=@targeted(this):counter(-1/-1,1) text=Whenever Segmented Wurm becomes the target of a spell or ability, put a -1/-1 counter on it. @@ -77693,6 +86106,16 @@ mana={R}{R}{R} type=Enchantment [/card] [card] +name=Seismic Elemental +auto=choice all(creature[-flying]) cantblock ueot +text=When Seismic Elemental enters the battlefield, creatures without flying can't block this turn. +mana={3}{R}{R} +type=Creature +subtype=Elemental +power=4 +toughness=4 +[/card] +[card] name=Seismic Mage auto={2}{R}{T}{discard(*|myhand)}:destroy target(land) text={2}{R}, {T}, Discard a card: Destroy target land. @@ -77703,6 +86126,13 @@ power=1 toughness=1 [/card] [card] +name=Seismic Rupture +auto=damage:2 all(creature[-flying]|battlefield) +text=Seismic Rupture deals 2 damage to each creature without flying. +mana={2}{R} +type=Sorcery +[/card] +[card] name=Seismic Shudder auto=damage:1 all(creature[-flying]) text=Seismic Shudder deals 1 damage to each creature without flying. @@ -77719,6 +86149,13 @@ mana={2}{R}{R} type=Sorcery [/card] [card] +name=Seismic Stomp +auto=all(creature[-flying]) cantblock ueot +text=Creatures without flying can't block this turn. +mana={1}{R} +type=Sorcery +[/card] +[card] name=Seismic Strike target=creature auto=damage:type:mountain:mybattlefield @@ -77973,25 +86410,34 @@ auto=choice name(Sorcery) moveTo(myexile) notatarget(sorcery|myhand) && counter( auto=choice name(Tribal Instant) moveTo(myexile) notatarget(instant[tribal]|myhand) && counter(0/0,1,TribalInstant) all(this) auto=choice name(Tribal Sorcery) moveTo(myexile) notatarget(sorcery[tribal]|myhand) && counter(0/0,1,TribalSorcery) all(this) auto=choice name(cancel) donothing -auto=this(counter{0/0.1.Artifact}) lord(artifact|myhand) altercost(colorless,-2) -auto=this(counter{0/0.1.ArtifactCreature}) lord(artifact[-creature]|myhand) altercost(colorless,-2) -auto=this(counter{0/0.1.ArtifactCreature}) lord(creature[-artifact]|myhand) altercost(colorless,-2) -auto=this(counter{0/0.1.ArtifactCreature}) lord(creature[artifact]|myhand) altercost(colorless,-2 ) -auto=this(counter{0/0.1.Creature}) lord(creature|myhand) altercost(colorless,-2) -auto=this(counter{0/0.1.Enchantment}) lord(enchantment|myhand) altercost(colorless,-2) -auto=this(counter{0/0.1.Instant}) lord(instant|myhand) altercost(colorless,-2) -auto=this(counter{0/0.1.Sorcery}) lord(sorcery|myhand) altercost( colorless, -2 ) -auto=this(counter{0/0.1.TribalInstant}) lord(tribal[-instant]|myhand) altercost(colorless,-2) -auto=this(counter{0/0.1.TribalInstant}) lord(instant[-tribal]|myhand) altercost(colorless,-2) -auto=this(counter{0/0.1.TribalInstant}) lord(instant[tribal]|myhand) altercost(colorless,-2 ) -auto=this(counter{0/0.1.TribalSorcery}) lord(tribal[-sorcery]|myhand) altercost(colorless,-2) -auto=this(counter{0/0.1.TribalSorcery}) lord(sorcery[-tribal]|myhand) altercost(colorless,-2) -auto=this(counter{0/0.1.TribalSorcery}) lord(sorcery[tribal]|myhand) altercost(colorless,-2) +auto=this(counter{0/0.1.Artifact}) lord(artifact|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) +auto=this(counter{0/0.1.ArtifactCreature}) lord(artifact[-creature]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) +auto=this(counter{0/0.1.ArtifactCreature}) lord(creature[-artifact]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) +auto=this(counter{0/0.1.ArtifactCreature}) lord(creature[artifact]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2 ) +auto=this(counter{0/0.1.Creature}) lord(creature|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) +auto=this(counter{0/0.1.Enchantment}) lord(enchantment|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) +auto=this(counter{0/0.1.Instant}) lord(instant|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) +auto=this(counter{0/0.1.Sorcery}) lord(sorcery|myhand,mylibrary,mygraveyard,myexile) altercost( colorless, -2 ) +auto=this(counter{0/0.1.TribalInstant}) lord(tribal[-instant]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) +auto=this(counter{0/0.1.TribalInstant}) lord(instant[-tribal]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) +auto=this(counter{0/0.1.TribalInstant}) lord(instant[tribal]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2 ) +auto=this(counter{0/0.1.TribalSorcery}) lord(tribal[-sorcery]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) +auto=this(counter{0/0.1.TribalSorcery}) lord(sorcery[-tribal]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) +auto=this(counter{0/0.1.TribalSorcery}) lord(sorcery[tribal]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) text=Imprint - When Semblance Anvil enters the battlefield, you may exile a nonland card from your hand. -- Spells you cast that share a card type with the exiled card cost {2} less to cast. mana={3} type=Artifact [/card] [card] +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. +mana={1}{U} +type=Instant +[/card] +[card] name=Sengir Autocrat auto=token(Serf,creature serf,0/1,black)*3 auto=@movedTo(this|nonbattlezone) from(battlefield):moveTo(exile) all(serf) @@ -78070,6 +86516,16 @@ type=Enchantment subtype=Aura [/card] [card] +name=Sentinel Sliver +auto=lord(sliver|mybattlefield) vigilance +text=All Sliver creatures you control have vigilance. +mana={1}{W} +type=Creature +subtype=Sliver +power=2 +toughness=2 +[/card] +[card] name=Sentinel Spider abilities=vigilance,reach text=Vigilance (Attacking doesn't cause this creature to tap.) -- Reach (This creature can block creatures with flying.) @@ -78080,6 +86536,17 @@ power=4 toughness=4 [/card] [card] +name=Sentinel of the Eternal Watch +abilities=vigilance +auto=@each opponent combatbegins:tap target(creature|opponentbattlefield) +text=Vigilance (Attacking doesn't cause this creature to tap.) -- At the beginning of combat on each opponent's turn, tap target creature that player controls. +mana={5}{W} +type=Creature +subtype=Giant Soldier +power=4 +toughness=6 +[/card] +[card] name=Sentinels of Glen Elendra abilities=flash,flying text=Flash -- Flying @@ -78090,6 +86557,27 @@ power=2 toughness=3 [/card] [card] +name=Sentry of the Underworld +abilities=flying,vigilance +auto={W}{B}{L}{L}{L}:regenerate +text={W}{B}, Pay 3 life: Regenerate Sentry of the Underworld. +mana={3}{W}{B} +type=Creature +subtype=Griffin Skeleton +power=3 +toughness=3 +[/card] +[card] +name=Separatist Voidmage +auto=may moveto(ownerhand) target(creature|battlefield) +text=When Separatist Voidmage enters the battlefield, you may return target creature to its owner's hand. +mana={3}{U} +type=Creature +subtype=Human Wizard +power=2 +toughness=2 +[/card] +[card] name=Septic Rats abilities=infect auto=@combat(attacking) source(this) opponentpoisoned:1/1 ueot @@ -78122,6 +86610,17 @@ power=2 toughness=4 [/card] [card] +name=Seraph of the Sword +abilities=flying +auto=preventAllCombatDamage to(this) +text=Flying. -- Prevent all combat damage that would be dealt to Seraph of the Sword. +mana={3}{W} +type=Creature +subtype=Angel +power=3 +toughness=3 +[/card] +[card] name=Seraph Sanctuary auto=life:1 controller auto=@movedTo(angel|mybattlefield):life:1 controller @@ -78243,7 +86742,7 @@ toughness=3 name=Serpent of the Endless Sea abilities=cantattack auto=aslongas(island|opponentBattlefield) -cantattack -auto=foreach(island|myBattlefield) 1/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} type=Creature @@ -78316,7 +86815,7 @@ toughness=1 [/card] [card] name=Serra Avatar -auto=thisforeach(controllerlife) 1/1 +anyzone=lifetotal/lifetotal cdaactive autograveyard=moveTo(ownerlibrary) && shuffle text=Serra Avatar's power and toughness are each equal to your life total. -- When Serra Avatar is put into a graveyard from anywhere, shuffle it into its owner's library. mana={4}{W}{W}{W} @@ -78428,18 +86927,8 @@ subtype=Aura [card] name=Serra's Liturgy auto=@each my upkeep:may counter(0/0,1,Verse) -auto=this(counter{0/0.1.Verse}=) {W}{S}:destroy target(artifact,enchantment) -auto=this(counter{0/0.2.Verse}=) {W}{S}:destroy target(artifact,enchantment) -auto=this(counter{0/0.3.Verse}=) {W}{S}:destroy target(artifact,enchantment) -auto=this(counter{0/0.4.Verse}=) {W}{S}:destroy target(artifact,enchantment) -auto=this(counter{0/0.5.Verse}=) {W}{S}:destroy target(artifact,enchantment) -auto=this(counter{0/0.6.Verse}=) {W}{S}:destroy target(artifact,enchantment) -auto=this(counter{0/0.7.Verse}=) {W}{S}:destroy target(artifact,enchantment) -auto=this(counter{0/0.8.Verse}=) {W}{S}:destroy target(artifact,enchantment) -auto=this(counter{0/0.9.Verse}=) {W}{S}:destroy target(artifact,enchantment) -auto=this(counter{0/0.10.Verse}=) {W}{S}:destroy target(artifact,enchantment) -auto=this(counter{0/0.11.Verse}=) {W}{S}:destroy target(artifact,enchantment) -auto=this(counter{0/0.12.Verse}=) {W}{S}:destroy target(artifact,enchantment) +auto=this(counter{0/0.1.Verse}<1) {W}{S}:name(do nothing) donothing +auto=this(counter{0/0.1.Verse}>0) {W}{S}:destroy target(artifact,enchantment) text=At the beginning of your upkeep, you may put a verse counter on Serra's Liturgy. -- {W}, Sacrifice Serra's Liturgy: Destroy up to X target artifacts and/or enchantments, where X is the number of verse counters on Serra's Liturgy. mana={2}{W}{W} type=Enchantment @@ -78470,6 +86959,14 @@ power=2 toughness=2 [/card] [card] +name=Serum Powder +auto={T}:Add{1} +autohand={0}:serumpowder +text={T}: Add {1} to your mana pool. -- Any time you could mulligan and Serum Powder is in your hand, you may exile all the cards from your hand, then draw that many cards. (You can do this in addition to taking mulligans.) +mana={3} +type=Artifact +[/card] +[card] name=Serum Tank auto=counter(0/0,1,Charge) auto=@movedTo(other artifact|Battlefield):counter(0/0,1,Charge) @@ -78489,6 +86986,17 @@ power=3 toughness=1 [/card] [card] +name=Servant of the Scale +auto=counter(1/1,1) +auto=@movedTo(this|mygraveyard) from(myBattlefield):choice thisforeach(counter{1/1.1}) counter(1/1,1) target(creature|mybattlefield) +text=Servant of the Scale enters the battlefield with a +1/+1 counter on it. -- When Servant of the Scale dies, put X +1/+1 counters on target creature you control, where X is the number of +1/+1 counters on Servant of the Scale. +mana={G} +type=Creature +subtype=Human Soldier +power=0 +toughness=0 +[/card] +[card] name=Servant of Tymaret auto=@untapped(this):life:-1 opponent && life:1 controller auto={2}{B}:regenerate @@ -78521,6 +87029,27 @@ power=3 toughness=4 [/card] [card] +name=Setessan Battle Priest +auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):life:2 controller +text=Heroic - Whenever you cast a spell that targets Setessan Battle Priest, you gain 2 life. +mana={1}{W} +type=Creature +subtype=Human Cleric +power=1 +toughness=3 +[/card] +[card] +name=Setessan Griffin +abilities=flying +auto={2}{G}{G}: 2/2 ueot limit:1 +text=Flying. -- {2}{G}{G}:Setessan Griffin gets +2/+2 until end of turn. Activate this ability only once each turn. +mana={4}{W} +type=Creature +subtype=Griffin +power=3 +toughness=2 +[/card] +[card] name=Setessan Oathsworn auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):counter(1/1,2) text=Heroic -- Whenever you cast a spell that targets Setessan Oathsworn, put two +1/+1 counters on Setessan Oathsworn. @@ -78602,8 +87131,8 @@ toughness=2 [/card] [card] name=Sewer Nemesis -auto=choice name(opponent) transforms((,newability[foreach(*|opponentgraveyard) 1/1],newability[@movedTo(*|opponentstack):deplete:1 opponent])) forever -auto=choice name(you) transforms((,newability[foreach(*|mygraveyard) 1/1],newability[@movedTo(*|mystack):deplete:1 controller])) forever +auto=choice name(opponent) transforms((,newability[type:*:opponentgraveyard/type:*:opponentgraveyard cdaactive],newability[@movedTo(*|opponentstack):deplete:1 opponent])) forever +auto=choice name(you) transforms((,newability[type:*:mygraveyard/type:*:mygraveyard cdaactive],newability[@movedTo(*|mystack):deplete:1 controller])) forever text=As Sewer Nemesis enters the battlefield, choose a player. -- Sewer Nemesis's power and toughness are each equal to the number of cards in the chosen player's graveyard. -- Whenever the chosen player casts a spell, that player puts the top card of his or her library into his or her graveyard. mana={3}{B} type=Creature @@ -78775,6 +87304,38 @@ text={1}, {T}: Add {B}{R} to your mana pool. type=Land [/card] [card] +name=Shadowborn Apostle +auto={B}{S(Shadowborn Apostle|myBattlefield)}{S(Shadowborn Apostle|myBattlefield)}{S(Shadowborn Apostle|myBattlefield)}{S(Shadowborn Apostle|myBattlefield)}{S(Shadowborn Apostle|myBattlefield)}{S(Shadowborn Apostle|myBattlefield)}:moveTo(mybattlefield) target(creature[Demon]|mylibrary) +text= A deck can have any number of cards named Shadowborn Apostle. -- {B}, Sacrifice six creatures named Shadowborn Apostle: Search your library for a Demon creature card and put it onto the battlefield. Then shuffle your library. +mana={B} +type=Creature +subtype=Human Cleric +power=1 +toughness=1 +[/card] +[card] +name=Shadowborn Demon +abilities=flying +auto=destroy target(creature[-demon]) +auto=@each myupkeep:if type(creature|mygraveyard)~lessthan~6 then sacrifice +text=Flying -- When Shadowborn Demon enters the battlefield, destroy target non-demon creature. -- At the beginning of your upkeep, if there are fewer than six creature cards in your graveyard, sacrifice a creature. +mana={3}{B}{B} +type=Creature +subtype=Demon +power=5 +toughness=6 +[/card] +[card] +name=Shadowcloak Vampire +auto={L}{L}:flying ueot +text=Pay 2 life: Shadowcloak Vampire gains flying until end of turn. +mana={4}{B} +type=Creature +subtype=Vampire +power=4 +toughness=3 +[/card] +[card] name=Shadowfeed target=*|graveyard auto=moveto(exile) @@ -78825,6 +87386,46 @@ power=3 toughness=2 [/card] [card] +name=Shaman of Spring +auto=draw:1 +text=When Shaman of Spring enters the battlefield, draw a card. +mana={3}{G} +type=Creature +subtype=Elf Shaman +power=2 +toughness=2 +[/card] +[card] +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. +mana={3}{R} +type=Creature +subtype=Orc Shaman +power=4 +toughness=2 +[/card] +[card] +name=Shaman of the Pack +auto=life:-type:elf:mybattlefield target(opponent) +text=When Shaman of the Pack enters the battlefield, target opponent loses life equal to the number of Elves you control. +mana={1}{B}{G} +type=Creature +subtype=Elf Shaman +power=3 +toughness=2 +[/card] +[card] +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. +mana={3}{G}{G} +type=Sorcery +[/card] +[card] name=Shambleshark abilities=flash auto=evolve @@ -78836,6 +87437,26 @@ power=2 toughness=1 [/card] [card] +name=Shambling Ghoul +auto=tap +text=Shambling Ghoul enters the battlefield tapped. +mana={1}{B} +type=Creature +subtype=Zombie +power=2 +toughness=3 +[/card] +[card] +name=Shambling Goblin +auto=@movedTo(this|graveyard) from(battlefield):-1/-1 target(creature|opponentbattlefield) ueot +text=When Shambling Goblin dies, target creature an opponent controls gets -1/-1 until end of turn. +mana={B} +type=Creature +subtype=Zombie Goblin +power=1 +toughness=1 +[/card] +[card] name=Shambling Remains abilities=cantblock autograveyard={B}{R}:moveto(mybattlefield) && transforms((,unearth,haste)) asSorcery forever @@ -78878,6 +87499,15 @@ power=1 toughness=1 [/card] [card] +name=Shape the Sands +target=creature|battlefield +auto=0/5 ueot +auto=reach ueot +text=Target creature gets +0/+5 and gains reach until end of turn. (It can block creatures with flying.) +mana={G} +type=Instant +[/card] +[card] name=Shaper Guildmage auto={W}{T}:first strike target(creature) auto={B}{T}:1/0 target(creature) @@ -79077,17 +87707,31 @@ toughness=2 [/card] [card] name=Shelter -auto=choice protection from white target(creature|myBattlefield) ueot -auto=choice protection from blue target(creature|myBattlefield) ueot -auto=choice protection from black target(creature|myBattlefield) ueot -auto=choice protection from red target(creature|myBattlefield) ueot -auto=choice protection from green target(creature|myBattlefield) ueot +target=creature|mybattlefield +auto=choice name(green) transforms((,newability[protection from green])) ueot +auto=choice name(red) transforms((,newability[protection from red])) ueot +auto=choice name(blue) transforms((,newability[protection from blue])) ueot +auto=choice name(black) transforms((,newability[protection from black])) ueot +auto=choice name(white) transforms((,newability[protection from white])) ueot auto=draw:1 controller text=Target creature you control gains protection from the color of your choice until end of turn. -- Draw a card. mana={1}{W} type=Instant [/card] [card] +name=Sheltered Aerie +target=land|battlefield +auto=teach(land) {T}:add{G}{G} +auto=teach(land) {T}:add{W}{W} +auto=teach(land) {T}:add{U}{U} +auto=teach(land) {T}:add{R}{R} +auto=teach(land) {T}:add{B}{B} +text=Enchant land -- Enchanted land has "{T}: Add two mana of any one color to your mana pool." +mana={2}{G} +type=Enchantment +subtype=Aura +[/card] +[card] name=Sheltered Valley auto=sacrifice all(other sheltered valley|mybattlefield) auto={T}:Add{1} @@ -79242,6 +87886,20 @@ mana={W} type=Instant [/card] [card] +name=Shieldhide Dragon +abilities=flying,lifelink +facedown={3} +autofacedown={5}{W}{W}:morph +autofaceup=counter(1/1,1) +autofaceup=counter(1/1,1) all(other creature[dragon]|mybattlefield) +text=Flying, lifelink -- Megamorph {5}{W}{W} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) -- When Shieldhide Dragon is turned face up, put a +1/+1 counter on each other Dragon creature you control. +mana={5}{W} +type=Creature +subtype=Dragon +power=3 +toughness=3 +[/card] +[card] name=Shielding Plax target=creature auto=opponentshroud @@ -79292,6 +87950,7 @@ toughness=2 [/card] [card] name=Shifting Sky +alias=1000 auto=chooseacolor lord(*[-land]) becomes(,chosencolor) chooseend text=As Shifting Sky enters the battlefield, choose a color. -- All nonland permanents are the chosen color. mana={2}{U} @@ -79321,8 +87980,9 @@ toughness=0 [card] name=Shimian Specter abilities=flying -auto=@combatdamaged(opponent) from(this) restriction{type(*[-land]|opponenthand)~morethan~0}:name(exile a nonland) notatarget(*[-land]|opponenthand) transforms((,newability[all(*[share!name!]|mylibrary) moveto(exile) and!(shuffle)!],newability[all(*[share!name!]|mygraveyard) moveto(exile)],newability[all(*[share!name!]|myhand) moveto(exile)])) -auto=@combatdamaged(opponent) from(this) restriction{type(*[-land]|opponenthand)~lessthan~1}:name(look) notatarget(*|opponenthand) donothing +auto=@combatdamagefoeof(player) from(this) restriction{type(*[-land]|opponenthand)~morethan~0}:name(exile a nonland) notatarget(*[-land]|opponenthand) transforms((,newability[all(*[share!name!]|mylibrary) moveto(exile) and!(shuffle)!],newability[all(*[share!name!]|mygraveyard) moveto(exile)],newability[all(*[share!name!]|myhand) moveto(exile)])) +auto=@combatdamageof(player) from(this) restriction{type(*[-land]|myhand)~morethan~0}:name(exile a nonland) notatarget(*[-land]|myhand) transforms((,newability[all(*[share!name!]|mylibrary) moveto(exile) and!(shuffle)!],newability[all(*[share!name!]|mygraveyard) moveto(exile)],newability[all(*[share!name!]|myhand) moveto(exile)])) +auto=@combatdamagefoeof(player) from(this) restriction{type(*[-land]|opponenthand)~lessthan~1}:name(look) notatarget(*|opponenthand) donothing text=Flying -- Whenever Shimian Specter deals combat damage to a player, that player reveals his or her hand. You choose a nonland card from it. Search that player's graveyard, hand, and library for all cards with the same name as that card and exile them. Then that player shuffles his or her library. mana={2}{B}{B} type=Creature @@ -79499,9 +88159,22 @@ text={T}: Add {R} to your mana pool. -- {R}, {T}: Target legendary creature gain type=Legendary Land [/card] [card] +name=Shipwreck Singer +abilities=flying +auto={1}{U}:mustattack target(creature|opponentinplay) ueot +auto={1}{B}{T}:all(creature[attacking]) -1/-1 ueot +text=Flying. -- {1}{U}: Target creature an opponent controls attacks this turn if able. -- {1}{B}{T}: Attacking creatures get -1/-1 until end of turn. +mana={U}{B} +type=Creature +subtype=Siren +power=1 +toughness=2 +[/card] +[card] name=Shisato, Whispering Hunter auto=@each my upkeep:target(snake|mybattlefield) sacrifice -auto=@combatdamaged(opponent) from(this):nextphasealter(remove,untap,opponent) +auto=@combatdamagefoeof(player) from(this):nextphasealter(remove,untap,opponent) +auto=@combatdamageof(player) from(this):nextphasealter(remove,untap,controller) text=At the beginning of your upkeep, sacrifice a Snake. -- Whenever Shisato, Whispering Hunter deals combat damage to a player, that player skips his or her next untap step. mana={3}{G} type=Legendary Creature @@ -79683,8 +88356,8 @@ toughness=2 [/card] [card] name=Shocker -auto=@damaged(opponent) from(this):all(*|opponenthand) transforms((,newability[reject],newability[draw:1])) ueot -auto=@damaged(controller) from(this):all(*|myhand) transforms((,newability[reject],newability[draw:1])) ueot +auto=@damagefoeof(player) from(this):all(*|opponenthand) transforms((,newability[reject],newability[draw:1])) ueot +auto=@damageof(player) from(this):all(*|myhand) transforms((,newability[reject],newability[draw:1])) ueot text=Whenever Shocker deals damage to a player, that player discards all the cards in his or her hand, then draws that many cards. mana={1}{R} type=Creature @@ -79693,6 +88366,18 @@ power=1 toughness=1 [/card] [card] +name=Shockmaw Dragon +abilities=flying +auto=@combatdamagefoeof(player) from(this):all(creature|opponentbattlefield) damage:1 +auto=@combatdamageof(player) from(this):all(creature|mybattlefield) damage:1 +text=Flying -- Whenever Shockmaw Dragon deals combat damage to a player, it deals 1 damage to each creature that player controls. +mana={4}{R}{R} +type=Creature +subtype=Dragon +power=4 +toughness=4 +[/card] +[card] name=Shore Snapper auto={U}:islandwalk text={U}: Shore Snapper gains islandwalk until end of turn. @@ -79809,6 +88494,14 @@ mana={1}{B} type=Instant [/card] [card] +name=Shredding Winds +target=creature[flying] +auto=damage:7 +text=Shredding Winds deals 7 damage to target creature with flying. +mana={2}{G} +type=Instant +[/card] +[card] name=Shrewd Hatchling auto={UR}:target(creature) ueot cantbeblockerof(this) auto=@movedTo(*[red]|mystack):counter(-1/-1,-1) @@ -79842,7 +88535,8 @@ toughness=3 [card] name=Shriekgeist abilities=flying -auto=@combatdamaged(player) from(this):deplete:2 opponent +auto=@combatdamagefoeof(player) from(this):deplete:2 opponent +auto=@combatdamageof(player) from(this):deplete:2 controller text=Flying -- Whenever Shriekgeist deals combat damage to a player, that player puts the top two cards of his or her library into his or her graveyard. mana={1}{U} type=Creature @@ -80061,6 +88755,17 @@ power=2 toughness=4 [/card] [card] +name=Shu Yun, the Silent Tempest +auto=@movedTo(*[-creature]|mystack):1/1 ueot +auto=@movedTo(*[-creature]|mystack):name(Pay {RW}{RW} for Double Strike) pay({RW}{RW}) name(double Strike) target(creature) double strike ueot +text=Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) -- Whenever you cast a noncreature spell, you may pay Red or WhiteRed or White. If you do, target creature gains double strike until end of turn. +mana={2}{U} +type=Legendary Creature +subtype=Human Monk +power=3 +toughness=2 +[/card] +[card] name=Shuko auto={0}:equip auto=1/0 @@ -80091,6 +88796,26 @@ power=5 toughness=6 [/card] [card] +name=Sibsig Host +auto=choice all(player) deplete:3 +text=When Sibsig Host enters the battlefield, each player puts the top three cards of his or her library into his or her graveyard. +mana={4}{B} +type=Creature +subtype=Zombie +power=2 +toughness=6 +[/card] +[card] +name=Sibsig Icebreakers +auto=transforms((,newability[ability$!name(discard) notatarget(*|myhand) reject!$ controller],newability[ability$!name(discard) notatarget(*|myhand) reject!$ opponent])) ueot +text=When Sibsig Icebreakers enters the battlefield, each player discards a card. +mana={2}{B} +type=Creature +subtype=Zombie +power=2 +toughness=3 +[/card] +[card] name=Sick and Tired target=<2>creature auto=-1/-1 @@ -80162,6 +88887,51 @@ power=1 toughness=1 [/card] [card] +name=Sidisi, Undead Vizier +abilities=deathtouch +auto=may name(Exploit) sacrifice notatarget(creature|mybattlefield) && transforms((,newability[moveto(myhand) notatarget(*|mylibrary)])) forever +text=Deathtouch -- Exploit (When this creature enters the battlefield, you may sacrifice a creature.) -- When Sidisi, Undead Vizier exploits a creature, you may search your library for a card, put it into your hand, then shuffle your library. +mana={3}{B}{B} +type=Legendary Creature +subtype=Zombie Naga +power=4 +toughness=6 +[/card] +[card] +name=Sidisi's Faithful +auto=may name(Exploit) sacrifice notatarget(creature|mybattlefield) && transforms((,newability[moveto(myhand) target(creature|battlefield)])) forever +text=Exploit (When this creature enters the battlefield, you may sacrifice a creature.) -- When Sidisi's Faithful exploits a creature, return target creature to its owner's hand. +mana={U} +type=Creature +subtype=Naga Wizard +power=0 +toughness=4 +[/card] +[card] +name=Sidisi's Pet +abilities=Lifelink +facedown={3} +autofacedown={1}{B}:morph +text=Lifelink (Damage dealt by this creature also causes you to gain that much life.) -- Morph {1}{B} (You may cast this card face down as a 2/2 creature for 3. Turn it face up any time for its morph cost.) +mana={3}{B} +type=Creature +subtype=Zombie Ape +power=1 +toughness=4 +[/card] +[card] +name=Siege Dragon +abilities=flying +auto=destroy all(creature[wall]|opponentbattlefield) +auto=@combat(attacking) source(this) restriction{type(creature[wall]|opponentbattlefield)~lessthan~1}:damage:2 all(creature|opponentbattlefield) +text=Flying. -- When Siege Dragon enters the battlefield, destroy all Walls your opponent controls. -- Whenever Siege Dragon attacks, if your opponent control no Walls, it deals 2 damage to each creature without flying defending player controls. +mana={5}{R}{R} +type=Creature +subtype=Dragon +power=5 +toughness=5 +[/card] +[card] name=Siege Mastodon mana={4}{W} type=Creature @@ -80170,6 +88940,27 @@ power=3 toughness=5 [/card] [card] +name=Siege Rhino +abilities=trample +auto=all(opponent) life:-3 +auto=life:3 controller +text=Trample. -- When Siege Rhino enters the battlefield, each opponent loses 3 life and you gain 3 life. +mana={1}{W}{B}{G} +type=Creature +subtype=Rhino +power=4 +toughness=5 +[/card] +[card] +name=Siegecraft +target=creature +auto=teach(creature) 2/4 +text=Enchant creature -- Enchanted creature gets +2/+4. +mana={3}{W} +type=Enchantment +subtype=Aura +[/card] +[card] name=Siege-Gang Commander auto=token(Goblin,Creature Goblin,1/1,red)*3 auto={1}{R}{S(goblin|myBattlefield)}:Damage:2 target(creature,player) @@ -80199,6 +88990,13 @@ type=Instant subtype=Arcane [/card] [card] +name=Sight of the Scalelords +auto=@each my combatbegins restriction{type(creature[toughness>=4]|mybattlefield)~morethan~0}:all(creature[toughness>=4]|mybattlefield) transforms((,newability[2/2 ueot],newability[vigilance ueot])) ueot +text=At the beginning of combat on your turn, creatures you control with toughness 4 or greater get +2/+2 and gain vigilance until end of turn. +mana={4}{G} +type=Enchantment +[/card] +[card] name=Sighted-Caste Sorcerer abilities=exalted auto={U}:shroud @@ -80251,7 +89049,8 @@ subtype=Equipment [card] name=Sigil of Sleep target=creature -auto=@damaged(player) from(mytgt):moveto(ownerhand) target(creature|opponentbattlefield) +auto=@damagefoeof(player) from(mytgt):moveto(ownerhand) target(creature|opponentbattlefield) +auto=@damageof(player) from(mytgt):moveto(ownerhand) target(creature|mybattlefield) text=Enchant creature -- Whenever enchanted creature deals damage to a player, return target creature that player controls to its owner's hand. mana={U} type=Enchantment @@ -80339,6 +89138,15 @@ mana={W} type=Instant [/card] [card] +name=Silent Artisan +text= +mana={3}{W}{W} +type=Creature +subtype=Giant +power=3 +toughness=5 +[/card] +[card] name=Silent Assassin auto={3}{B}:target(creature[blocking]) phaseaction[combatends once] destroy text={3}{B}: Destroy target blocking creature at end of combat. @@ -80368,9 +89176,21 @@ mana={U} type=Sorcery [/card] [card] +name=Silent Sentinel +abilities=flying +auto=@combat(attacking) source(this):may target(enchantment|mygraveyard) castcard(putinplay) +text=Flying -- Whenever Silent Sentinel attacks, you may return target enchantment card from your graveyard to the battlefield. +mana={5}{W}{W} +type=Creature +subtype=Archon +power=4 +toughness=6 +[/card] +[card] name=Silent Specter abilities=flying -auto=@combatdamaged(player) from(this):ability$!name(discard 2 cards) target(<2>*|myhand) reject!$ opponent +auto=@combatdamagefoeof(player) from(this):ability$!name(discard 2 cards) target(<2>*|myhand) reject!$ opponent +auto=@combatdamageof(player) from(this):ability$!name(discard 2 cards) target(<2>*|myhand) reject!$ controller facedown={3} autofacedown={3}{B}{B}:morph text=Flying -- Whenever Silent Specter deals combat damage to a player, that player discards two cards. -- Morph {3}{B}{B} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) @@ -80383,7 +89203,8 @@ toughness=4 [card] name=Silent-Blade Oni autohand={4}{U}{B}{N}:ninjutsu -auto=@combatdamaged(player) from(this):may target(*[-land]|opponenthand) castcard(normal) +auto=@combatdamagefoeof(player) from(this):may target(*[-land]|opponenthand) castcard(restricted) +auto=@combatdamageof(player) from(this):may target(*[-land]|myhand) castcard(restricted) text=Ninjutsu {4}{U}{B} ({4}{U}{B}, Return an unblocked attacker you control to hand: Put this card onto the battlefield from your hand tapped and attacking.) -- Whenever Silent-Blade Oni deals combat damage to a player, look at that player's hand. You may cast a nonland card in it without paying that card's mana cost. mana={3}{U}{U}{B}{B} type=Creature @@ -80414,6 +89235,7 @@ toughness=1 [/card] [card] name=Silhana Starfletcher +alias=1000 abilities=reach auto=activatechooseacolor {T}:add{chosencolor} activatechooseend text=Reach (This creature can block creatures with flying.) -- As Silhana Starfletcher enters the battlefield, choose a color. -- {T}: Add one mana of the chosen color to your mana pool. @@ -80486,6 +89308,13 @@ power=2 toughness=1 [/card] [card] +name=Silkwrap +auto=(blink)forsrc target(creature[manacost<=3]|opponentbattlefield) +text=When Silkwrap enters the battlefield, exile target creature with converted mana cost 3 or less an opponent controls until Silkwrap leaves the battlefield. (That creature returns under its owner's control.) +mana={1}{W} +type=Enchantment +[/card] +[card] name=Silt Crawler auto=tap all(land|myBattlefield) text=When Silt Crawler enters the battlefield, tap all lands you control. @@ -80496,6 +89325,82 @@ power=3 toughness=3 [/card] [card] +name=Silumgar, the Drifting Death +abilities=flying,opponentshroud +auto=@combat(attacking) source(dragon|mybattlefield):all(creature|opponentbattlefield) -1/-1 ueot +text=Flying,hexproof. -- Whenever a Dragon you control attacks, creatures defending player control each get -1/-1 until end of turn. +mana={4}{U}{B} +type=Legendary Creature +subtype=Dragon +power=3 +toughness=7 +[/card] +[card] +name=Silumgar Assassin +abilities=evadebigger +facedown={3} +autofacedown={2}{B}:morph +autofaceup=counter(1/1,1) +autofaceup=destroy target(creature[power<=3]|opponentbattlefield) +text=Creatures with power greater than Silumgar Assassin's power can't block it. -- Megamorph {2}{B} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) -- When Silumgar Assassin is turned face up, destroy target creature with power 3 or less an opponent controls. +mana={1}{B} +type=Creature +subtype=Human Assassin +power=2 +toughness=1 +[/card] +[card] +name=Silumgar Butcher +auto=may name(Exploit) sacrifice notatarget(creature|mybattlefield) && transforms((,newability[target(creature|battlefield) -3/-3 ueot])) forever +text=Exploit (When this creature enters the battlefield, you may sacrifice a creature.) -- When Silumgar Butcher exploits a creature, target creature gets -3/-3 until end of turn. +mana={4}{B} +type=Creature +subtype=Zombie Djinn +power=3 +toughness=3 +[/card] +[card] +name=Silumgar Monument +auto={T}:add{U} +auto={T}:add{B} +auto={4}{U}{B}:becomes(Artifact Creature Dragon,4/4,flying,blue,black) ueot +text={T}: Add {U} or {B} to your mana pool. -- {4}{U}{B}: Silumgar Monument becomes a 4/4 blue and black Dragon artifact creature with flying until end of turn. +mana={3} +type=Artifact +[/card] +[card] +name=Silumgar Sorcerer +abilities=flash,flying +auto=may name(Exploit) sacrifice notatarget(creature|mybattlefield) && transforms((,newability[target(creature|stack) fizzle])) forever +text=Flash (You may cast this spell any time you could cast an instant.) -- Flying -- Exploit (When this creature enters the battlefield, you may sacrifice a creature.) -- When Silumgar Sorcerer exploits a creature, counter target creature spell. +mana={1}{U}{U} +type=Creature +subtype=Human Wizard +power=2 +toughness=1 +[/card] +[card] +name=Silumgar Spell-Eater +facedown={3} +autofacedown={4}{U}:morph +autofaceup=counter(1/1,1) +autofaceup=target(*|stack) transforms((,newability[pay[[{3}]] name(pay 3 mana) donothing?fizzle])) forever +text=Megamorph {4}{U} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) -- When Silumgar Spell-Eater is turned face up, counter target spell unless its controller pays {3}. +mana={2}{U} +type=Creature +subtype=Naga Wizard +power=2 +toughness=3 +[/card] +[card] +name=Silumgar's Scorn +target=*|stack +auto=if type(dragon|mybattlefield)~morethan~0 then fizzle else if type(dragon|myhand)~morethan~0 then fizzle else transforms((,newability[pay[[{1}]] name(pay 1 mana) donothing?fizzle])) forever +text=As an additional cost to cast Silumgar's Scorn, you may reveal a Dragon card from your hand. -- Counter target spell unless its controller pays {1}. If you revealed a Dragon card or controlled a Dragon as you cast Silumgar's Scorn, counter that spell instead. +mana={U}{U} +type=Instant +[/card] +[card] name=Silver Drake abilities=flying auto=moveTo(ownerhand) notatarget(creature[white;blue]|myBattlefield) @@ -80668,7 +89573,7 @@ toughness=5 [/card] [card] name=Sima Yi, Wei Field Marshal -auto=foreach(swamp|myBattlefield) 1/0 +anyzone=type:swamp:myBattlefield/4 cdaactive text=Sima Yi, Wei Field Marshal's power is equal to the number of Swamps you control. mana={5}{B} type=Legendary Creature @@ -80859,6 +89764,17 @@ mana={R} type=Instant [/card] [card] +name=Singing Bell Strike +target=creature +auto=tap +auto=doesnotuntap +auto=teach(creature) {6}:untap +text=Enchant creature -- When Claustrophobia enters the battlefield, tap enchanted creature. -- Enchanted creature doesn't untap during its controller's untap step. -- Enchanted creature has "{6}: Untap this creature." +mana={1}{U} +type=Enchantment +subtype=Aura +[/card] +[card] name=Singing Tree auto={T}:target(creature[attacking]) transforms((,setpower=0)) ueot text={T}: Target attacking creature's power becomes 0 until end of turn. @@ -80915,6 +89831,15 @@ type=Enchantment subtype=Aura [/card] [card] +name=Sip of Hemlock +target=creature +auto=destroy +auto=life:-2 targetController +text=Destroy target creature. Its controller loses 2 life. +mana={4}{B}{B} +type=Sorcery +[/card] +[card] name=Sir Shandlar of Eberyn mana={4}{G}{W} type=Legendary Creature @@ -81288,7 +90213,8 @@ toughness=2 name=Skirk Commando facedown={3} autofacedown={2}{R}:morph -auto=@combatdamaged(opponent) from(this):may damage:2 target(creature|opponentbattlefield) +auto=@combatdamagefoeof(player) from(this):may damage:2 target(creature|opponentbattlefield) +auto=@combatdamageof(player) from(this):may damage:2 target(creature|mybattlefield) text=Whenever Skirk Commando deals combat damage to a player, you may have it deal 2 damage to target creature that player controls. -- Morph {2}{R} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) mana={1}{R}{R} type=Creature @@ -81634,7 +90560,8 @@ toughness=3 [card] name=Skullsnatcher autohand={B}{N}:ninjutsu -auto=@combatdamaged(player) from(this):may target(*|opponentgraveyard) moveTo(exile) +auto=@combatdamagefoeof(player) from(this):may target(*|opponentgraveyard) moveTo(exile) +auto=@combatdamageof(player) from(this):may target(*|mygraveyard) moveTo(exile) text=Ninjutsu {B} ({B}, Return an unblocked attacker you control to hand: Put this card onto the battlefield from your hand tapped and attacking.) -- Whenever Skullsnatcher deals combat damage to a player, exile up to two target cards from that player's graveyard. mana={1}{B} type=Creature @@ -81711,6 +90638,14 @@ power=2 toughness=1 [/card] [card] +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. +mana={3}{W}{W} +type=Enchantment +[/card] +[card] name=Skyblinder Staff auto={3}:equip auto=1/0 @@ -81857,6 +90792,16 @@ power=2 toughness=2 [/card] [card] +name=Skyraker Giant +abilities=reach +text=Reach (This creature can block creatures with flying.) +mana={2}{R}{R} +type=Creature +subtype=Giant +power=4 +toughness=3 +[/card] +[card] name=Skyreach Manta abilities=flying,sunburst auto=counter(1/1,sunburst) @@ -82093,7 +91038,7 @@ toughness=3 [card] name=Skyshroud War Beast abilities=trample -auto=foreach(land[-basic]|opponentBattlefield) 1/1 +anyzone=type:land[-basic]:opponentBattlefield/type:land[-basic]:opponentBattlefield cdaactive text=Trample -- As Skyshroud War Beast enters the battlefield, choose an opponent. -- Skyshroud War Beast's power and toughness are each equal to the number of nonbasic lands the chosen player controls. mana={1}{G} type=Creature @@ -82102,6 +91047,26 @@ power=* toughness=* [/card] [card] +name=Skysnare Spider +abilities=vigilance, reach +text=Vigilance (Attacking doesn't cause this creature to tap.) -- Reach (This creature can block creatures with flying.) +mana={4}{G}{G} +type=Creature +subtype=Spider +power=6 +toughness=6 +[/card] +[card] +name=Skyspear Cavalry +abilities=flying,double strike +text=Flying -- Double strike (This creature deals both first-strike and regular combat damage.) +mana={3}{W}{W} +type=Creature +subtype=Human Soldier +power=2 +toughness=2 +[/card] +[card] name=Skywatcher Adept auto={3}:counter(0/0,1,Level) asSorcery auto=this(counter{0/0.1.Level}) flying @@ -82137,6 +91102,13 @@ power=2 toughness=1 [/card] [card] +name=Skywise Teachings +auto=@movedto(*[-creature]|mystack):pay({1}{U}) name(Pay 1U mana) token(Djinn Monk,Creature Djinn Monk,2/2,flying,blue) controller +text=Whenever you cast a noncreature spell, you may pay {1}{U}. If you do, put a 2/2 blue Djinn Monk creature token with flying onto the battlefield. +mana={3}{U} +type=Enchantment +[/card] +[card] name=Sky-Eel School abilities=flying auto=draw:1 @@ -82150,7 +91122,8 @@ toughness=3 [/card] [card] name=Slag Fiend -auto=foreach(artifact|graveyard) 1/1 +alias=1111 +anyzone=type:artifact:graveyard/type:artifact:graveyard cdaactive text=Slag Fiend's power and toughness are each equal to the number of artifact cards in all graveyards. mana={R} type=Creature @@ -82274,7 +91247,8 @@ type=Sorcery [/card] [card] name=Slavering Nulls -auto=@combatdamaged(opponent) from(this) restriction{type(swamp|mybattlefield)~morethan~0}:may name(opponent discard) ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@combatdamagefoeof(player) from(this) restriction{type(swamp|mybattlefield)~morethan~0}:may name(opponent discard) ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@combatdamageof(player) from(this) restriction{type(swamp|mybattlefield)~morethan~0}:may name(discard) ability$!name(discard) target(*|myhand) reject!$ controller text=Whenever Slavering Nulls deals combat damage to a player, if you control a Swamp, you may have that player discard a card. mana={1}{R} type=Creature @@ -82341,7 +91315,7 @@ subtype=Aura name=Sleeper's Robe target=creature auto=fear -auto=@combatdamaged(opponent) from(mytgt):may draw:1 controller +auto=@combatdamagefoeof(player) from(mytgt):may draw:1 controller text=Enchant creature -- Enchanted creature has fear. (It can't be blocked except by artifact creatures and/or black creatures.) -- Whenever enchanted creature deals combat damage to an opponent, you may draw a card. mana={U}{B} type=Enchantment @@ -82587,6 +91561,25 @@ power=1 toughness=1 [/card] [card] +name=Sliver Construct +text= +mana={3} +type=Artifact Creature +subtype=Sliver Construct +power=2 +toughness=2 +[/card] +[card] +name=Sliver Hivelord +auto=lord(sliver|myBattlefield) indestructible +text=Sliver creatures you control have indestructible. (Damage and effects that say "destroy" don't destroy them.) +mana={W}{U}{B}{R}{G} +type=Legendary Creature +subtype=Sliver +power=5 +toughness=5 +[/card] +[card] name=Sliver Legion auto=lord(sliver) foreach(other sliver|battlefield) 1/1 text=All Sliver creatures get +1/+1 for each other Sliver on the battlefield. @@ -82836,6 +91829,16 @@ text=Smoldering Crater enters the battlefield tapped. -- {T}: Add {R} to your ma type=Land [/card] [card] +name=Smoldering Efreet +auto=@movedto(this|graveyard) from(battlefield):damage:2 controller +text=When Smoldering Efreet dies, it deals 2 damage to you. +mana={1}{R} +type=Creature +subtype=Efreet Monk +power=2 +toughness=2 +[/card] +[card] name=Smoldering Spires auto=tap auto=cantblock target(creature) ueot @@ -82945,7 +91948,8 @@ toughness=2 name=Snapping Thragg facedown={3} autofacedown={4}{R}{R}:morph -auto=@combatdamaged(opponent) from(this):may damage:3 target(creature|opponentbattlefield) +auto=@combatdamagefoeof(player) from(this):may damage:3 target(creature|opponentbattlefield) +auto=@combatdamageof(player) from(this):may damage:3 target(creature|mybattlefield) text=Whenever Snapping Thragg deals combat damage to a player, you may have it deal 3 damage to target creature that player controls. -- Morph {4}{R}{R} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) mana={4}{R} type=Creature @@ -83056,6 +92060,18 @@ power=1 toughness=1 [/card] [card] +name=Snowhorn Rider +abilities=trample +facedown={3} +autofacedown={2}{G}{U}{R}:morph +text=Trample -- Morph {2}{G}{U}{R} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) +mana={3}{G}{U}{R} +type=Creature +subtype=Human Warrior +power=5 +toughness=5 +[/card] +[card] name=Snow-Covered Forest text=G type=Basic Snow Land @@ -83158,6 +92174,7 @@ toughness=3 [/card] [card] name=Sol Grail +alias=1000 auto=chooseacolor transforms((,newability[{T}:add{chosencolor}])) forever chooseend text=As Sol Grail enters the battlefield, choose a color. -- {T}: Add one mana of the chosen color to your mana pool. mana={3} @@ -83275,6 +92292,17 @@ power=1 toughness=1 [/card] [card] +name=Soldier of the Pantheon +auto=protection from(*[multicolor]) +auto=@movedTo(*[multicolor]|opponentstack:life:1 controller +text=Protection from multicolored. -- Whenever an opponent casts a multicolored spell, you gain 1 life. +mana={W} +type=Creature +subtype=Human Soldier +power=2 +toughness=1 +[/card] +[card] name=Soldier Replica auto={1}{W}{S}:Damage:3 target(creature[attacking;blocking]) text={1}{W}, Sacrifice Soldier Replica: Soldier Replica deals 3 damage to target attacking or blocking creature. @@ -83427,7 +92455,8 @@ toughness=1 [card] name=Soltari Visionary abilities=shadow -auto=@damaged(player) from(this):destroy target(enchantment|opponentBattlefield) +auto=@damagefoeof(player) from(this):destroy target(enchantment|opponentBattlefield) +auto=@damageof(player) from(this):destroy target(enchantment|myBattlefield) text=Shadow (This creature can block or be blocked by only creatures with shadow.) -- Whenever Soltari Visionary deals damage to a player, destroy target enchantment that player controls. mana={1}{W}{W} type=Creature @@ -83446,6 +92475,17 @@ power=3 toughness=2 [/card] [card] +name=Somberwald Alpha +auto=lord(creature|mybattlefield) rampage(1/1,1) +auto={1}{G}:trample target(creature|mybattlefield) +text=Whenever a creature you control becomes blocked, it gets +1/+1 until end of turn. -- {1}{G}: Target creature you control gains trample until end of turn. (It can deal excess combat damage to defending player or planeswalker while attacking.) +mana={3}{G} +type=Creature +subtype=Wolf +power=3 +toughness=2 +[/card] +[card] name=Somberwald Dryad abilities=forestwalk text=Forestwalk @@ -83489,8 +92529,8 @@ toughness=1 [card] name=Somnophore abilities=flying -auto=@damaged(opponent) from(this):name(tap target creature) target(creature|opponentbattlefield) transforms((,newability[tap],newability[doesnotuntap])) -auto=@damaged(controller) from(this):name(tap target creature) target(creature|mybattlefield) transforms((,newability[tap],newability[doesnotuntap])) +auto=@damagefoeof(player) from(this):name(tap target creature) target(creature|opponentbattlefield) transforms((,newability[tap],newability[doesnotuntap])) +auto=@damageof(player) from(this):name(tap target creature) target(creature|mybattlefield) transforms((,newability[tap],newability[doesnotuntap])) text=Flying -- Whenever Somnophore deals damage to a player, tap target creature that player controls. That creature doesn't untap during its controller's untap step for as long as Somnophore remains on the battlefield. mana={2}{U}{U} type=Creature @@ -83605,7 +92645,7 @@ toughness=1 [card] name=Soramaro, First to Dream abilities=flying -auto=foreach(*|myhand) 1/1 +anyzone=type:*:myhand/type:*:myhand cdaactive auto={4}{H(land|myBattlefield)}:draw:1 text=Flying -- Soramaro, First to Dream's power and toughness are each equal to the number of cards in your hand. -- {4}, Return a land you control to its owner's hand: Draw a card. mana={4}{U}{U} @@ -83737,6 +92777,17 @@ type=Planeswalker subtype=Sorin [/card] [card] +name=Sorin, Solemn Visitor +auto=counter(0/0,4,loyalty) +auto={C(0/0,1,Loyalty)}:name(+1: 1/0 and Lifelink) emblem transforms((,newability[lord(creature|mybattlefield) 1/0],newability[lord(creature|mybattlefield) lifelink])) uynt +auto={C(0/0,-2,Loyalty)}:name(-2: vampire token) token(Vampire,Creature Vampire,2/2,black,flying) +auto={C(0/0,-6,Loyalty)}:name(-6: emblem) emblem transforms((,newability[@each opponent upkeep:ability$!name(sacrifice creature) notatarget(creature|mybattlefield) sacrifice!$ opponent])) forever dontremove +mana={2}{W}{B} +text=+1: Until your next turn, creatures you control get +1/+0 and gain lifelink. -- -2: Put a 2/2 black Vampire creature token with flying onto the battlefield. -- -6: You get an emblem with "At the beginning of each opponent's upkeep, that player sacrifices a creature." -- Starting Loyalty (4) +type=Planeswalker +subtype=Sorin +[/card] +[card] name=Sorin's Thirst target=creature auto=damage:2 @@ -83865,6 +92916,66 @@ mana={3}{W}{W} type=Instant [/card] [card] +name=Soul of Innistrad +abilities=deathtouch +auto={3}{B}{B}:target(creature|myGraveyard) moveTo(myHand) +autograveyard={3}{B}{B}{E}:target(creature|myGraveyard) moveTo(myHand) +text=Deathtouch -- {3}{B}{B}: Return up to three target creature cards from your graveyard to your hand. -- {3}{B}{B}{E}: Exile Soul of Innistrad from your graveyard: Return up to three target creature cards from your graveyard to your hand. +mana={4}{B}{B} +type=Creature +subtype=Avatar +power=6 +toughness=6 +[/card] +[card] +name=Soul of New Phyrexia +abilities=trample +auto={5}:all(*|mybattlefield) indestructible ueot +autograveyard={5}{E}:all(*|mybattlefield) indestructible ueot +text=Trample. -- {5}: Permanents you control gain indestructible until end of turn. -- {5}: Permanents you control gain indestructible until end of turn. +mana={6} +type=Artifact Creature +subtype=Avatar +power=6 +toughness=6 +[/card] +[card] +name=Soul of Ravnica +abilities=flying +auto={3}{U}{U}:aslongas(*[white]|myBattlefield) draw:1 && aslongas(*[blue]|myBattlefield) draw:1 && aslongas(*[black]|myBattlefield) draw:1 && aslongas(*[red]|myBattlefield) draw:1 && aslongas(*[green]|myBattlefield) draw:1 +autograveyard={3}{U}{U}{E}:aslongas(*[white]|myBattlefield) draw:1 && aslongas(*[blue]|myBattlefield) draw:1 && aslongas(*[black]|myBattlefield) draw:1 && aslongas(*[red]|myBattlefield) draw:1 && aslongas(*[green]|myBattlefield) draw:1 +text=Flying -- {3}{U}{U}: Draw a card for each color among permanents you control. -- {3}{U}{U}: Exile Soul of Ravnica from your graveyard: Draw a card for each color among permanents you control. +mana={4}{U}{U} +type=Creature +subtype=Avatar +power=6 +toughness=6 +[/card] +[card] +name=Soul of Theros +abilities=vigilance +auto={4}{W}{W}:all(creature|myBattlefield) transforms((,newability[2/2],newability[first strike],newability[lifelink])) ueot +autograveyard={4}{W}{W}{E}:all(creature|myBattlefield) transforms((,newability[2/2],newability[first strike],newability[lifelink])) ueot +text=Vigilance. -- {4}{W}{W}: Creatures you control get +2/+2 and gain first strike and lifelink until end of turn. -- {4}{W}{W}: Exile Soul of Theros from your graveyard: Creatures you control get +2/+2 and gain first strike and lifelink until end of turn. +mana={4}{W}{W} +type=Creature +subtype=Avatar +power=6 +toughness=6 +[/card] +[card] +name=Soul of Zendikar +abilities=reach +auto={3}{G}{G}:token(Beast,Creature Beast,3/3,green) +autograveyard={3}{G}{G}{E}:token(Beast,Creature Beast,3/3,green) +text=Reach. -- {3}{G}{G}: Put a 3/3 green Beast creature token onto the battlefield. -- {3}{G}{G}: Exile Soul of Zendikar from your graveyard: Put a 3/3 green Beast creature token onto the battlefield. +mana={4}{G}{G} +type=Creature +subtype=Avatar +power=6 +toughness=6 +[/card] +[card] name=Soul Reap target=creature[-green] auto=destroy @@ -84042,6 +93153,17 @@ mana={4}{G} type=Sorcery [/card] [card] +name=Soulblade Djinn +abilities=flying +auto=@movedTo(*[-creature]|mystack):all(creature|mybattlefield) 1/1 ueot +text=Flying -- Whenever you cast a noncreature spell, creatures you control get +1/+1 until end of turn. +mana={3}{U}{U} +type=Creature +subtype=Djinn +power=4 +toughness=3 +[/card] +[card] name=Soulblast target=creature,player alias=130369 @@ -84110,8 +93232,7 @@ toughness=2 [/card] [card] name=Soulless One -auto=foreach(zombie|graveyard) 1/1 -auto=foreach(zombie) 1/1 +anyzone=pgbzombie/pgbzombie cdaactive text=Soulless One's power and toughness are each equal to the number of Zombies on the battlefield plus the number of Zombie cards in all graveyards. mana={3}{B} type=Creature @@ -84120,6 +93241,16 @@ power=* toughness=* [/card] [card] +name=Soulmender +auto={T}:life:1 controller +text={T}: You gain 1 life. +mana={W} +type=Creature +subtype=Human Cleric +power=1 +toughness=1 +[/card] +[card] name=Soulquake auto=moveto(ownerhand) all(creature|battlefield) auto=moveto(ownerhand) all(creature|graveyard) @@ -84158,7 +93289,7 @@ type=Instant [card] name=Soulsurge Elemental abilities=first strike -auto=foreach(creature|myBattlefield) 1/0 +anyzone=type:creature:myBattlefield/1 cdaactive text=First strike -- Soulsurge Elemental's power is equal to the number of creatures you control. mana={3}{R} type=Creature @@ -84254,7 +93385,8 @@ toughness=1 [/card] [card] name=Spark Mage -auto=@combatdamaged(player) from(this):may damage:1 target(creature|opponentBattlefield) +auto=@combatdamagefoeof(player) from(this):may damage:1 target(creature|opponentBattlefield) +auto=@combatdamageof(player) from(this):may damage:1 target(creature|myBattlefield) text=Whenever Spark Mage deals combat damage to a player, you may have Spark Mage deal 1 damage to target creature that player controls. mana={R} type=Creature @@ -84325,7 +93457,7 @@ toughness=3 [card] name=Sparring Collar auto=first strike -auto={R}{R}:name(attach) retarget target(creature|mybattlefield) +auto={R}{R}:name(attach) rehook target(creature|mybattlefield) auto={1}:equip text=Equipped creature has first strike. -- {R}{R}: Attach Sparring Collar to target creature you control. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) mana={2} @@ -84354,6 +93486,17 @@ power=5 toughness=3 [/card] [card] +name=Spawn of Thraxes +abilities=flying +auto=damage:type:mountain:mybattlefield target(creature,player) +text=Flying -- When Spawn of Thraxes enters the battlefield, it deals damage to target creature or player equal to the number of Mountains you control. +mana={5}{R}{R} +type=Creature +subtype=Dragon +power=5 +toughness=5 +[/card] +[card] name=Spawnsire of Ulamog mana={10} auto=@combat(attacking) source(this):name(Annihilate) ability$!name(sacrifice a permanent) notatarget(<1>*|mybattlefield) sacrifice!$ opponent @@ -84402,6 +93545,14 @@ text=Spawning Pool enters the battlefield tapped. -- {T}: Add {B} to your mana p type=Land [/card] [card] +name=Spear of Heliod +auto=lord(creature|mybattlefield) 1/1 +auto={1}{W}{W}{T}:target(creature[controllerdamager]|battlefield) destroy +text=Creatures you control get +1/+1. -- {1}{W}{W}, {T}: Destroy target creature that dealt damage to you this turn. +mana={1}{W}{W} +type=Legendary Enchantment Artifact +[/card] +[card] name=Spearbreaker Behemoth abilities=indestructible auto={1}:indestructible target(creature[power>=5]) @@ -84441,6 +93592,20 @@ mana={1}{B} type=Sorcery [/card] [card] +name=Spectra Ward +target=creature +auto=teach(creature) 2/2 +auto=teach(creature) protection from(White) +auto=teach(creature) protection from(Blue) +auto=teach(creature) protection from(Black) +auto=teach(creature) protection from(Red) +auto=teach(creature) protection from(Green) +text=Enchant creature -- Enchanted creature gets +2/+2 and gains protection from all colors. This effect does not remove auras. +mana={3}{W}{W} +type=Enchantment +subtype=Aura +[/card] +[card] name=Spectral Bears auto=@each my combatdamage restriction{type(*[black]|opponentbattlefield)~lessthan~1}:frozen text=Whenever Spectral Bears attacks, if defending player controls no black nontoken permanents, it doesn't untap during your next untap step. @@ -84667,6 +93832,17 @@ power=3 toughness=1 [/card] [card] +name=Spellheart Chimera +abilities=flying,trample +anyzone=pginstantsorcery/3 cdaactive +text=Flying. -- Trample. -- Spellheart Chimera's power is equal to the number of instant and sorcery cards in your graveyard. +mana={1}{U}{R} +type=Creature +subtype=Chimera +power=* +toughness=3 +[/card] +[card] name=Spellshock auto=@movedTo(*|mystack):damage:2 controller auto=@movedTo(*|opponentstack):damage:2 opponent @@ -84697,7 +93873,7 @@ toughness=3 [/card] [card] name=Sphere of Resistance -auto=lord(*|hand) altercost(colorless,+1) +auto=lord(*|hand,library,graveyard,exile) altercost(colorless,+1) text=Spells cost {1} more to cast. mana={2} type=Artifact @@ -85213,8 +94389,8 @@ text=Metalcraft - Spiraling Duelist has double strike as long as you control thr mana={2}{R}{R} type=Creature subtype=Human Berserker -power=4 -toughness=2 +power=3 +toughness=1 [/card] [card] name=Spiraling Embers @@ -85287,6 +94463,14 @@ type=Enchantment subtype=Aura [/card] [card] +name=Spirit Bonds +auto=@movedto(creature[-token]|mybattlefield):pay({W}) token(Spirit,Creature Spirit,1/1,flying,white) +auto={1}{S(creature[spirit]|mybattlefield)}:name(indestructible) target(creature[-Spirit]) transforms((,newability[indestructible])) ueot +text=Whenever a nontoken creature enters the battlefield under your control, you may pay {W}. If you do, put a 1/1 white Spirit creature token with flying onto the battlefield. -- {1}{W}, sacrifice a Spirit: Target non-Spirit creature gains indestructible until end of turn. (Effects that say "destroy" don't destroy it. A creature with indestructible can't be destroyed by damage.) +mana={1}{W} +type=Enchantment +[/card] +[card] name=Spirit Cairn auto=@discarded(*|hand):pay({W}) token(Spirit,Creature Spirit,1/1,flying,white) text=Whenever a player discards a card, you may pay {W}. If you do, put a 1/1 white Spirit creature token with flying onto the battlefield. @@ -85468,6 +94652,16 @@ power=2 toughness=1 [/card] [card] +name=Spiteful Blow +target=creature +auto=destroy +auto=destroy target(land) +restriction=type(creature|battlefield)~morethan~0,type(land|battlefield)~morethan~0 +text=Destroy target creature and target land. +mana={4}{B}{B} +type=Sorcery +[/card] +[card] name=Spiteful Bully auto=@each my upkeep:damage:3 target(creature|myBattlefield) text=At the beginning of your upkeep, Spiteful Bully deals 3 damage to target creature you control. @@ -85490,8 +94684,8 @@ subtype=Aura name=Spiteful Visions auto=@each my draw:draw:1 controller auto=@each opponent draw:draw:1 opponent -auto=@drawn(controller):damage:1 controller -auto=@drawn(opponent):damage:1 opponent +auto=@drawof(player):damage:1 controller +auto=@drawfoeof(player):damage:1 opponent text=At the beginning of each player's draw step, that player draws an additional card. -- Whenever a player draws a card, Spiteful Visions deals 1 damage to that player. mana={2}{BR}{BR} type=Enchantment @@ -85634,8 +94828,9 @@ color=green [/card] [card] name=Splinterfright +alias=1111 abilities=trample -auto=foreach(creature|mygraveyard) 1/1 +anyzone=type:creature:mygraveyard/type:creature:mygraveyard cdaactive auto=@each my upkeep:deplete:2 controller text=Trample -- Splinterfright's power and toughness are each equal to the number of creature cards in your graveyard -- At the beginning of your upkeep, put the top two cards of your library into your graveyard. mana={2}{G} @@ -85765,6 +94960,16 @@ power=1 toughness=5 [/card] [card] +name=Sporemound +auto=@movedTo(land|myBattlefield):token(Saproling,Creature Saproling, 1/1,green) +text=Whenever a land enters the battlefield under your control, put a 1/1 green Saproling creature token onto the battlefield. +mana={3}{G}{G} +type=Creature +subtype=Fungus +power=3 +toughness=3 +[/card] +[card] name=Sporesower Thallid text=At the beginning of your upkeep, put a spore counter on each Fungus you control. -- Remove three spore counters from Sporesower Thallid: Put a 1/1 green Saproling creature token onto the battlefield. mana={2}{G}{G} @@ -85866,6 +95071,18 @@ mana={1} type=Artifact [/card] [card] +name=Sprinting Warbrute +abilities=mustattack +other={3}{R} name(Dash) +auto=if paid(alternative) then transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveto(ownerhand) all(this)])) forever +text=Sprinting Warbrute attacks each turn if able. -- Dash {3}{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={4}{R} +type=Creature +subtype=Ogre Berserker +power=5 +toughness=4 +[/card] +[card] name=Sprite Noble abilities=flying auto=lord(creature[flying]|myBattlefield) 0/1 other @@ -86010,11 +95227,21 @@ type=Artifact [card] name=Squeeze text=Sorcery spells cost {3} more to cast. -auto=lord(sorcery|hand) altercost(colorless,+3) +auto=lord(sorcery|hand,library,graveyard,exile) altercost(colorless,+3) mana={3}{U} type=Enchantment [/card] [card] +name=Squelching Leeches +anyzone=type:swamp:myBattlefield/type:swamp:myBattlefield cdaactive +text=Squelching Leeches's power and toughness are each equal to the number of Swamps you control. +mana={2}{B}{B} +type=Creature +subtype=Leech +power=* +toughness=* +[/card] +[card] name=Squire mana={1}{W} type=Creature @@ -86101,6 +95328,46 @@ mana={6} type=Artifact [/card] [card] +name=Staff of the Death Magus +auto=@movedTo(*[black]|mystack):life:1 controller +auto=@movedTo(swamp|mybattlefield):life:1 controller +text=Whenever you cast a black spell or a swamp enters the battlefield under your control, you gain 1 life. +mana={3} +type=Artifact +[/card] +[card] +name=Staff of the Flame Magus +auto=@movedTo(*[red]|mystack):life:1 controller +auto=@movedTo(mountain|mybattlefield):life:1 controller +text=Whenever you cast a red spell or a mountain enters the battlefield under your control, you gain 1 life. +mana={3} +type=Artifact +[/card] +[card] +name=Staff of the Mind Magus +auto=@movedTo(*[blue]|mystack):life:1 controller +auto=@movedTo(island|mybattlefield):life:1 controller +text=Whenever you cast a blue spell or an island enters the battlefield under your control, you gain 1 life. +mana={3} +type=Artifact +[/card] +[card] +name=Staff of the Sun Magus +auto=@movedTo(*[white]|mystack):life:1 controller +auto=@movedTo(plains|mybattlefield):life:1 controller +text=Whenever you cast a white spell or a plains enters the battlefield under your control, you gain 1 life. +mana={3} +type=Artifact +[/card] +[card] +name=Staff of the Wild Magus +auto=@movedTo(*[green]|mystack):life:1 controller +auto=@movedTo(forest|mybattlefield):life:1 controller +text=Whenever you cast a green spell or a forest enters the battlefield under your control, you gain 1 life. +mana={3} +type=Artifact +[/card] +[card] name=Staff of Zegon auto={3}{T}:-2/0 target(creature) text={3}, {T}: Target creature gets -2/-0 until end of turn. @@ -86178,6 +95445,17 @@ power=5 toughness=5 [/card] [card] +name=Stalwart Aven +abilities=flying +auto=this(cantargetcard(*[-renown]) transforms((,newability[@combatdamaged(player) from(this):counter(1/1) && becomes(renown) forever])) +text=Flying (This creature can't be blocked except by creatures with flying or reach.) -- Renown 1 (When this creature deals combat damage to a player, if it isn't renowned, put a +1/+1 counter on it and it becomes renowned.) +mana={2}{W} +type=Creature +subtype=Bird Soldier +power=1 +toughness=3 +[/card] +[card] name=Stalwart Shield-Bearers abilities=defender auto=lord(creature[defender]|myBattlefield) 0/2 other @@ -86217,6 +95495,16 @@ power=1 toughness=1 [/card] [card] +name=Stampeding Elk Herd +auto=@combat(attacking) source(this) restriction{compare(powertotalinplay)~morethan~7}:lord(creature|myBattlefield) trample ueot +text=Formidable — Whenever Stampeding Elk Herd attacks, if creatures you control have total power 8 or greater, creatures you control gain trample until end of turn. +mana={3}{G}{G} +type=Creature +subtype=Elk +power=5 +toughness=5 +[/card] +[card] name=Stampeding Rhino abilities=trample text=Trample (If this creature would deal enough damage to its blockers to destroy them, you may have it deal the rest of its damage to defending player or planeswalker.) @@ -86317,6 +95605,37 @@ mana={2} type=Artifact [/card] [card] +name=Starfall +target=creature +auto=damage:3 +auto=if cantargetcard(enchantment) then damage:3 targetcontroller +text=Starfall deals 3 damage to target creature. If that creature is an enchantment, Starfall deals 3 damage to that creature's controller. +mana={4}{R} +type=Instant +[/card] +[card] +name=Starfield of Nyx +auto=@each my upkeep:may target(enchantment|mygraveyard) castcard(putinplay) +auto=aslongas(enchantment|mybattlefield) lord(other enchantment[-aura;manacost=1]) transforms((,newability[becomes(Creature)],setpower=1,settoughness=1)) >4 +auto=aslongas(enchantment|mybattlefield) lord(other enchantment[-aura;manacost=2]) transforms((,newability[becomes(Creature)],setpower=2,settoughness=2)) >4 +auto=aslongas(enchantment|mybattlefield) lord(other enchantment[-aura;manacost=3]) transforms((,newability[becomes(Creature)],setpower=3,settoughness=3)) >4 +auto=aslongas(enchantment|mybattlefield) lord(other enchantment[-aura;manacost=4]) transforms((,newability[becomes(Creature)],setpower=4,settoughness=4)) >4 +auto=aslongas(enchantment|mybattlefield) lord(other enchantment[-aura;manacost=5]) transforms((,newability[becomes(Creature)],setpower=5,settoughness=5)) >4 +auto=aslongas(enchantment|mybattlefield) lord(other enchantment[-aura;manacost=6]) transforms((,newability[becomes(Creature)],setpower=6,settoughness=6)) >4 +auto=aslongas(enchantment|mybattlefield) lord(other enchantment[-aura;manacost=7]) transforms((,newability[becomes(Creature)],setpower=7,settoughness=7)) >4 +auto=aslongas(enchantment|mybattlefield) lord(other enchantment[-aura;manacost=8]) transforms((,newability[becomes(Creature)],setpower=8,settoughness=8)) >4 +auto=aslongas(enchantment|mybattlefield) lord(other enchantment[-aura;manacost=9]) transforms((,newability[becomes(Creature)],setpower=9,settoughness=9)) >4 +auto=aslongas(enchantment|mybattlefield) lord(other enchantment[-aura;manacost=10]) transforms((,newability[becomes(Creature)],setpower=10,settoughness=10)) >4 +auto=aslongas(enchantment|mybattlefield) lord(other enchantment[-aura;manacost=11]) transforms((,newability[becomes(Creature)],setpower=11,settoughness=11)) >4 +auto=aslongas(enchantment|mybattlefield) lord(other enchantment[-aura;manacost=12]) transforms((,newability[becomes(Creature)],setpower=12,settoughness=12)) >4 +auto=aslongas(enchantment|mybattlefield) lord(other enchantment[-aura;manacost=13]) transforms((,newability[becomes(Creature)],setpower=13,settoughness=13)) >4 +auto=aslongas(enchantment|mybattlefield) lord(other enchantment[-aura;manacost=14]) transforms((,newability[becomes(Creature)],setpower=14,settoughness=14)) >4 +auto=aslongas(enchantment|mybattlefield) lord(other enchantment[-aura;manacost=15]) transforms((,newability[becomes(Creature)],setpower=15,settoughness=15)) >4 +text=At the beginning of your upkeep, you may return target enchantment card from your graveyard to the battlefield. As long as you control five or more enchantments, each other non-Aura enchantment you control is a creature in addition to its other types and has base power and base toughness each equal to its converted mana cost. +mana={4}{W} +type=Enchantment +[/card] +[card] name=Starke of Rath auto={T}:destroy target(artifact,creature) && moveTo(opponentbattlefield) all(this) text={T}: Destroy target artifact or creature. That permanent's controller gains control of Starke of Rath. (This effect lasts indefinitely.) @@ -86419,6 +95738,16 @@ mana={3}{U} type=Enchantment [/card] [card] +name=Statute of Denial +target=*|stack +auto=fizzle +auto=if type(creature[blue]|mybattlefield)~morethan~0 then draw:1 controller +auto=if type(creature[blue]|mybattlefield)~morethan~0 then ability$!reject notatarget(*|myhand)!$ controller +text=Counter target spell. If you control a blue creature, draw a card, then discard a card. +mana={2}{U}{U} +type=Instant +[/card] +[card] name=Staunch Defenders auto=life:4 text=When Staunch Defenders enters the battlefield, you gain 4 life. @@ -86429,13 +95758,23 @@ power=3 toughness=4 [/card] [card] +name=Staunch-Hearted Warrior +auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):counter(1/1,2) +text=Heroic - Whenever you cast a spell that targets Staunch-Hearted Warrior, put two +1/+1 counters on Staunch-Hearted Warrior. +mana={3}{G} +type=Creature +subtype=Human Warrior +power=2 +toughness=2 +[/card] +[card] name=Stave Off target=creature -auto=choice name(protection from white) target(creature) protection from white -auto=choice name(protection from blue) target(creature) protection from blue -auto=choice name(protection from black) target(creature) protection from black -auto=choice name(protection from red) target(creature) protection from red -auto=choice name(protection from green) target(creature) protection from green +auto=choice name(green) transforms((,newability[protection from green])) ueot +auto=choice name(red) transforms((,newability[protection from red])) ueot +auto=choice name(blue) transforms((,newability[protection from blue])) ueot +auto=choice name(black) transforms((,newability[protection from black])) ueot +auto=choice name(white) transforms((,newability[protection from white])) ueot text=Target creature gains protection from the color of your choice until end of turn. mana={W} type=Instant @@ -86651,6 +95990,16 @@ power=4 toughness=5 [/card] [card] +name=Steelform Sliver +auto=lord(sliver|mybattlefield) 0/1 +text=All Sliver creatures you control get +0/+1. +mana={2}{W} +type=Creature +subtype=Sliver +power=2 +toughness=2 +[/card] +[card] name=Steeling Stance auto=lord(creature|mybattlefield) 1/1 ueot autohand={W}:1/1 target(creature) limit:1 myUpkeepOnly @@ -86865,7 +96214,7 @@ toughness=1 [/card] [card] name=Stinkdrinker Daredevil -auto=lord(giant|myhand) altercost(colorless,-2) +auto=lord(giant|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) text=Giant spells you cast cost {2} less to cast. mana={2}{R} type=Creature @@ -87006,7 +96355,7 @@ subtype=Mountain Forest [/card] [card] name=Stone Calendar -auto=lord(*|myhand) altercost(colorless,-1) +auto=lord(*|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) text=Spells you cast cost up to {1} less to cast. mana={5} type=Artifact @@ -87164,7 +96513,7 @@ subtype=Aura [card] name=Stonehewer Giant abilities=vigilance -auto={1}{W}{T}:name(move and attach) target(equipment|mylibrary) transforms((,newability[retarget target(creature|mybattlefield)],newability[moveto(mybattlefield)])) +auto={1}{W}{T}:name(move and attach) target(equipment|mylibrary) moveto(mybattlefield) and!(transforms((,newability[rehook target(creature|mybattlefield)])))! text=Vigilance -- {1}{W}, {T}: Search your library for an Equipment card and put it onto the battlefield. Attach it to a creature you control. Then shuffle your library. mana={3}{W}{W} type=Creature @@ -87173,6 +96522,16 @@ power=4 toughness=4 [/card] [card] +name=Stonehorn Chanter +auto={5}{W}:vigilance ueot && lifelink ueot +text={5}{W}:Stonehorn Chanter gains vigilance and lifelink until end of turn. +mana={5}{W} +type=Creature +subtype=Rhino Cleric +power=4 +toughness=4 +[/card] +[card] name=Stonehorn Dignitary auto=nextphasealter(remove,combatbegins,opponent) auto=nextphasealter(remove,combatattackers,opponent) @@ -87198,6 +96557,16 @@ power=1 toughness=1 [/card] [card] +name=Stoneshock Giant +auto=this(cantargetcard(*[-monstrous]) {6}{R}{R}:becomes(monstrous) forever && counter(1/1,3) && transforms((,newAbility[all(creature[-flying]|opponentbattlefield) cantblock ueot)])) forever +text={6}{R}{R}: Monstrosity 3. (If this creature isn't monstrous, put three +1/+1 counters on it and it becomes monstrous.) -- When Stoneshock Giant becomes monstrous, creatures without flying your opponents control can't block this turn. +mana={3}{R}{R} +type=Creature +subtype=Giant +power=5 +toughness=4 +[/card] +[card] name=Stonewood Invoker auto={7}{G}:5/5 text={7}{G}: Stonewood Invoker gets +5/+5 until end of turn. @@ -87257,7 +96626,7 @@ toughness=2 [card] name=Stonybrook Banneret abilities=islandwalk -auto=lord(*[merfolk;wizard]|myhand) altercost(colorless, -1) +auto=lord(*[merfolk;wizard]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) text=Islandwalk -- Merfolk spells and Wizard spells you cast cost {1} less to cast. mana={1}{U} type=Creature @@ -87364,6 +96733,17 @@ power=2 toughness=2 [/card] [card] +name=Stormbreath Dragon +abilities=flying,haste,protection from white +auto=this(cantargetcard(*[-monstrous]) {5}{R}{R}:becomes(monstrous) forever && counter(1/1,3) && transforms((,newability[damage:type:*:opponenthand all(opponent)])) forever +text={5}{R}{R}: Monstrosity 3. (If this creature isn't monstrous, put three +1/+1 counters on it and it becomes monstrous.) -- When Stormbreath Dragon becomes monstrous, it deals damage to each opponent equal to the number of cards in that player's hand. +mana={3}{R}{R} +type=Creature +subtype=Dragon +power=4 +toughness=4 +[/card] +[card] name=Stormcloud Djinn abilities=flying,cloud auto={R}{R}:2/0 && damage:1 controller @@ -87375,6 +96755,19 @@ power=3 toughness=3 [/card] [card] +name=Stormcrag Elemental +abilities=trample +facedown={3} +autofacedown={4}{R}{R}:morph +autofaceup=counter(1/1,1) +text=Trample -- Megamorph {4}{R}{R} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) +mana={5}{R} +type=Creature +subtype=Elemental +power=5 +toughness=5 +[/card] +[card] name=Stormfront Pegasus abilities=flying text=Flying @@ -87397,6 +96790,16 @@ power=4 toughness=3 [/card] [card] +name=Stormrider Rig +auto={2}:equip +auto=1/1 +auto=@movedto(creature|mybattlefield):may all(trigger[to]) rehook +text=Equipped creature gets +1/+1. -- Whenever a creature enters the battlefield under your control, you may attach Stormrider Rig to it. -- Equip {2} +mana={2} +type=Artifact +subtype=Equipment +[/card] +[card] name=Stormscape Apprentice auto={W}{T}:Tap target(creature) auto={B}{T}:life:-1 target(player) @@ -87410,7 +96813,7 @@ toughness=1 [card] name=Stormscape Familiar abilities=flying -auto=lord(*[white;black]|myhand) altercost(colorless,-1) +auto=lord(*[white;black]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) text=Flying -- White spells and black spells you cast cost {1} less to cast. mana={1}{U} type=Creature @@ -87457,6 +96860,20 @@ power=2 toughness=1 [/card] [card] +name=Stormwing Dragon +abilities=flying,first strike +facedown={3} +autofacedown={5}{R}{R}:morph +autofaceup=counter(1/1,1) +autofaceup=counter(1/1,1) all(other creature[dragon]|mybattlefield) +text=Flying, first strike -- Megamorph {5}{R}{R} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) -- When Stormwing Dragon is turned face up, put a +1/+1 counter on each other Dragon creature you control. +mana={5}{R} +type=Creature +subtype=Dragon +power=3 +toughness=3 +[/card] +[card] name=Strafe target=creature[-red] auto=Damage:3 @@ -87522,6 +96939,20 @@ power=4 toughness=4 [/card] [card] +name=Stratus Dancer +abilities=flying +facedown={3} +autofacedown={1}{U}:morph +autofaceup=counter(1/1,1) +autofaceup=target(*[instant;sorcery]|stack) fizzle +text=Flying -- Megamorph {1}{U} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its megamorph cost and put a +1/+1 counter on it.) -- When Stratus Dancer is turned face up, counter target instant or sorcery spell. +mana={1}{U} +type=Creature +subtype=Djinn Monk +power=2 +toughness=1 +[/card] +[card] name=Stratus Walk target=creature auto=draw:1 controller @@ -87628,6 +97059,17 @@ power=3 toughness=4 [/card] [card] +name=Street Spasm +alias=11000 +other={X}{X}{R}{R} name(Overload) +target=creature[-flying]|opponentbattlefield +auto=paidmana damage:X +auto=overload damage:XX all(creature[-flying]|opponentbattlefield) +text=Street Spasm deals X damage to target creature without flying you don't control. -- Overload {X}{X}{R}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") +mana={X}{R} +type=Instant +[/card] +[card] name=Streetbreaker Wurm mana={3}{R}{G} type=Creature @@ -87636,6 +97078,14 @@ power=6 toughness=4 [/card] [card] +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. +mana={1}{G} +type=Enchantment +[/card] +[card] name=Strength in Numbers target=creature auto=foreach(creature[attacking]) 1/1 @@ -87686,6 +97136,16 @@ type=Artifact subtype=Equipment [/card] [card] +name=Striking Sliver +auto=lord(sliver|mybattlefield) first strike +text=All Sliver creatures you control have first strike. +mana={R} +type=Creature +subtype=Sliver +power=1 +toughness=1 +[/card] +[card] name=Strip Mine auto={T}:Add{1} auto={T}{S}:destroy target(land) @@ -87712,7 +97172,7 @@ type=Instant [/card] [card] name=Stromgald Cabal -auto={L}{L}{T}:fizzle target(*[white]|stack) +auto={L}{T}:fizzle target(*[white]|stack) text={T}, Pay 1 life: Counter target white spell. mana={1}{B}{B} type=Creature @@ -87766,6 +97226,16 @@ power=4 toughness=3 [/card] [card] +name=Strongarm Monk +auto=@movedto(*[-creature]|mystack):all(creature|mybattlefield) 1/1 ueot +text=Whenever you cast a noncreature spell, creatures you control get +1/+1 until end of turn. +mana={4}{W} +type=Creature +subtype=Human Monk +power=3 +toughness=3 +[/card] +[card] name=Strongarm Thug auto=may moveto(myhand) target(mercenary|mygraveyard) text=When Strongarm Thug enters the battlefield, you may return target Mercenary card from your graveyard to your hand. @@ -87855,6 +97325,14 @@ subtype=Human power=3 toughness=3 [/card] +[card] +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. +mana={U} +type=Instant +[/card] ###The 2 cards below should stay together (Flip Card)### [card] name=Student of Elements @@ -87878,6 +97356,16 @@ toughness=3 [/card] ###The 2 cards above should stay together (Flip Card)### [card] +name=Student of Ojutai +auto=@movedto(*[-creature]|mystack):life:2 controller +text=Whenever you cast a noncreature spell, you gain 2 life. +mana={3}{W} +type=Creature +subtype=Human Monk +power=2 +toughness=4 +[/card] +[card] name=Student of Warfare auto={W}:counter(0/0,1,Level) asSorcery auto=this(counter{0/0,2,Level}) first strike @@ -87958,7 +97446,7 @@ toughness=6 [card] name=Sturmgeist abilities=flying -auto=foreach(*|myhand) 1/1 +anyzone=type:*:myhand/type:*:myhand cdaactive auto=@combatdamaged(player) from(this):draw:1 controller text=Flying -- Sturmgeist's power and toughness are each equal to the number of cards in your hand. -- Whenever Sturmgeist deals combat damage to a player, draw a card. mana={3}{U}{U} @@ -88025,6 +97513,16 @@ text=Subterranean Hangar enters the battlefield tapped. -- {T}: Put a storage co type=Land [/card] [card] +name=Subterranean Scout +auto=target(creature[power<=2]|battlefield) unblockable ueot +text=When Subterranean Scout enters the battlefield, target creature with power 2 or less can't be blocked this turn. +mana={1}{R} +type=Creature +subtype=Goblin Scout +power=2 +toughness=1 +[/card] +[card] name=Subterranean Shambler auto=damage:1 all(creature[-flying]) && damage:1 all(player) auto=@movedTo(this|nonbattlezone) from(battlefield):damage:1 all(creature[-flying]) && damage:1 all(player) @@ -88081,6 +97579,14 @@ mana={3}{R} type=Instant [/card] [card] +name=Sudden Reclamation +auto=deplete:4 controller +auto=transforms((,newability[ability$!notatarget(creature|mygraveyard) moveto(ownerhand)!$ controller],newability[ability$!notatarget(land|mygraveyard) moveto(ownerhand)!$ controller])) oneshot +text=Put the top four cards of your library into your graveyard, then return a creature card and a land card from your graveyard to your hand. +mana={3}{G} +type=Instant +[/card] +[card] name=Sudden Shock target=creature,player auto=damage:2 @@ -88165,6 +97671,55 @@ text={T}: Add {1} to your mana pool. -- {T}: Add {B} or {R} to your mana pool. S type=Land [/card] [card] +name=Sultai Banner +auto={T}: Add{B} +auto={T}: Add{G} +auto={T}: Add{U} +auto={B}{G}{U}{T}{S}:draw:1 controller +text={T}: Add {B},{G} or {U} to your mana pool. -- {B}{G}{U}, {T}, Sacrifice Sultai Banner: Draw a card. +mana={3} +type=Artifact +[/card] +[card] +name=Sultai Charm +auto=choice name(Destroy monocolored) destroy target(creature[-multicolor]) +auto=choice name(destroy artifact or enchantment) destroy target(artifact,enchantment) +auto=choice name(Draw 2 and discard 1) draw:2 && transforms((,newability[target(*|myhand) reject])) forever +text=Choose one: -- Destroy target monocolored creature. -- Destroy target artifact or enchantment. -- Draw two cards, then discard a card. +mana={B}{G}{U} +type=Instant +[/card] +[card] +name=Sultai Flayer +auto=@movedTo(creature[toughness>=4]|graveyard) from(myBattlefield):life:4 controller +text=Whenever a creature you control with toughness 4 or greater dies, you gain 4 life. +mana={3}{G} +type=Creature +subtype=Naga Shaman +power=3 +toughness=4 +[/card] +[card] +name=Sultai Runemark +target=creature +auto=2/2 +auto=aslongas(*[green;blue]|mybattlefield):teach(creature) deathtouch +text=Enchant creature. -- Enchanted creature gets +2/+2. -- Enchanted creature has deathtouch as long as you control a green or blue permanent. +mana={2}{B} +type=Enchantment +subtype=Aura +[/card] +[card] +name=Sultai Skullkeeper +auto=deplete:2 controller +text=When Sultai Skullkeeper enters the battlefield, put the top two cards of your library into your graveyard. +mana={1}{U} +type=Creature +subtype=Naga Shaman +power=2 +toughness=1 +[/card] +[card] name=Summer Bloom auto=maxPlay(land)+3 text=You may play up to three additional lands this turn. @@ -88172,6 +97727,15 @@ mana={1}{G} type=Sorcery [/card] [card] +name=Summit Prowler +text= +mana={2}{R}{R} +type=Creature +subtype=Yeti +power=4 +toughness=3 +[/card] +[card] name=Summoner's Bane target=creature|stack auto=fizzle @@ -88230,7 +97794,7 @@ subtype=Aura [/card] [card] name=Sun Droplet -auto=@damaged(controller):counter(0/0,thatmuch,Charge) +auto=@damageof(player):counter(0/0,thatmuch,Charge) auto=@each my upkeep:may name(Gain Life) transforms((,[newability[counter(0/0,-1,Charge)],newability[life:1 controller])) text=Whenever you're dealt damage, put that many charge counters on Sun Droplet. -- At the beginning of each upkeep, you may remove a charge counter from Sun Droplet. If you do, you gain 1 life. mana={2} @@ -88277,6 +97841,17 @@ mana={1} type=Artifact [/card] [card] +name=Sunblade Elf +auto=aslongas(Plains|myBattlefield) 1/1 +auto={4}{W}:all(creature|myBattlefield) 1/1 ueot +text=Sunblade Elf gets +1/+1 as long as you control a Plains. -- {4}{W}: Creatures you control get +1/+1 until end of turn. +mana={G} +type=Creature +subtype=Elf Warrior +power=1 +toughness=1 +[/card] +[card] name=Sunblast Angel abilities=flying auto=destroy all(creature[tapped]) @@ -88290,13 +97865,20 @@ toughness=5 [card] name=Sunbond target=creature -auto=teach(creature) transforms((,newability[@lifed(controller):dynamicability])) +auto=teach(creature) transforms((,newability[@lifeof(player):dynamicability])) text=Enchant creature -- Enchanted creature has "Whenever you gain life, put that many +1/+1 counters on this creature." mana={3}{W} type=Enchantment subtype=Aura [/card] [card] +name=Sunbringer's Touch +auto=name(Bolster) notatarget(creature[toughness=toughness:lowest:creature:mybattlefield]|mybattlefield) transforms((,newability[counter(1/1.type:*:myhand)],newability[trample ueot],newability[all(other creature[counter{1/1.1}]|mybattlefield) trample ueot])) oneshot +text=Bolster X, where X is the number of cards in your hand. Each creature you control with a +1/+1 counter on it gains trample until end of turn. (To bolster X, choose a creature with the least toughness among creatures you control and put X +1/+1 counters on it.) +mana={2}{G}{G} +type=Sorcery +[/card] +[card] name=Suncrusher abilities=sunburst auto=counter(1/1,sunburst) @@ -88356,7 +97938,7 @@ toughness=1 name=Sunforger auto={3}:equip auto=4/0 -auto=teach(creature) {unattach}{R}{W}:castcard(normal) notatarget(instant[red;white;manacost<=4]|mylibrary) +auto=teach(creature) {unattach}{R}{W}:castcard(restricted) notatarget(instant[red;white;manacost<=4]|mylibrary) text=Equipped creature gets +4/+0. -- {R}{W}, Unattach Sunforger: Search your library for a red or white instant card with converted mana cost 4 or less and cast that card without paying its mana cost. Then shuffle your library. -- Equip {3} mana={3} type=Artifact @@ -88370,6 +97952,16 @@ mana={3} type=Artifact [/card] [card] +name=Sungrace Pegasus +abilities=flying,lifelink +text=Flying (This creature can't be blocked except by creatures with flying or reach.) -- Lifelink (Damage dealt by this creature also causes you to gain that much life.) +mana={1}{W} +type=Creature +subtype=Pegasus +power=1 +toughness=2 +[/card] +[card] name=Sungrass Egg auto={2}{T}{S}:Add{G}{W} && draw:1 text={2}, {T}, Sacrifice Sungrass Egg: Add {G}{W} to your mana pool. Draw a card. @@ -88486,7 +98078,7 @@ toughness=1 [card] name=Sunscape Familiar abilities=defender -auto=lord(*[green;blue]|myhand) altercost(colorless,-1) +auto=lord(*[green;blue]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) text=Defender (This creature can't attack.) -- Green spells and blue spells you cast cost {1} less to cast. mana={1}{W} type=Creature @@ -88506,6 +98098,17 @@ power=2 toughness=2 [/card] [card] +name=Sunscorch Regent +abilities=flying +auto=@movedto(*|opponentstack):counter(1/1,1) +text=Flying -- Whenever an opponent casts a spell, put a +1/+1 counter on Sunscorch Regent and you gain 1 life. +mana={3}{W}{W} +type=Creature +subtype=Dragon +power=4 +toughness=3 +[/card] +[card] name=Sunscour auto=destroy all(creature) other={E(other *[white]|myhand)}{E(other *[white]|myhand)} name(Exile 2 White Cards from Hand) @@ -88623,6 +98226,36 @@ mana={1}{W} type=Instant [/card] [card] +name=Supplant Form +target=creature +auto=moveTo(ownerhand) +auto=clone +text=Return target creature to its owner's hand. You put a token onto the battlefield that's a copy of that creature. +mana={4}{U}{U} +type=Instant +[/card] +[card] +name=Supply-Line Cranes +auto=counter(1/1,1) target(creature) +text=When Supply-Line Cranes enters the battlefield, put a +1/+1 counter on target creature. +mana={3}{W}{W} +type=Creature +subtype=Bird +power=2 +toughness=4 +[/card] +[card] +name=Suppression Bonds +target=*[-land]|battlefield +auto=teach(*) cantattack +auto=teach(*) cantblock +auto=teach(*) noactivatedability +text=Enchant nonland permanent -- Enchanted permanent can't attack or block, and its activated abilities can't be activated. +mana={3}{W} +type=Enchantment +subtype=Aura +[/card] +[card] name=Supreme Exemplar abilities=flying auto=aslongas(other elemental|mybattlefield) choice notatarget(other elemental|mybattlefield) (blink)forsrc oneshot @@ -88693,6 +98326,15 @@ mana={1} type=Artifact [/card] [card] +name=Surge of Righteousness +target=creature[attacking;blocking;black;red]|battlefield +auto=destroy +auto=life:2 controller +text=Destroy target black or red creature that's attacking or blocking. You gain 2 life. +mana={1}{W} +type=Instant +[/card] +[card] name=Surge of Strength target=auto auto=trample @@ -88751,6 +98393,28 @@ mana={3}{W} type=Instant [/card] [card] +name=Surrak Dragonclaw +abilities=flash,nofizzle +auto=lord(creature|myhand) flash forcedalive +auto=lord(other creature|mybattlefield) trample +text=Flash -- Surrak Dragonclaw can't be countered. -- Creature spells you control can't be countered. -- Other creatures you control have trample. +mana={2}{G}{U}{R} +type=Legendary Creature +subtype=Human Warrior +power=6 +toughness=6 +[/card] +[card] +name=Surrak, the Hunt Caller +auto=@each my combatbegins restriction{compare(powertotalinplay)~morethan~7}:haste target(creature|mybattlefield) ueot +text=Formidable — At the beginning of combat on your turn, if creatures you control have total power 8 or greater, target creature you control gains haste until end of turn. +mana={2}{G}{G} +type=Legendary Creature +subtype=Human Warrior +power=5 +toughness=4 +[/card] +[card] name=Surrakar Banisher auto=may moveTo(ownerhand) target(creature[tapped]) text=When Surrakar Banisher enters the battlefield, you may return target tapped creature to its owner's hand. @@ -88819,6 +98483,13 @@ power=2 toughness=1 [/card] [card] +name=Suspension Field +auto=may (blink)forsrc target(creature[toughness>=3]) +text=When Suspension Field enters the battlefield, you may exile target creature with toughness 3 or greater until Suspension Field leaves the battlefield. (That creature returns under its owner's control.) +mana={1}{W} +type=Enchantment +[/card] +[card] name=Sustainer of the Realm abilities=flying auto=@combat(blocking) source(this):0/2 ueot @@ -88830,6 +98501,17 @@ power=2 toughness=3 [/card] [card] +name=Sustaining Spirit +auto=cumulativeupcost[{1}{W}] sacrifice +auto=this(controllerlife >= 1) transforms((,newability[reduceto:1])) +text=Cumulative upkeep {1}{W} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.) -- Damage that would reduce your life total to less than 1 reduces it to 1 instead. +mana={1}{W} +type=Creature +subtype=Angel Spirit +power=0 +toughness=3 +[/card] +[card] name=Sustenance auto={1}{S(land|myBattlefield)}:1/1 target(creature) text={1}, Sacrifice a land: Target creature gets +1/+1 until end of turn. @@ -88911,8 +98593,29 @@ power=0 toughness=1 [/card] [card] +name=Swan Song +target=enchantment,instant,sorcery|stack +auto=fizzle +auto=token(Bird,Creature Bird,2/2,blue,flying) targetcontroller +text=Counter target enchantment, instant or sorcery spell. Its controller puts a 2/2 blue Bird creature token with flying onto the battlefield under their control. +mana={U} +type=Instant +[/card] +[card] +name=Swarm of Bloodflies +abilities=flying +auto=counter(1/1,2) +auto=@movedTo(other creature|graveyard) from(battlefield):counter(1/1,1) +text=Flying. -- Swarm of Bloodflies enters the battlefield with two +1/+1 counters on it. -- Whenever another creatures dies put a +1/+1 counter on Swarm of Bloodflies. +mana={4}{B} +type=Creature +subtype=Insect +power=0 +toughness=0 +[/card] +[card] name=Swarm of Rats -auto=foreach(rat|myBattlefield) 1/0 +anyzone=type:rat:mybattlefield/1 cdaactive text=Swarm of Rats's power is equal to the number of Rats you control. mana={1}{B} type=Creature @@ -88921,6 +98624,17 @@ power=* toughness=1 [/card] [card] +name=Swarmborn Giant +auto=@combatdamageof(player):sacrifice all(this) +auto=this(cantargetcard(*[-monstrous]) {4}{G}{G}:becomes(monstrous) forever && counter(1/1,2) && transforms((,newAbility[reach])) forever +text=When you're dealt combat damage, sacrifice Swarmborn Giant. -- {3}{G}{G}: Monstrosity 2. (If this creature isn't monstrous, put two +1/+1 counters on it and it becomes monstrous.) -- As long as Swarmborn Giant is monstrous, it has reach. +mana={2}{G}{G} +type=Creature +subtype=Giant +power=6 +toughness=6 +[/card] +[card] name=Swarmyard auto={T}:Add{1} auto={T}:name(insect) regenerate target(insect) @@ -88986,6 +98700,16 @@ mana={W} type=Instant [/card] [card] +name=Swift Kick +target=creature|mybattlefield +auto=1/0 ueot +auto=transforms((,newability[target(creature|opponentbattlefield) dynamicability])) ueot +restriction=type(creature|opponentbattlefield)~morethan~0 +text=Target creature you control gets +1/+0 until end of turn. It fights target creature you don't control. +mana={3}{R} +type=Instant +[/card] +[card] name=Swift Maneuver target=creature,player auto=prevent:2 @@ -88995,6 +98719,17 @@ mana={1}{W} type=Instant [/card] [card] +name=Swift Reckoning +abilities=spellmastery +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. +mana={1}{W} +type=Sorcery +[/card] +[card] name=Swift Silence auto=foreach(other *|stack) draw:1 auto=fizzle all(other *|stack) @@ -89003,6 +98738,17 @@ mana={2}{W}{U}{U} type=Instant [/card] [card] +name=Swift Warkite +abilities=flying +auto=moveTo(myBattlefield) target(creature[manacost<=3]|myhand,mygraveyard) and!( transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveto(ownerhand) all(this)])) forever)! +text=Flying -- When Swift Warkite enters the battlefield, you may put a creature card with converted mana cost 3 or less from your hand or graveyard onto the battlefield. That creature gains haste. Return it to your hand at the beginning of the next end step. +mana={4}{B}{R} +type=Creature +subtype=Dragon +power=4 +toughness=4 +[/card] +[card] name=Swiftfoot Boots auto={1}:equip auto=teach(creature) haste @@ -89013,6 +98759,15 @@ type=Artifact subtype=Equipment [/card] [card] +name=Swiftwater Cliffs +auto=tap +auto=life:1 +auto={T}:Add{U} +auto={T}:Add{R} +text=Swiftwater Cliffs enters the battlefield tapped. -- When Swiftwater Cliffs enters the battlefield, you gain 1 life. -- {T}: Add {U} or {R} to your mana pool. +type=Land +[/card] +[card] name=Swirling Sandstorm auto=aslongas(*|mygraveyard) lord(creature[-flying]) damage:5 >6 text=Threshold - Swirling Sandstorm deals 5 damage to each creature without flying if seven or more cards are in your graveyard. @@ -89131,6 +98886,16 @@ type=Artifact subtype=Equipment [/card] [card] +name=Sword of the Animist +auto={2}:equip +auto=teach(creature) 1/1 +auto=@combat(attacking) source(mytgt):may notatarget(land[basic]|mylibrary) moveto(mybattlefield) and!(tap)! +text=Equipped creature gets +1/+1. -- Whenever equipped creature attacks, you may search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. -- Equip {2} +mana={2} +type=Legendary Artifact +subtype=Equipment +[/card] +[card] name=Sword of the Chosen auto={T}:2/2 target(creature[legendary]) text={T}: Target legendary creature gets +2/+2 until end of turn. @@ -89153,7 +98918,7 @@ subtype=Equipment name=Sword of the Meek auto={2}:equip auto=1/2 -autograveyard=@movedto(creature[power=1;toughness=1]|mybattlefield):may all(trigger[to]) retarget +autograveyard=@movedto(creature[power=1;toughness=1]|mybattlefield):may all(trigger[to]) rehook text=Equipped creature gets +1/+2. -- Equip {2} -- Whenever a 1/1 creature enters the battlefield under your control, you may return Sword of the Meek from your graveyard to the battlefield, then attach it to that creature. mana={2} type=Artifact @@ -89248,6 +99013,21 @@ mana={5}{G} type=Instant [/card] [card] +name=Sylvan Caryatid +abilities=defender,opponentshroud +auto={T}:Add{G} +auto={T}:Add{W} +auto={T}:Add{U} +auto={T}:Add{B} +auto={T}:Add{R} +text={T}: Defender. -- Hexproof. -- Add one mana of any color to your mana pool. +mana={1}{G} +type=Creature +subtype=Plant +power=0 +toughness=3 +[/card] +[card] name=Sylvan Hierophant auto=@movedto(this|graveyard) from(battlefield):moveto(myhand) target(other creature|myGraveyard) autograveyard=@movedto(this|graveyard) from(battlefield):moveto(exile) @@ -89323,7 +99103,7 @@ type=Sorcery [/card] [card] name=Sylvan Yeti -auto=foreach(*|myhand) 1/0 +anyzone=type:*:myhand/4 cdaactive text=Sylvan Yeti's power is equal to the number of cards in your hand. mana={2}{G}{G} type=Creature @@ -89332,6 +99112,20 @@ power=* toughness=4 [/card] [card] +name=Sylvok Explorer +auto=this(variable{olandg}>0) {t}:add{g} +auto=this(variable{olandu}>0) {t}:add{u} +auto=this(variable{olandr}>0) {t}:add{r} +auto=this(variable{olandb}>0) {t}:add{b} +auto=this(variable{olandw}>0) {t}:add{w} +text={T}: Add to your mana pool one mana of any color that a land an opponent controls could produce. +mana={1}{G} +type=Creature +subtype=Human Druid +power=1 +toughness=1 +[/card] +[card] name=Sylvok Lifestaff auto=1/0 auto=@movedTo(mytgt|graveyard) from(battlefield):all(trigger[to]) life:3 controller @@ -89408,8 +99202,8 @@ type=Sorcery [/card] [card] name=Synapse Sliver -auto=@combatdamaged(player) from(sliver|myBattlefield):may draw:1 controller -auto=@combatdamaged(player) from(sliver|opponentBattlefield):draw:1 opponent +auto=@combatdamagefoeof(player) from(sliver):ability$!name(Draw) may draw:1!$ opponent +auto=@combatdamageof(player) from(sliver):ability$!name(Draw) may draw:1!$ controller text=Whenever a Sliver deals combat damage to a player, its controller may draw a card. mana={4}{U} type=Creature @@ -89499,6 +99293,16 @@ mana={3}{B} type=Sorcery [/card] [card] +name=Syphon Sliver +auto=lord(sliver|mybattlefield) lifelink +text=All Sliver creatures you control have lifelink. +mana={2}{B} +type=Creature +subtype=Sliver +power=2 +toughness=2 +[/card] +[card] name=Syphon Soul auto=damage:2 opponent auto=life:2 controller @@ -89508,8 +99312,8 @@ type=Sorcery [/card] [card] name=Szadek, Lord of Secrets +alias=89092 abilities=flying -auto=@combatdamaged(player) from(this):deplete:thatmuch opponent && life:thatmuch opponent && counter(1/1,thatmuch) text=Flying -- If Szadek, Lord of Secrets would deal combat damage to a player, instead put that many +1/+1 counters on Szadek and that player puts that many cards from the top of his or her library into his or her graveyard. mana={3}{U}{U}{B}{B} type=Legendary Creature @@ -89530,6 +99334,14 @@ type=Land subtype=Mountain Forest [/card] [card] +name=Tail Slash +target=creature|mybattlefield +auto=transforms((,newability[target(creature|opponentbattlefield) dynamicability])) forever +text=Target creature you control deals damage equal to its power to target creature you don't control. +mana={2}{R} +type=Instant +[/card] +[card] name=Tainted AEther auto=@movedTo(creature|mybattlefield):sacrifice notatarget(creature,land|mybattlefield) auto=@movedTo(creature|opponentbattlefield):ability$!name(sacrifice) sacrifice notatarget(creature,land|mybattlefield) !$ opponent @@ -89640,6 +99452,13 @@ subtype=Aura abilities=split second [/card] [card] +name=Take up Arms +auto=token(Warrior,Creature Warrior,1/1,white)*3 +text=Put three 1/1 white Warrior creature tokens onto the battlefield. +mana={4}{W} +type=Instant +[/card] +[card] name=Takeno's Cavalry auto=bushido(1/1) auto={T}:damage:1 target(spirit[attacking;blocking]) @@ -89796,7 +99615,7 @@ toughness=3 [/card] [card] name=Talon of Pain -auto=@damaged(opponent) from(other *|mybattlefield,mystack):counter(0/0,1,charge) +auto=@damagefoeof(player) from(other *|mybattlefield,mystack,mygraveyard,mylibrary,myexile):counter(0/0,1,charge) auto={1}{C(0/0,-1,charge)}{T}:name(remove 1 counter) damage:1 target(creature,player) auto={2}{C(0/0,-2,charge)}{T}:name(Remove 2 Counters) damage:2 target(creature,player) auto={3}{C(0/0,-3,charge)}{T}:name(Remove 3 Counters) damage:3 target(creature,player) @@ -89934,10 +99753,7 @@ toughness=4 [/card] [card] name=Tamanoa -auto=@damaged(creature) from(*[-creature]|mybattlefield):may life:thatmuch controller -auto=@damaged(player) from(*[-creature]|mybattlefield):may life:thatmuch controller -auto=@damaged(creature) from(*[-creature]|mystack):may life:thatmuch controller -auto=@damaged(player) from(*[-creature]|mystack):may life:thatmuch controller +auto=@damaged(creature,player) from(*[-creature]|mybattlefield,mystack,mygraveyard,mylibrary,myexile):life:thatmuch controller text=Whenever a noncreature source you control deals damage, you gain that much life. mana={R}{G}{W} type=Creature @@ -89958,7 +99774,7 @@ subtype=Tamiyo [/card] [card] name=Tandem Lookout -auto=soulbond @damaged(opponent) from(this):draw:1 controller +auto=soulbond @damagefoeof(player) from(this):draw:1 controller abilities=soulbond text=Soulbond (You may pair this creature with another unpaired creature when either enters the battlefield. They remain paired for as long as you control both of them.) -- As long as Tandem Lookout is paired with another creature, each of those creatures has "Whenever this creature deals damage to an opponent, draw a card." mana={2}{U} @@ -90070,7 +99886,7 @@ toughness=2 [card] name=Taniwha abilities=trample,phasing -auto=@each my upkeep:phasout all(land|myBattlefield) +auto=@each my upkeep:phaseout all(land|myBattlefield) text=Trample -- Phasing (This phases in or out before you untap during each of your untap steps. While it's phased out, it's treated as though it doesn't exist.) -- At the beginning of your upkeep, all lands you control phase out. (They phase in before you untap during your next untap step.) mana={3}{U}{U} type=Legendary Creature @@ -90099,6 +99915,13 @@ power=2 toughness=2 [/card] [card] +name=Tapestry of the Ages +auto={2}{T}:draw:1 controller restriction{thisturn(*[-creature]|mystack)~morethan~0} +text={2}, {T}: Draw a card. Activate this ability only if you've cast a noncreature spell this turn. +mana={4} +type=Artifact +[/card] +[card] name=Tar Pitcher auto={T}{S(goblin|myBattlefield)}:damage:2 target(creature,player) text={T}, Sacrifice a Goblin: Tar Pitcher deals 2 damage to target creature or player. @@ -90140,14 +99963,7 @@ toughness=7 [/card] [card] name=Tarmogoyf -auto=aslongas(artifact|graveyard) 1/1 -auto=aslongas(creature|graveyard) 1/1 -auto=aslongas(enchantment|graveyard) 1/1 -auto=aslongas(instant|graveyard) 1/1 -auto=aslongas(land|graveyard) 1/1 -auto=aslongas(sorcery|graveyard) 1/1 -auto=aslongas(tribal|graveyard) 1/1 -auto=aslongas(planeswalker|graveyard) 1/1 +anyzone=gravecardtypes/plusonegravecardtypes cdaactive text=Tarmogoyf's power is equal to the number of card types among cards in all graveyards and its toughness is equal to that number plus 1. (The card types are artifact, creature, enchantment, instant, land, planeswalker, sorcery, and tribal.) mana={1}{G} type=Creature @@ -90290,6 +100106,7 @@ toughness=1 [/card] [card] name=Tattoo Ward +abilities=auraward target=creature auto=1/1 auto=protection from(enchantment) @@ -90474,6 +100291,7 @@ type=Legendary Land [/card] [card] name=Teferi's Moat +alias=1000 auto=chooseacolor lord(creature[chosencolor&-flying]|opponentBattlefield) cantattack chooseend text=As Teferi's Moat enters the battlefield, choose a color. -- Creatures of the chosen color without flying can't attack you. mana={3}{W}{U} @@ -90662,6 +100480,19 @@ mana={U}{U}{U} type=Instant [/card] [card] +name=Teleportal +alias=11000 +other={3}{U}{R} name(Overload) +target=creature|mybattlefield +auto=paidmana 1/0 +auto=paidmana unblockable +auto=overload all(creature|mybattlefield) 1/0 +auto=overload all(creature|mybattlefield) unblockable +text=Target creature you control gets +1/+0 until end of turn and is unblockable this turn. -- Overload {3}{U}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") +mana={U}{R} +type=Sorcery +[/card] +[card] name=Telethopter auto={T(creature|myBattlefield)}:flying text=Tap an untapped creature you control: Telethopter gains flying until end of turn. @@ -90844,7 +100675,7 @@ type=Sorcery name=Temporal Mastery auto=turns:+1 controller auto=exiledeath -autohand=restriction{miracle} pay[[{1}{U}]] name(Miracle) activate name(Miracle) castcard(normal) +autohand=restriction{miracle} pay[[{1}{U}]] name(Miracle) activate name(Miracle) castcard(restricted) text=Take an extra turn after this one. Exile Temporal Mastery. -- Miracle {1}{U} (You may cast this card for its miracle cost when you draw it if it's the first card you drew this turn.) mana={5}{U}{U} type=Sorcery @@ -90886,6 +100717,72 @@ power=5 toughness=5 [/card] [card] +name=Temur Ascendancy +auto=lord(creature|myBattlefield) haste +auto=@movedTo(creature[power>=4]|myBattlefield):may draw:1 controller +text=Creatures you control have haste. -- Whenever a creature with power 4 or greater enters the battlefield under your control, you may draw a card. +mana={G}{U}{R} +type=Enchantment +[/card] +[card] +name=Temur Banner +auto={T}: Add{G} +auto={T}: Add{U} +auto={T}: Add{R} +auto={G}{U}{R}{T}{S}:draw:1 controller +text={T}: Add {G},{U} or {R} to your mana pool. -- {G}{U}{R}, {T}, Sacrifice Temur Banner: Draw a card. +mana={3} +type=Artifact +[/card] +[card] +name=Temur Battle Rage +target=creature +auto=double strike ueot +auto=if type(creature[power>=4]|mybattlefield)~morethan~0 then trample ueot +text=Target creature gains double strike until end of turn. (It deals both first-strike and regular combat damage.) -- Ferocious - That creature also gains trample until end of turn if you control a creature with power 4 or greater. +mana={1}{R} +type=Instant +[/card] +[card] +name=Temur Charm +auto=choice name(+1/+1 and fight) target(creature|mybattlefield) transforms((,newability[1/1 ueot],newability[target(creature|opponentbattlefield) dynamicability])) ueot restriction{type(creature|opponentbattlefield)~morethan~0} +auto=choice name(Mana Leak) target(*|stack) transforms((,newability[pay[[{3}]] name(pay 3 mana) donothing?fizzle])) forever restriction{type(*|stack)~morethan~0} +auto=choice name(Creatures power 3 or less cant block) all(creature[power>=3]) cantblock ueot +text=Choose one: -- Target creature you control gets +1/+1 until end of turn. That creature fights target creature you don't control. -- Counter target spell unless its controller pays {3}. -- Creatures with power 3 or less can't block this turn. +mana={R}{G}{U} +type=Instant +[/card] +[card] +name=Temur Runemark +target=creature +auto=2/2 +auto=aslongas(*[blue;red]|mybattlefield):teach(creature) trample +text=Enchant creature. -- Enchanted creature gets +2/+2. -- Enchanted creature has trample as long as you control a blue or red permanent. +mana={2}{G} +type=Enchantment +subtype=Aura +[/card] +[card] +name=Temur Sabertooth +auto={H(other creature|mybattlefield)}{1}{G}:indestructible ueot +text={1}{G}: You may return another creature you control to its owner's hand. If you do, Temur Sabertooth gains indestructible until end of turn. +mana={2}{G}{G} +type=Creature +subtype=Cat +power=4 +toughness=3 +[/card] +[card] +name=Tenacious Dead +autograveyard=@movedto(this|mygraveyard) from(mybattlefield):all(trigger) transforms((,newability[name(Pay 1B) pay[[{1}{B}]] name(pay 1B mana) moveto(ownerbattlefield} && tap?name(cancel) donothing])) oneshot +text=When Tenacious Dead dies, you may pay {1}{B}. If you do, return it to the battlefield tapped under its owner's control. +mana={B} +type=Creature +subtype=Skeleton Warrior +power=1 +toughness=1 +[/card] +[card] name=Tendo Ice Bridge auto=counter(0/0,1,Charge) auto={T}:add{1} @@ -91031,7 +100928,7 @@ type=Instant [card] name=Terminus auto=all(creature) bottomoflibrary -autohand=restriction{miracle} pay[[{W}]] name(Miracle) activate name(Miracle) castcard(normal) +autohand=restriction{miracle} pay[[{W}]] name(Miracle) activate name(Miracle) castcard(restricted) text=Put all creatures on the bottom of their owners' libraries. -- Miracle {W} (You may cast this card for its miracle cost when you draw it if it's the first card you drew this turn.) mana={4}{W}{W} type=Sorcery @@ -91112,8 +101009,9 @@ type=Artifact [/card] [card] name=Terravore +alias=1111 abilities=trample -auto=foreach(land|graveyard) 1/1 +anyzone=type:land:graveyard/type:land:graveyard cdaactive text=Trample -- Terravore's power and toughness are each equal to the number of land cards in all graveyards. mana={1}{G}{G} type=Creature @@ -91149,6 +101047,16 @@ mana={4}{R}{R} type=Enchantment [/card] [card] +name=Territorial Roc +abilities=flying +text=Flying +mana={1}{W} +type=Creature +subtype=Bird +power=1 +toughness=3 +[/card] +[card] name=Terror target=creature[-black;-artifact] auto=bury @@ -91225,6 +101133,16 @@ power=2 toughness=2 [/card] [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. +mana={2}{W} +type=Creature +subtype=Cat Cleric +power=2 +toughness=3 +[/card] +[card] name=Tetsuo Umezawa auto=cantbetargetof(aura) auto={U}{B}{B}{R}{T}:name(Destroy target tapped creature) destroy target(creature[tapped]) @@ -91251,7 +101169,7 @@ toughness=3 name=Teysa, Envoy of Ghosts abilities=Vigilance auto=protection from(creature) -auto=@damaged(controller) from(creature):all(trigger[from]) destroy && token(Spirit,Creature Spirit,1/1,white,black, flying) +auto=@damageof(player) from(creature):all(trigger[from]) destroy && token(Spirit,Creature Spirit,1/1,white,black, flying) text=Vigilance. -- Protection from creatures. -- Whenever a creature deals damage to you, destroy that creature. Put a 1/1 white and black spirit token with flying onto the battlefield. mana={5}{W}{B} type=Legendary Creature @@ -91290,6 +101208,18 @@ mana={3}{p(U)} type=Sorcery [/card] [card] +name=Thada Adel, Acquisitor +abilities=islandwalk +auto=@combatdamagefoeof(player) from(this):name(exile artifact) notatarget(artifact|opponentlibrary) moveto(myexile) and!( transforms((,newability[canplayfromexile],newability[phaseactionmulti[endofturn once] moveto(ownerexile) all(this|exile)])) ueot)! +auto=@combatdamageof(player) from(this):name(exile artifact) notatarget(artifact|mylibrary) moveto(myexile) and!( transforms((,newability[canplayfromexile],newability[phaseactionmulti[endofturn once] moveto(ownerexile) all(this|exile)])) ueot)! +text=Islandwalk -- Whenever Thada Adel, Acquisitor deals combat damage to a player, search that player's library for an artifact card and exile it. Then that player shuffles his or her library. Until end of turn, you may play that card. +mana={1}{U}{U} +type=Legendary Creature +subtype=Merfolk Rogue +power=2 +toughness=2 +[/card] +[card] name=Thalakos Deceiver abilities=shadow auto=@combat(notblocked) source(this):may moveTo(myBattlefield) target(creature|opponentBattlefield) && sacrifice all(this) @@ -91364,8 +101294,8 @@ toughness=2 [card] name=Thalia, Guardian of Thraben abilities=first strike -auto=lord(*[-creature]|myhand) altercost(colorless,+1) -auto=lord(*[-creature]|opponenthand) altercost(colorless, +1) +auto=lord(*[-creature]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,+1) +auto=lord(*[-creature]|opponenthand,opponentlibrary,opponentgraveyard,opponentexile) altercost(colorless, +1) text=First Strike -- Noncreature spells cost {1} more to cast. mana={1}{W} type=Legendary Creature @@ -91421,6 +101351,42 @@ power=0 toughness=5 [/card] [card] +name=Thassa's Bounty +target=player +auto=deplete:3 +auto=draw:3 controller +text=Draw three cards. Target player puts the top three cards of his or her library into his or her graveyard. +mana={5}{U} +type=Sorcery +[/card] +[card] +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. +mana={4}{U} +type=Enchantment Creature +subtype=Elemental +power=2 +toughness=6 +[/card] +[card] +name=Thassa's Ire +auto={3}{U}:tap target(creature) +auto={3}{U}:untap target(creature) +text={3}{U}: You may tap or untap target creature. +mana={U} +type=Enchantment +[/card] +[card] +name=Thassa's Rebuff +target=*|stack +auto=transforms((,newability[pay[[{value:type:manaU}]] name(pay {value} mana) donothing?fizzle])) forever +text=Counter target spell unless its controller pays {X}, where X is your devotion to blue. (Each {U} in the mana costs of permanents you control counts toward your devotion to blue.) +mana={1}{U} +type=Instant +[/card] +[card] name=That Which Was Taken auto={4}{T}:counter(0/0,1,Divinity) target(other *) auto=lord(*[counter{0/0.1.Divinity}]) indestructible @@ -91474,7 +101440,7 @@ subtype=Aura [/card] [card] name=The Fallen -auto=@damaged(opponent) from(this) once:transforms((,newability[@each my upkeep:damage:1 opponent])) forever +auto=@damagefoeof(player) from(this) once:transforms((,newability[@each my upkeep:damage:1 opponent])) forever text=At the beginning of your upkeep, The Fallen deals 1 damage to each opponent it has dealt damage to this game. mana={1}{B}{B}{B} type=Creature @@ -91670,7 +101636,7 @@ toughness=2 [card] name=Thieving Magpie abilities=flying -auto=@damaged(opponent) from(this):draw:1 controller +auto=@damagefoeof(player) from(this):draw:1 controller text=Flying (This creature can't be blocked except by creatures with flying or reach.) -- Whenever Thieving Magpie deals damage to an opponent, you draw a card. mana={2}{U}{U} type=Creature @@ -91742,8 +101708,7 @@ toughness=3 [card] name=Thopter Assembly abilities=flying -auto=@each my upkeep restriction{type(other thopter|myBattlefield)~lessthan~1}:token(Thopter,Artifact Creature,1/1,flying)*5 -auto=@each my upkeep restriction{type(other thopter|myBattlefield)~lessthan~1}:moveTo(ownerhand) +auto=@each my upkeep restriction{type(other thopter|myBattlefield)~lessthan~1}:moveTo(ownerhand) and!(token(Thopter,Artifact Creature,1/1,flying)*5)! text=Flying -- At the beginning of your upkeep, if you control no Thopters other than Thopter Assembly, return Thopter Assembly to its owner's hand and put five 1/1 colorless Thopter artifact creature tokens with flying onto the battlefield. mana={6} type=Artifact Creature @@ -91752,6 +101717,17 @@ power=5 toughness=5 [/card] [card] +name=Thopter Engineer +auto=lord(creature[artifact]|mybattlefield) haste +auto=choice token(Thopter,Artifact Creature Thopter,1/1,flying) controller +text=When Thopter Engineer enters the battlefield, put a 1/1 colorless Thopter artifact creature token with flying onto the battlefield. -- Artifact creatures you control have haste. (They can attack and {T} as soon as they come under your control.) +mana={2}{R} +type=Creature +subtype=Human Artificer +power=1 +toughness=3 +[/card] +[card] name=Thopter Foundry auto={1}{S(artifact[-token]|myinplay)}:token(Thopter,artifact creature thopter,1/1,blue flying) && life:1 text={1}, Sacrifice a nontoken artifact: Put a 1/1 blue Thopter artifact creature token with flying onto the battlefield. You gain 1 life. @@ -91783,7 +101759,7 @@ toughness=7 [/card] [card] name=Thorn of Amethyst -auto=lord(*[-creature]|hand) altercost(colorless,+1) +auto=lord(*[-creature]|hand,library,graveyard,exile) altercost(colorless,+1) text=Noncreature spells cost {1} more to cast. mana={2} type=Artifact @@ -91803,7 +101779,7 @@ toughness=2 name=Thornbite Staff auto=teach(creature) transforms((,newability[{2}{T}:damage:1 target(creature,player)])) auto=@movedto(creature|graveyard) from(creature|battlefield):teach(creature) untap -auto=@movedto(creature[shaman]|battlefield):may all(trigger[to]) retarget +auto=@movedto(creature[shaman]|battlefield):may all(trigger[to]) rehook auto={4}:equip text=Equipped creature has "{2}, {T}: This creature deals 1 damage to target creature or player" and "Whenever a creature dies, untap this creature." -- Whenever a Shaman creature enters the battlefield, you may attach Thornbite Staff to it. -- Equip {4} mana={2} @@ -91811,6 +101787,26 @@ type=Tribal Artifact subtype=Shaman Equipment [/card] [card] +name=Thornbow Archer +auto=@combat(attacking) source(this) restriction{type(elf|opponentbattlefield)~lessthan~1}:life:-1 opponent +text=Whenever Thornbow Archer attacks, each opponent who doesn't control an Elf loses 1 life. +mana={B} +type=Creature +subtype=Elf Archer +power=1 +toughness=2 +[/card] +[card] +name=Thorncaster Sliver +auto=lord(sliver|mybattlefield) transforms((,newability[@combat(attacking) source(this):damage:1 target(creature,player)])) +text=Sliver creatures you control have "Whenever this creature attacks, it deals 1 damage to target creature or player." +mana={4}{R} +type=Creature +subtype=Sliver +power=2 +toughness=2 +[/card] +[card] name=Thornling auto={G}:haste auto={G}:trample @@ -91837,7 +101833,7 @@ toughness=1 [/card] [card] name=Thornscape Familiar -auto=lord(*[red;white]|myhand) altercost(colorless,-1) +auto=lord(*[red;white]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) text=Red spells and white spells you cast cost {1} less to cast. mana={1}{G} type=Creature @@ -91903,6 +101899,15 @@ power=1 toughness=1 [/card] [card] +name=Thornwood Falls +auto=tap +auto=life:1 +auto={T}:Add{G} +auto={T}:Add{U} +text=Thornwood Falls enters the battlefield tapped. -- When Thornwood Falls enters the battlefield, you gain 1 life. -- {T}: Add {G} or {U} to your mana pool. +type=Land +[/card] +[card] name=Thorn-Thrash Viashino auto=may target(other creature|mybattlefield) sacrifice && counter(1/1,2) all(this) auto={G}:trample @@ -91924,6 +101929,28 @@ power=1 toughness=1 [/card] [card] +name=Thought Devourer +abilities=flying +auto=hmodifer:-4 controller +text=Flying -- Your maximum hand size is reduced by four. +mana={2}{U}{U} +type=Creature +subtype=Beast +power=4 +toughness=4 +[/card] +[card] +name=Thought Eater +abilities=flying +auto=hmodifer:-3 controller +text=Flying -- Your maximum hand size is reduced by three. +mana={1}{U} +type=Creature +subtype=Beast +power=2 +toughness=2 +[/card] +[card] name=Thought Gorger abilities=trample auto=foreach(*|myhand) counter(1/1,1) && reject all(*|myhand) @@ -91944,6 +101971,17 @@ mana={2}{U}{U} type=Enchantment [/card] [card] +name=Thought Nibbler +abilities=flying +auto=hmodifer:-2 controller +text=Flying -- Your maximum hand size is reduced by two. +mana={U} +type=Creature +subtype=Beast +power=1 +toughness=1 +[/card] +[card] name=Thought Reflection auto=replacedraw draw:2 noreplace text=If you would draw a card, draw two cards instead. @@ -92018,6 +102056,17 @@ mana={G}{G} type=Enchantment [/card] [card] +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. +mana={4}{B}{B} +type=Enchantment Creature +subtype=Lamia +power=5 +toughness=3 +[/card] +[card] name=Thoughts of Ruin auto=if compare(phandcount)~morethan~0 then sacrifice notatarget(land|mybattlefield) auto=if compare(phandcount)~morethan~0 then ability$! sacrifice notatarget(land|mybattlefield) !$ opponent @@ -92043,6 +102092,19 @@ mana={4}{WU}{WU} type=Instant [/card] [card] +name=Thousand Winds +abilities=flying +facedown={3} +autofacedown={5}{U}{U}:morph +autofaceup=moveTo(ownerhand) all(creature[tapped]) +text=Morph {5}{U}{U} (You may cast this card face down as a 2/2 creature for 3. Turn it face up any time for its morph cost.) -- When Thousand Winds is turned face up, return all other tapped creatures to their owner's hands. +mana={4}{U}{U} +type=Creature +subtype=Elemental +power=5 +toughness=6 +[/card] +[card] name=Thousand-legged Kami auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=7]|mygraveyard) text=Soulshift 7 (When this dies, you may return target Spirit card with converted mana cost 7 or less from your graveyard to your hand.) @@ -92225,7 +102287,7 @@ toughness=3 name=Thraximundar abilities=haste auto=@combat(attacking) source(this):ability$!name(sacrifice) notatarget(creature|mybattlefield) sacrifice!$ opponent -auto=@sacrificed(creature):counter(1/1,1) +auto=@sacrificed(creature):name(counter +1/+1) ability$!may counter(1/1,1) all(mystored)!$ controller text=Haste -- Whenever Thraximundar attacks, defending player sacrifices a creature. -- Whenever a player sacrifices a creature, you may put a +1/+1 counter on Thraximundar. mana={4}{U}{B}{R} type=Legendary Creature @@ -92320,7 +102382,8 @@ type=Sorcery [card] name=Throat Slitter autohand={2}{B}{N}:ninjutsu -auto=@combatdamaged(player) from(this):destroy target(creature[-black]|opponentbattlefield) +auto=@combatdamagefoeof(player) from(this):destroy target(creature[-black]|opponentbattlefield) +auto=@combatdamageof(player) from(this):destroy target(creature[-black]|mybattlefield) text=Ninjutsu {2}{B} ({2}{B}, Return an unblocked attacker you control to hand: Put this card onto the battlefield from your hand tapped and attacking.) -- Whenever Throat Slitter deals combat damage to a player, destroy target nonblack creature that player controls. mana={4}{B} type=Creature @@ -92350,6 +102413,14 @@ mana={2} type=Artifact [/card] [card] +name=Throttle +target=creature +auto=-4/-4 ueot +text=Target creature gets -4/-4 until end of turn. +mana={4}{B} +type=Instant +[/card] +[card] name=Thrull Retainer target=creature auto=1/1 @@ -92479,7 +102550,7 @@ type=Sorcery name=Thunderblade Charge target=creature,player auto=damage:3 -autograveyard=@combatdamaged(player) from(creature|mybattlefield):pay({2}{R}{R}{R}) name(pay to cast) activate name(pay to cast) castcard(normal) +autograveyard=@combatdamaged(player) from(creature|mybattlefield):pay({2}{R}{R}{R}) name(pay to cast) activate name(pay to cast) castcard(restricted) text=Thunderblade Charge deals 3 damage to target creature or player. -- Whenever one or more creatures you control deal combat damage to a player, if Thunderblade Charge is in your graveyard, you may pay {2}{R}{R}{R}. If you do, you may cast it without paying its mana cost. mana={1}{R}{R} type=Sorcery @@ -92504,6 +102575,17 @@ mana={1}{R} type=Instant [/card] [card] +name=Thunderbreak Regent +abilities=flying +auto=@targeted(dragon|mybattlefield) from(*|opponentbattlefield,opponenthand,opponentstack,opponentgraveyard,opponentexile,opponentlibrary):damage:3 opponent +text=Flying -- Whenever a Dragon you control becomes the target of a spell or ability an opponent controls, Thunderbreak Regent deals 3 damage to that player. +mana={2}{R}{R} +type=Creature +subtype=Dragon +power=4 +toughness=4 +[/card] +[card] name=Thunderclap target=creature other={S(mountain|mybattlefield)} name(Sacrifice a Mountain) @@ -92513,6 +102595,17 @@ mana={2}{R} type=Instant [/card] [card] +name=Thunderclap Wyvern +abilities=flash, flying +auto=lord(other creature[flying]|mybattlefield) 1/1 +text=Flash (You may cast this spell any time you could cast an instant.) -- Flying -- Other creatures you control with flying get +1/+1. +mana={2}{W}{U} +type=Creature +subtype=Drake +power=2 +toughness=3 +[/card] +[card] name=Thundercloud Elemental abilities=flying auto={3}{U}:tap all(creature[toughness<=2]) @@ -92601,7 +102694,7 @@ subtype=Aura name=Thunderous Wrath target=creature,player auto=damage:5 -autohand=restriction{miracle} pay[[{R}]] name(Miracle) activate name(Miracle) castcard(normal) +autohand=restriction{miracle} pay[[{R}]] name(Miracle) activate name(Miracle) castcard(restricted) text=Thunderous Wrath deals 5 damage to target creature or player. -- Miracle {R} (You may cast this card for its miracle cost when you draw it if it's the first card you drew this turn.) mana={4}{R}{R} type=Instant @@ -92620,7 +102713,7 @@ toughness=1 [card] name=Thunderscape Familiar abilities=first strike -auto=lord(*[black;green]|myhand) altercost(colorless,-1) +auto=lord(*[black;green]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-1) text=First strike -- Black spells and green spells you cast cost {1} less to cast. mana={1}{R} type=Creature @@ -92712,7 +102805,7 @@ type=Instant [/card] [card] name=Tidal Influence -restrction=one of a kind +restriction=one of a kind auto=counter(0/0,1,Tide) auto=@each my upkeep:all(tidal influence[counter{0/0.4.Tide}]) removeallcounters(0/0,1,Tide) auto=@each my upkeep:counter(0/0,1,Tide) @@ -92768,6 +102861,16 @@ mana={2}{U} type=Instant [/card] [card] +name=Tidebinder Mage +auto=target(creature[red;green]|opponentbattlefield) transforms((,doesnotuntap,newability[tap])) +text=When Tidebinder Mage enters the battlefield, tap target red or green creature an opponent controls. That creature doesn't untap during its controller's untap step for as long as you control Tidebinder Mage. +mana={U}{U} +type=Creature +subtype=Merfolk Wizard +power=2 +toughness=2 +[/card] +[card] name=Tideforce Elemental auto={U}{T}:tap target(other creature) auto={U}{T}:untap target(other creature) @@ -92826,8 +102929,8 @@ toughness=5 [/card] [card] name=Tidewalker -auto=foreach(island|myBattlefield) counter(0/0,1,Time) -auto=thisforeach(counter{0/0.1.Time}) 1/1 +auto=foreach(island|myBattlefield) counter(0/0,1,Time) oneshot +anyzone=counter{0%0.1.Time}/counter{0%0.1.Time} cdaactive auto=vanishing:0 text=Tidewalker enters the battlefield with a time counter on it for each Island you control. -- Vanishing (At the beginning of your upkeep, remove a time counter from this permanent. When the last is removed, sacrifice it.) -- Tidewalker's power and toughness are each equal to the number of time counters on it. mana={2}{U} @@ -93055,6 +103158,16 @@ mana={8}{U}{U} type=Sorcery [/card] [card] +name=Time to Feed +target=creature|opponentbattlefield +auto=transforms((prey,newability[@movedto(this|graveyard) from(battlefield):life:3 opponent])) ueot +auto=target(creature|mybattlefield) transforms((,newability[target(creature[prey]|opponentbattlefield) dynamicability])) ueot +restriction=type(creature|opponentbattlefield)~morethan~0 +text=Choose target creature an opponent controls. When that creature dies this turn, you gain 3 life. Target creature you control fights that creature. (Each deals damage equal to its power to the other.) +mana={2}{G} +type=Sorcery +[/card] +[card] name=Time Walk auto=turns:+1 controller text=Take an extra turn after this one. @@ -93070,6 +103183,16 @@ mana={3}{U}{U} type=Sorcery [/card] [card] +name=Timely Hordemate +auto=if raid then moveTo(mybattlefield) target(creature[manacost<=2]|mygraveyard) +text=Raid - When Timely Hordemate enters the battlefield, if you attacked with a creature this turn, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield. +mana={3}{W} +type=Creature +subtype=Human Warrior +power=3 +toughness=2 +[/card] +[card] name=Timely Reinforcements auto=if type(creature|opponentbattlefield)~morethan~type(creature|mybattlefield) then token(Soldier,Creature Soldier,1/1,white)*3 auto=if compare(lifetotal)~lessthan~compare(opponentlifetotal) then life:6 @@ -93184,6 +103307,16 @@ mana={3} type=Artifact [/card] [card] +name=Titan of Eternal Fire +auto=lord(human|myBattlefield) {R}{T}:damage:1 target(creature,player) +text=Each Human creature you control has "{R}{T}: This creature deals 1 damage to target creature or player." +mana={5}{R} +type=Creature +subtype=Giant +power=5 +toughness=6 +[/card] +[card] name=Titania's Boon auto=lord(creature|mybattlefield) counter(1/1,1) text=Put a +1/+1 counter on each creature you control. @@ -93248,6 +103381,17 @@ mana={W} type=Instant [/card] [card] +name=Tithe Drinker +abilities=lifelink +auto=@movedto(*|mystack):pay({WB}) life:-1 opponent && life:1 controller +text=Lifelink -- Extort (Whenever you cast a spell, you may pay {WB}. If you do, each opponent loses 1 life and you gain that much life.) +mana={W}{B} +type=Creature +subtype=Vampire +power=2 +toughness=1 +[/card] +[card] name=Tivadar of Thorn abilities=first strike,protection from red auto=destroy target(goblin) @@ -93385,6 +103529,13 @@ mana={2}{B} type=Instant [/card] [card] +name=Tomb of the Spirit Dragon +auto={T}:Add{1} +auto={2}{T}:life:type:creature[-white;-blue;-black;-red;-green]:battlefield controller +text={T}: Add {1} to your mana pool. -- {2},{T}: You gain 1 life for each colorless creature you control. +type=Land +[/card] +[card] name=Tomb of Urami auto={T}:add{B} && aslongas(ogre|myBattlefield) damage:1 controller <1 auto={2}{B}{B}{T}:moveTo(mygraveyard) all(land|myBattlefield) && token(Urami,Legendary Creature Demon Spirit, 5/5,flying,black) @@ -93430,6 +103581,17 @@ power=2 toughness=2 [/card] [card] +name=Topan Freeblade +abilities=vigilance +auto=this(cantargetcard(*[-renown]) transforms((,newability[@combatdamaged(player) from(this):counter(1/1) && becomes(renown) forever])) +text=Vigilance (Attacking doesn't cause this creature to tap.) -- Renown 1 (When this creature deals combat damage to a player, if it isn't renowned, put a +1/+1 counter on it and it becomes renowned.) +mana={1}{W} +type=Creature +subtype=Human Soldier +power=2 +toughness=2 +[/card] +[card] name=Topple target=creature[power=power:highest:creature:battlefield] auto=moveTo(exile) @@ -93579,6 +103741,18 @@ power=6 toughness=4 [/card] ###The 2 cards above should stay together (Flip Card)### +#need parser from stack +[card] +name=Tormented Hero +auto=tap +auto=@targeted(this) from(*|nonbattlezone):life:-1 opponent && life:1 controller +text=Tormented Hero enters the battlefield tapped. -- Heroic - Whenever you cast a spell that targets Tormented Hero, each opponent loses 1 life. You gain life equal to the life lost this way. +mana={B} +type=Creature +subtype=Human Warrior +power=2 +toughness=1 +[/card] [card] name=Tormented Soul abilities=cantblock,unblockable @@ -93590,6 +103764,21 @@ power=1 toughness=1 [/card] [card] +name=Tormented Thoughts +target=player +auto=ability$!name(discard cards) target(*|myhand) reject!$ targetedplayer +text=As an additional cost to cast Tormented Thoughts, sacrifice a creature. -- Target player discards a number of cards equal to the sacrificed creature's power. +mana={2}{B}{S(creature|mybattlefield)} +type=Sorcery +[/card] +[card] +name=Tormenting Voice +auto=draw:2 +text=As an additional cost to cast Tormenting Voice, discard a card. -- Draw two cards. +mana={1}{R}{discard(*|myhand)} +type=Sorcery +[/card] +[card] name=Tormentor Exarch auto=choice 2/0 target(creature) ueot auto=choice 0/-2 target(creature) ueot @@ -93620,13 +103809,13 @@ type=Artifact [card] name=Tornado auto=cumulativeupcost[{G}] sacrifice -auto=this(counter{0/0.1.Velocity}<1) {2}{G}:destroy target(*) && all(this) counter(0/0,1,Velocity) -auto=this(counter{0/0.1.Velocity}=) {2}{G}{L:3}:destroy target(*) && all(this) counter(0/0,1,Velocity) -auto=this(counter{0/0.2.Velocity}=) {2}{G}{L:6}:destroy target(*) && all(this) counter(0/0,1,Velocity) -auto=this(counter{0/0.3.Velocity}=) {2}{G}{L:9}:destroy target(*) && all(this) counter(0/0,1,Velocity) -auto=this(counter{0/0.4.Velocity}=) {2}{G}{L:12}:destroy target(*) && all(this) counter(0/0,1,Velocity) -auto=this(counter{0/0.5.Velocity}=) {2}{G}{L:15}:destroy target(*) && all(this) counter(0/0,1,Velocity) -auto=this(counter{0/0.6.Velocity}=) {2}{G}{L:18}:destroy target(*) && all(this) counter(0/0,1,Velocity) +auto=this(counter{0/0.1.Velocity}<1) {2}{G}:destroy target(*) && all(this) counter(0/0,1,Velocity) limit:1 +auto=this(counter{0/0.1.Velocity}=) {2}{G}{L:3}:destroy target(*) && all(this) counter(0/0,1,Velocity) limit:1 +auto=this(counter{0/0.2.Velocity}=) {2}{G}{L:6}:destroy target(*) && all(this) counter(0/0,1,Velocity) limit:1 +auto=this(counter{0/0.3.Velocity}=) {2}{G}{L:9}:destroy target(*) && all(this) counter(0/0,1,Velocity) limit:1 +auto=this(counter{0/0.4.Velocity}=) {2}{G}{L:12}:destroy target(*) && all(this) counter(0/0,1,Velocity) limit:1 +auto=this(counter{0/0.5.Velocity}=) {2}{G}{L:15}:destroy target(*) && all(this) counter(0/0,1,Velocity) limit:1 +auto=this(counter{0/0.6.Velocity}=) {2}{G}{L:18}:destroy target(*) && all(this) counter(0/0,1,Velocity) limit:1 text=Cumulative upkeep {G} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.) -- {2}{G}, Pay 3 life for each velocity counter on Tornado: Destroy target permanent and put a velocity counter on Tornado. Activate this ability only once each turn. mana={4}{G} type=Enchantment @@ -93728,7 +103917,7 @@ type=Enchantment [/card] [card] name=Toshiro Umezawa -auto=@movedto(graveyard) from(creature|opponentBattlefield):may target(*[instant]|mygraveyard) castcard(normal) and!(transforms((,newability[exiledeath])) forever)! +auto=@movedto(graveyard) from(creature|opponentBattlefield):may target(*[instant]|mygraveyard) castcard(restricted) and!(transforms((,newability[exiledeath])) forever)! auto=bushido(1/1) text=Bushido 1 (When this blocks or becomes blocked, it gets +1/+1 until end of turn.) -- Whenever a creature an opponent controls is put into a graveyard from the battlefield, you may cast target instant card from your graveyard. If that card would be put into a graveyard this turn, exile it instead. mana={1}{B}{B} @@ -94011,11 +104200,12 @@ subtype=Spellshaper power=1 toughness=1 [/card] +#produceextra:selectmana when used acts as an observer so the ability must be on the source since its a mayability of mana not a menuability [card] name=Trace of Abundance target=land auto=shroud -auto=teach(land) transforms((,newability[@tappedformana(this):chooseacolor add{chosencolor} chooseend])) +auto=all(this) transforms((,newability[produceextra:selectmana])) forever text=Enchant land -- Enchanted land has shroud. (It can't be the target of spells or abilities.) -- Whenever enchanted land is tapped for mana, its controller adds one mana of any color to his or her mana pool (in addition to the mana the land produces). mana={RW}{G} type=Enchantment @@ -94136,6 +104326,17 @@ power=2 toughness=2 [/card] [card] +name=Trained Condor +abilities=flying +auto=@combat(attacking) source(this):flying target(other creature|myBattlefield) ueot +text=Flying. -- Whenever Trained Condor attacks, another target creature you control gains flying until end of turn. +mana={2}{U} +type=Creature +subtype=Bird +power=2 +toughness=1 +[/card] +[card] name=Trained Jackal mana={G} type=Creature @@ -94218,6 +104419,15 @@ mana={4}{BR} type=Sorcery [/card] [card] +name=Tranquil Cove +auto=tap +auto=life:1 +auto={T}:Add{W} +auto={T}:Add{U} +text=Tranquil Cove enters the battlefield tapped. -- When Tranquil Cove enters the battlefield, you gain 1 life. -- {T}: Add {W} or {U} to your mana pool. +type=Land +[/card] +[card] name=Tranquil Domain auto=destroy all(enchantment[-aura]) text=Destroy all non-Aura enchantments. @@ -94287,10 +104497,9 @@ type=Land [card] name=Transcendence abilities=cantlifelose -auto=this(controllerlife > 19) winGame opponent -auto=@lifed(controller):this(controllerlife > 19) winGame opponent -auto=@damaged(controller):life:twicethatmuch controller -auto=@lifeloss(controller):life:twicethatmuch controller +auto=this(controllerlife > 19)while winGame opponent +auto=@damageof(player):life:twicethatmuch controller +auto=@lifelostof(player):life:twicethatmuch controller text=You don't lose the game for having 0 or less life. -- When you have 20 or more life, you lose the game. -- Whenever you lose life, you gain 2 life for each 1 life you lost. (Damage dealt to you causes you to lose life.) mana={3}{W}{W}{W} type=Enchantment @@ -94340,6 +104549,15 @@ power=1 toughness=3 [/card] [card] +name=Trap Essence +target=*[creature]|stack +auto=fizzle +auto=may counter(1/1,2) target(creature) +text=Counter target creature spell. Put two +1/+1 counters on up to one target creature. +mana={G}{U}{R} +type=Instant +[/card] +[card] name=Trapfinder's Trick target=player auto=name(see target hand)target(*|targetedpersonshand) donothing @@ -94437,6 +104655,15 @@ type=Enchantment subtype=Aura [/card] [card] +name=Traveling Philosopher +text= +mana={1}{W} +type=Creature +subtype=Human Advisor +power=2 +toughness=2 +[/card] +[card] name=Treacherous Pit-Dweller autograveyard=@movedTo(mybattlefield) from(this|graveyard):all(trigger[to]) all(this) moveTo(opponentbattlefield) abilities=undying @@ -94482,6 +104709,15 @@ type=Enchantment subtype=Aura [/card] [card] +name=Tread Upon +target=creature|battlefield +auto=2/2 ueot +auto=trample ueot +text=Target creature gets +2/+2 and gains trample until end of turn. +mana={1}{G} +type=Instant +[/card] +[card] name=Treasure Hunter auto=may moveTo(myhand) target(artifact|mygraveyard) text=When Treasure Hunter enters the battlefield, you may return target artifact card from your graveyard to your hand. @@ -94778,6 +105014,18 @@ type=Land subtype=Lair [/card] [card] +name=Triad of Fates +auto={1}{T}:counter(0/0,1,fate) target(other creature|battlefield) +auto={W}{T}:(blink) target(creature[counter{0/0.1.fate}]|battlefield) +auto={B}{T}:moveto(exile) target(creature[counter{0/0.1.fate}]|battlefield) && draw:2 targetcontroller +text={1},{T}: Put a fate counter on another target creature. -- {W},{T}: Exile target creature that has a fate counter on it, then return it to the battlefield under its owner's control. -- {B},{T}: Exile target creature that has a fate counter on it. Its controller draws two cards. +mana={2}{W}{B} +type=Legendary Creature +subtype=Human Wizard +power=3 +toughness=3 +[/card] +[card] name=Triassic Egg auto={3}{T}:counter(0/0,1,Hatchling) auto={C(0/0,-2,Hatchling)}{S}:moveTo(myBattlefield) target(creature|myhand,mygraveyard) @@ -94924,15 +105172,6 @@ mana={5} type=Artifact [/card] [card] -name=Trinisphere -auto=this(untapped) lord(*[manacost=0]|hand) altercost(colorless, +3) -auto=this(untapped) lord(*[manacost=1]|hand) altercost(colorless, +2) -auto=this(untapped) lord(*[manacost=2]|hand) altercost(colorless, +1) -text=As long as Trinisphere is untapped, each spell that would cost less than three mana to cast costs three mana to cast. (Additional mana in the cost may be paid with any color of mana or colorless mana. For example, a spell that would cost {1}{B} to cast costs {2}{B} to cast instead.) -mana={3} -type=Artifact -[/card] -[card] name=Trinket Mage auto=may moveTo(myhand) target(artifact[manacost<=1]|mylibrary) text=When Trinket Mage enters the battlefield, you may search your library for an artifact card with converted mana cost 1 or less, reveal that card, and put it into your hand. If you do, shuffle your library. @@ -94991,6 +105230,55 @@ power=1 toughness=1 [/card] [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. +mana={3}{U} +type=Creature +subtype=Merfolk Soldier +power=2 +toughness=4 +[/card] +[card] +name=Triton Fortune Hunter +auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):draw:1 controller +text=Heroic - Whenever you cast a spell that targets Triton Fortune Hunter, draw a card. +mana={2}{U} +type=Creature +subtype=Merfolk Soldier +power=2 +toughness=2 +[/card] +[card] +name=Triton Shorestalker +abilities=unblockable +text=Triton Shorestalker can't be blocked. +mana={U} +type=Creature +subtype=Merfolk Rogue +power=1 +toughness=1 +[/card] +[card] +name=Triton Shorethief +text= +mana={U} +type=Creature +subtype=Merfolk Rogue +power=1 +toughness=2 +[/card] +[card] +name=Triton Tactics +target=creature +auto=0/3 +auto=untap +auto=transforms((,newability[@combat(blocking) source(this) from(creature):all(trigger[from]) phaseaction[combatends once] tap],newability[@combat(blocking) source(this) from(creature):all(trigger[from]) phaseaction[combatends once] frozen])) ueot +text=Up to two target creatures each get +0/+3 until end of turn. Untap those creatures. At this turn's next end of combat, tap each creature that was blocked by one of those creatures this turn and it doesn't untap during its controller's next untap step. +mana={U} +type=Instant +[/card] +[card] name=Triumph of Cruelty auto=@each my upkeep restriction{type(creature[power=power:highest:creature:myBattlefield]|myBattlefield)~equalto~type(creature[power=power:highest:creature:opponentBattlefield]|opponentBattlefield)}:transforms((,newability[name(target opponent) target(opponent) ability$!name(discard) target(*|myhand) reject!$ targetedplayer])) ueot auto=@each my upkeep restriction{type(creature[power=power:highest:creature:myBattlefield]|myBattlefield)~morethan~type(creature[power=power:highest:creature:opponentBattlefield]|opponentBattlefield)}:transforms((,newability[name(target opponent) target(opponent) ability$!name(discard) target(*|myhand) reject!$ targetedplayer])) ueot @@ -95222,6 +105510,17 @@ mana={2}{R} type=Instant [/card] [card] +name=Trusted Advisor +auto=hmodifer:2 controller +auto=@each my upkeep:moveTo(ownerhand) notatarget(creature[blue]|myBattlefield) +text=Your maximum hand size is increased by two. -- At the beginning of your upkeep, return a blue creature you control to its owner's hand. +mana={U} +type=Creature +subtype=Human Advisor +power=1 +toughness=2 +[/card] +[card] name=Trusted Forcemage auto=soulbond 1/1 abilities=soulbond @@ -95244,7 +105543,8 @@ subtype=Equipment [card] name=Trygon Predator abilities=flying -auto=@combatdamaged(player) from(this):may destroy target(artifact,enchantment|opponentBattlefield) +auto=@combatdamagefoeof(player) from(this):may destroy target(artifact,enchantment|opponentBattlefield) +auto=@combatdamageof(player) from(this):may destroy target(artifact,enchantment|myBattlefield) text=Flying -- Whenever Trygon Predator deals combat damage to a player, you may destroy target artifact or enchantment that player controls. mana={1}{G}{U} type=Creature @@ -95481,6 +105781,26 @@ power=1 toughness=4 [/card] [card] +name=Tusked Colossodon +text= +mana={4}{G}{G} +type=Creature +subtype=Beast +power=6 +toughness=5 +[/card] +[card] +name=Tuskguard Captain +auto={G}{T}:counter(1/1,1) asSorcery +auto=lord(creature[counter{1/1.1}]|myBattlefield) trample +text=Outlast {G} ({G}, {T}: Put a +1/+1 counter on this creature. Outlast only as a sorcery.) -- Each creature you control with a +1/+1 counter on it has trample. +mana={2}{G} +type=Creature +subtype=Human Warrior +power=2 +toughness=3 +[/card] +[card] name=Twiddle auto=may tap target(artifact,creature,land) auto=may untap target(artifact,creature,land) @@ -95530,6 +105850,15 @@ power=5 toughness=5 [/card] [card] +name=Twin Bolt +target=creature,player +auto=damage:1 +auto=damage:1 target(creature,player) +text=Twin Bolt deals 2 damage divided as you choose among one or two target creatures and/or players. +mana={1}{R} +type=Instant +[/card] +[card] name=Twinblade Slasher abilities=wither auto={1}{G}:2/2 limit:1 @@ -95611,6 +105940,27 @@ mana={2}{U} type=Instant [/card] [card] +name=Two-Headed Cerberus +abilities=double strike +text=Double strike. +mana={1}{R}{R} +type=Creature +subtype=Hound +power=1 +toughness=2 +[/card] +[card] +name=Tymaret, the Murder King +auto={1}{R}{S(other creature|mybattlefield)}:damage:2 target(player) +autograveyard={1}{B}{S(creature|mybattlefield)}:moveto(myhand) +text={1}{R}, Sacrifice another creature: Tymaret, the Murder King deals 2 damage to target player. -- {1}{B}, Sacrifice a creature: Return Tymaret from your graveyard to your hand. +mana={B}{R} +type=Legendary Creature +subtype=Zombie Warrior +power=2 +toughness=2 +[/card] +[card] name=Typhoid Rats abilities=deathtouch text=Deathtouch @@ -95646,6 +105996,13 @@ mana={3}{BR}{BR} type=Sorcery [/card] [card] +name=Tyrant's Machine +auto={4}{T}:tap target(creature) +text={4}, {T}: Tap target creature. +mana={2} +type=Artifact +[/card] +[card] name=Ubul Sar Gatekeepers auto=if type(land[Gate]|mybattlefield)~morethan~1 then -2/-2 target(creature|opponentbattlefield)ueot text=When Ubul Sar Gatekeepers enters the battlefield, if you control two or more Gates, target creature an opponent controls gets -2/-2 until end of turn. @@ -95656,6 +106013,47 @@ power=2 toughness=4 [/card] [card] +name=Ugin, the Spirit Dragon +auto=counter(0/0,7,loyalty) +auto={C(0/0,2,Loyalty)}:name(+2: damage 3) damage:3 target(creature,player) +auto={C(0/0,-0,Loyalty)}:name(X=0) moveto(exile) all(*[white;blue;black;red;green;manacost<=0]) +auto={C(0/0,-1,Loyalty)}:name(X=1) moveto(exile) all(*[white;blue;black;red;green;manacost<=1]) +auto={C(0/0,-2,Loyalty)}:name(X=2) moveto(exile) all(*[white;blue;black;red;green;manacost<=2]) +auto={C(0/0,-3,Loyalty)}:name(X=3) moveto(exile) all(*[white;blue;black;red;green;manacost<=3]) +auto={C(0/0,-4,Loyalty)}:name(X=4) moveto(exile) all(*[white;blue;black;red;green;manacost<=4]) +auto={C(0/0,-5,Loyalty)}:name(X=5) moveto(exile) all(*[white;blue;black;red;green;manacost<=5]) +auto={C(0/0,-6,Loyalty)}:name(X=6) moveto(exile) all(*[white;blue;black;red;green;manacost<=6]) +auto={C(0/0,-7,Loyalty)}:name(X=7) moveto(exile) all(*[white;blue;black;red;green;manacost<=7]) +auto={C(0/0,-8,Loyalty)}:name(X=8) moveto(exile) all(*[white;blue;black;red;green;manacost<=8]) +auto={C(0/0,-9,Loyalty)}:name(X=9) moveto(exile) all(*[white;blue;black;red;green;manacost<=9]) +auto={C(0/0,-10,Loyalty)}:name(X=10) moveto(exile) all(*[white;blue;black;red;green;manacost<=10]) +auto={C(0/0,-11,Loyalty)}:name(X=11) moveto(exile) all(*[white;blue;black;red;green;manacost<=11]) +auto={C(0/0,-12,Loyalty)}:name(X=12) moveto(exile) all(*[white;blue;black;red;green;manacost<=12]) +auto={C(0/0,-13,Loyalty)}:name(X=13) moveto(exile) all(*[white;blue;black;red;green;manacost<=13]) +auto={C(0/0,-14,Loyalty)}:name(X=14) moveto(exile) all(*[white;blue;black;red;green;manacost<=14]) +auto={C(0/0,-15,Loyalty)}:name(X=15) moveto(exile) all(*[white;blue;black;red;green;manacost<=15]) +auto={C(0/0,-16,Loyalty)}:name(X=16) moveto(exile) all(*[white;blue;black;red;green;manacost<=16]) +auto={C(0/0,-17,Loyalty)}:name(X=17) moveto(exile) all(*[white;blue;black;red;green;manacost<=17]) +auto={C(0/0,-18,Loyalty)}:name(X=18) moveto(exile) all(*[white;blue;black;red;green;manacost<=18]) +auto={C(0/0,-19,Loyalty)}:name(X=19) moveto(exile) all(*[white;blue;black;red;green;manacost<=19]) +auto={C(0/0,-20,Loyalty)}:name(X=20) moveto(exile) all(*[white;blue;black;red;green;manacost<=20]) +auto={C(0/0,-10,Loyalty)}:name(-10: Ultimate) life:7 && draw:7 && transforms((,newability[choice moveto(mybattlefield) target(*[-instant;-sorcery]|myhand)])) forever +text=+2: Ugin, the Spirit Dragon deals 3 damage to target creature or player. -- -X: Exile each permanent with converted mana cost X or less that's one or more colors. -- -10: You gain 7 life, draw seven cards, then put up to seven permanent cards from your hand onto the battlefield. +mana={8} +type=Planeswalker +subtype=Ugin +[/card] +[card] +name=Ugin's Construct +auto=sacrifice notatarget(*[white;blue;black;red;green]|myBattlefield) +text=When Ugin's Construct enters the battlefield, sacrifice a permanent that's one or more colors. +mana={4} +type=Artifact Creature +subtype=Construct +power=4 +toughness=5 +[/card] +[card] name=Uktabi Drake abilities=flying,haste auto=upcost[{1}{G}{G};next upkeep] sacrifice @@ -95699,7 +106097,7 @@ toughness=2 [/card] [card] name=Uktabi Wildcats -auto=foreach(forest|myBattlefield) 1/1 +anyzone=type:forest:mybattlefield/type:forest:mybattlefield cdaactive auto={G}{S(forest|myBattlefield)}:regenerate text=Uktabi Wildcats's power and toughness are each equal to the number of Forests you control. -- {G}, Sacrifice a Forest: Regenerate Uktabi Wildcats. mana={4}{G} @@ -95709,6 +106107,16 @@ power=* toughness=* [/card] [card] +name=Ukud Cobra +abilities=deathtouch +text=Deathtouch +mana={3}{B} +type=Creature +subtype=Snake +power=2 +toughness=5 +[/card] +[card] name=Ulamog, the Infinite Gyre abilities=indestructible auto=if casted(this) then destroy target(*) @@ -95734,16 +106142,25 @@ toughness=8 [/card] [card] name=Ulasht, the Hate Seed -auto=foreach(other creature[red]|myBattlefield) counter(1/1,1) -auto=foreach(other creature[green]|myBattlefield) counter(1/1,1) +auto=foreach(other creature[red]|myBattlefield) counter(1/1,1) oneshot +auto=foreach(other creature[green]|myBattlefield) counter(1/1,1) oneshot auto={1}{C(1/1,-1)}:damage:1 target(creature) auto={1}{C(1/1,-1)}:token(Saproling,Creature Saproling,1/1,green) text=Ulasht, the Hate Seed enters the battlefield with a +1/+1 counter on it for each other red creature you control and a +1/+1 counter on it for each other green creature you control. -- {1}, Remove a +1/+1 counter from Ulasht: Choose one - Ulasht deals 1 damage to target creature; or put a 1/1 green Saproling creature token onto the battlefield. mana={2}{R}{G} type=Legendary Creature subtype=Hellion Hydra -power=* -toughness=* +power=0 +toughness=0 +[/card] +[card] +name=Ulcerate +target=creature +auto=-3/-3 +auto=life:-3 controller +text=Target creature gets -3/-3 until end of turn. -- You lose 3 life. +mana={B} +type=Instant [/card] [card] name=Ultimate Price @@ -95818,7 +106235,8 @@ type=Artifact [/card] [card] name=Umbra Stalker -auto=thisforeach(variable{type:manab:mygraveyard}>0) 1/1 +alias=1111 +anyzone=type:manab:mygraveyard/type:manab:mygraveyard cdaactive text=Chroma - Umbra Stalker's power and toughness are each equal to the number of black mana symbols in the mana costs of cards in your graveyard. mana={4}{B}{B}{B} type=Creature @@ -95936,6 +106354,17 @@ type=Enchantment subtype=Aura [/card] [card] +name=Undead Alchemist +auto=lord(zombie|mybattlefield) libraryeater +auto=@movedTo(creature|opponentgraveyard) from(opponentlibrary):all(trigger[to]) moveto(exile) and!(token(Zombie,Creature Zombie,2/2,black) controller)! +text=If a Zombie you control would deal combat damage to a player, instead that player puts that many cards from the top of his or her library into his or her graveyard. -- Whenever a creature card is put into an opponent's graveyard from his or her library, exile that card and put a 2/2 black Zombie creature token onto the battlefield. +mana={3}{U} +type=Creature +subtype=Zombie +power=4 +toughness=2 +[/card] +[card] name=Undead Executioner auto=@movedto(this|graveyard) from(battlefield):may target(creature) -2/-2 ueot text=When Undead Executioner dies, you may have target creature get -2/-2 until end of turn. @@ -95968,6 +106397,25 @@ power=3 toughness=1 [/card] [card] +name=Undead Minotaur +text= +mana={2}{B} +type=Creature +subtype=Zombie Minotaur +power=2 +toughness=3 +[/card] +[card] +name=Undead Servant +auto=choice foreach(Undead Servant|mygraveyard) token(Zombie,Creature Zombie,2/2,black) controller +text=When Undead Servant enters the battlefield, put a 2/2 black Zombie creature token onto the battlefield for each card named Undead Servant in your graveyard. +mana={3}{B} +type=Creature +subtype=Zombie +power=3 +toughness=2 +[/card] +[card] name=Undead Slayer auto={W}{T}:moveTo(Exile) target(Skeleton,Vampire,Zombie) text={W}, {T}: Exile target Skeleton, Vampire, or Zombie. @@ -95980,7 +106428,7 @@ toughness=2 [card] name=Undead Warchief auto=lord(zombie|myBattlefield) 2/1 -auto=lord(zombie|myhand) altercost( colorless,-1) +auto=lord(zombie|myhand,mylibrary,mygraveyard,myexile) altercost( colorless,-1) text=Zombie spells you cast cost {1} less to cast. -- Zombie creatures you control get +2/+1. mana={2}{B}{B} type=Creature @@ -96000,6 +106448,17 @@ power=1 toughness=1 [/card] [card] +name=Undercity Troll +auto=this(cantargetcard(*[-renown]) transforms((,newability[@combatdamaged(player) from(this):counter(1/1) && becomes(renown) forever])) +auto={2}{G}:regenerate +text=Renown 1 (When this creature deals combat damage to a player, if it isn't renowned, put a +1/+1 counter on it and it becomes renowned.) -- {2}{G}: Regenerate Undercity Troll. (The next time this creature would be destroyed this turn, it isn't. Instead tap it, remove all damage from it, and remove it from combat.) +mana={1}{G} +type=Creature +subtype=Troll +power=2 +toughness=2 +[/card] +[card] name=Underground River auto={T}:Add{1} auto={T}:Add{U} && Damage:1 controller @@ -96022,6 +106481,16 @@ mana={G} type=Instant [/card] [card] +name=Undergrowth Scavenger +auto=counter(1/1,type:creature:graveyard) +text=Undergrowth Scavenger enters the battlefield with a number of +1/+1 counters on it equal to the number of creature cards in all graveyards. +mana={3}{G} +type=Creature +subtype=Fungus Horror +power=0 +toughness=0 +[/card] +[card] name=Undermine target=*|stack auto=fizzle @@ -96048,6 +106517,18 @@ mana={2}{U} type=Enchantment [/card] [card] +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. +mana={W}{B} +type=Enchantment Creature +subtype=Human Cleric +power=2 +toughness=2 +[/card] +[card] name=Underworld Connections target=land auto=teach(land) {T}{L}:draw:1 @@ -96058,7 +106539,7 @@ subtype=Aura [/card] [card] name=Underworld Dreams -auto=@drawn(opponent):damage:1 opponent +auto=@drawfoeof(player):damage:1 opponent text=Whenever an opponent draws a card, Underworld Dreams deals 1 damage to him or her. mana={B}{B}{B} type=Enchantment @@ -96187,6 +106668,15 @@ text={T}: Add {1} to your mana pool. -- {B}, {T}: Put target Zombie card from yo type=Land [/card] [card] +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. +mana={3}{B}{B} +type=Instant +[/card] +[card] name=Unholy Strength target=creature auto=2/1 @@ -96212,6 +106702,17 @@ mana={1}{U} type=Instant [/card] [card] +name=Unknown Shores +auto={T}:Add{1} +auto={1}{T}:Add{G} +auto={1}{T}:Add{R} +auto={1}{T}:Add{B} +auto={1}{T}:Add{U} +auto={1}{T}:Add{W} +text={T}: Add {1} to your mana pool. -- {1}, {T}: Add one mana of any color to your mana pool. +type=Land +[/card] +[card] name=Unlikely Alliance auto={1}{W}:0/2 target(creature[-attacking;-blocking]) text={1}{W}: Target nonattacking, nonblocking creature gets +0/+2 until end of turn. @@ -96472,6 +106973,16 @@ power=2 toughness=2 [/card] [card] +name=Unyielding Krumar +auto={1}{W}:first strike ueot +text={1}{W}: Unyielding Krumar gains first strike until end of turn. +mana={3}{B} +type=Creature +subtype=Orc Warrior +power=3 +toughness=3 +[/card] +[card] name=Updraft target=creature auto=flying @@ -96481,6 +106992,16 @@ mana={1}{U} type=Instant [/card] [card] +name=Updraft Elemental +abilities=flying +text=Flying +mana={2}{U} +type=Creature +subtype=Elemental +power=1 +toughness=4 +[/card] +[card] name=Upheaval auto=moveTo(ownerhand) all(*|battlefield) text=Return all permanents to their owners' hands. @@ -96789,7 +107310,7 @@ subtype=Urza's [/card] [card] name=Urza's Filter -auto=lord(*[multicolor]|hand) altercost(colorless,-2) +auto=lord(*[multicolor]|hand,library,graveyard,exile) altercost(colorless,-2) text=Multicolored spells cost up to {2} less to cast. mana={4} type=Artifact @@ -96803,28 +107324,34 @@ type=Sorcery [/card] [card] name=Urza's Incubator -auto=chooseatype lord(creature[chosentype]|myhand) altercost(colorless,-2) chooseend +auto=chooseatype lord(creature[chosentype]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless,-2) chooseend text=As Urza's Incubator enters the battlefield, choose a creature type. -- Creature spells of the chosen type cost {2} less to cast. mana={3} type=Artifact [/card] [card] name=Urza's Mine -auto={t}:name(Add Mana) if type(Urza's Tower|mybattlefield)~morethan~0,type(Urza's Power Plant|mybattlefield)~morethan~0 then add{2} else add{1} +alias=4192 +auto=this(variable{urzatron} >0) produceextra:{1} +auto={T}:add{1} text={T}: Add {1} to your mana pool. If you control an Urza's Power-Plant and an Urza's Tower, add {2} to your mana pool instead. type=Land subtype=Urza's Mine [/card] [card] name=Urza's Power Plant -auto={t}:name(Add Mana) if type(Urza's Tower|mybattlefield)~morethan~0,type(Urza's Mine|mybattlefield)~morethan~0 then add{2} else add{1} +alias=4193 +auto=this(variable{urzatron} >0) produceextra:{1} +auto={T}:add{1} text={T}: Add {1} to your mana pool. If you control an Urza's Mine and an Urza's Tower, add {2} to your mana pool instead. type=Land subtype=Urza's Power-Plant [/card] [card] name=Urza's Tower -auto={t}:name(Add Mana) if type(Urza's Power Plant|mybattlefield)~morethan~0,type(Urza's Mine|mybattlefield)~morethan~0 then add{3} else add{1} +alias=4194 +auto=this(variable{urzatron} >0) produceextra:{2} +auto={T}:add{1} text={T}: Add {1} to your mana pool. If you control an Urza's Mine and an Urza's Power-Plant, add {3} to your mana pool instead. type=Land subtype=Urza's Tower @@ -96858,7 +107385,11 @@ toughness=2 [card] name=Utopia Sprawl target=forest -auto=chooseacolor transforms((,newability[@tappedformana(mytgt):add{chosencolor}])) forever chooseend +auto=choice name(green) transforms((,newability[produceextra:{g}])) forever +auto=choice name(blue) transforms((,newability[produceextra:{u}])) forever +auto=choice name(red) transforms((,newability[produceextra:{r}])) forever +auto=choice name(black) transforms((,newability[produceextra:{b}])) forever +auto=choice name(white) transforms((,newability[produceextra:{w}])) forever text=Enchant Forest -- As Utopia Sprawl enters the battlefield, choose a color. -- Whenever enchanted Forest is tapped for mana, its controller adds one mana of the chosen color to his or her mana pool (in addition to the mana the land produces). mana={G} type=Enchantment @@ -96894,6 +107425,14 @@ type=Enchantment subtype=Aura [/card] [card] +name=Utter End +target=*[-land] +auto=moveTo(exile) +text=Exile target nonland permanent. +mana={2}{W}{B} +type=Instant +[/card] +[card] name=Utvara Hellkite auto=@combat(attacking) source(creature[dragon]|myBattlefield):token(Dragon,Creature Dragon,6/6,red,flying) abilities=flying @@ -96986,6 +107525,16 @@ power=0 toughness=3 [/card] [card] +name=Valley Dasher +abilities=haste,mustattack +text=Haste -- Valley Dasher attacks each turn if able. +mana={1}{R} +type=Creature +subtype=Human Berserker +power=2 +toughness=2 +[/card] +[card] name=Valley Rannet autohand={2}{cycle}:name(mountaincycling or forestcycling) moveTo(myhand) target(mountain,forest|mylibrary) text=Mountaincycling {2}, forestcycling {2} ({2}, Discard this card: Search your library for a Mountain or Forest card, reveal it, and put it into your hand. Then shuffle your library.) @@ -97018,6 +107567,13 @@ power=2 toughness=2 [/card] [card] +name=Valor in Akros +auto=@movedto(creature|mybattlefield):all(creature|mybattlefield) 1/1 ueot +text=Whenever a creature enters the battlefield under your control, creatures you control get +1/+1 until end of turn. +mana={3}{W} +type=Enchantment +[/card] +[card] name=Valorous Charge auto=lord(creature[white]) 2/0 text=White creatures get +2/+0 until end of turn. @@ -97025,6 +107581,15 @@ mana={1}{W}{W} type=Sorcery [/card] [card] +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. +mana={1}{W} +type=Instant +[/card] +[card] name=Vampire Aristocrat auto={S(creature|myBattlefield)}:2/2 text=Sacrifice a creature: Vampire Aristocrat gets +2/+2 until end of turn. @@ -97108,6 +107673,16 @@ power=2 toughness=2 [/card] [card] +name=Vampire Warlord +auto={S(other creature|myBattlefield)}:regenerate +text= Sacrifice another creature: Regenerate Vampire Warlord. +mana={4}{B} +type=Creature +subtype=Vampire Warrior +power=4 +toughness=2 +[/card] +[card] name=Vampire's Bite target=creature kicker={2}{B} @@ -97215,6 +107790,17 @@ type=Enchantment subtype=Aura [/card] [card] +name=Vandalblast +alias=11000 +other={4}{R} name(Overload) +target=artifact|opponentbattlefield +auto=overload destroy all(artifact|opponentbattlefield) +auto=paidmana destroy +text=Destroy target artifact you don't control. -- Overload {4}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") +mana={R} +type=Sorcery +[/card] +[card] name=Vanguard of Brimaz abilities=vigilance auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):token(Cat Soldier,Creature Cat Soldier,1/1,white,vigilance) controller @@ -97238,7 +107824,7 @@ subtype=Aura name=Vanishment target=*[-land] auto=moveTo(ownerlibrary) -autohand=restriction{miracle} pay[[{U}]] name(Miracle) activate name(Miracle) castcard(normal) +autohand=restriction{miracle} pay[[{U}]] name(Miracle) activate name(Miracle) castcard(restricted) text=Put target nonland permanent on top of its owner's library. -- Miracle {U} (You may cast this card for its miracle cost when you draw it if it's the first card you drew this turn.) mana={4}{U} type=Instant @@ -97271,6 +107857,16 @@ type=Enchantment subtype=Aura [/card] [card] +name=Vaporkin +abilities=flying,cloud +text=Flying -- Vaporkin can block only creatures with flying. +mana={1}{U} +type=Creature +subtype=Elemental +power=2 +toughness=1 +[/card] +[card] name=Vaporous Djinn abilities=flying auto=upcost[{U}{U}] phaseout @@ -97340,6 +107936,17 @@ power=5 toughness=6 [/card] [card] +name=Vastwood Hydra +auto=counter(1/1,X) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may thisforeach(counter{1/1.1}) ability$!name(give counter) notatarget(creature|mybattlefield) counter(1/1)!$ controller +text=Vastwood Hydra enters the battlefield with X +1/+1 counters on it. -- When Vastwood Hydra dies, you may distribute a number of +1/+1 counters equal to the number of +1/+1 counters on Vastwood Hydra among any number of creatures you control. +mana={X}{G}{G} +type=Creature +subtype=Hydra +power=0 +toughness=0 +[/card] +[card] name=Vastwood Zendikon target=land auto=becomes(Creature Elemental,6/4,green) @@ -97383,6 +107990,18 @@ mana={U} type=Instant [/card] [card] +name=Vaultbreaker +other={2}{R} name(Dash) +auto=if paid(alternative) then transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveto(ownerhand) all(this)])) forever +auto=@combat(attacking) source(this):may name(discard and draw) reject notatarget(*|myhand) && transforms((,newability[draw:1 controller])) forever +text=Whenever Vaultbreaker attacks, you may discard a card. If you do, draw a card. -- Dash {2}{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}{R} +type=Creature +subtype=Orc Rogue +power=4 +toughness=2 +[/card] +[card] name=Vebulid auto=counter(1/1,1) auto=@each my upkeep:may counter(1/1,1) @@ -97518,7 +108137,7 @@ toughness=1 [/card] [card] name=Vedalken Heretic -auto=@damaged(opponent) from(this):may draw:1 controller +auto=@damagefoeof(player) from(this):may draw:1 controller text=Whenever Vedalken Heretic deals damage to an opponent, you may draw a card. mana={G}{U} type=Creature @@ -97710,6 +108329,16 @@ power=2 toughness=3 [/card] [card] +name=Venerable Lammasu +abilities=flying +text=Flying +mana={6}{W} +type=Creature +subtype=Lammasu +power=5 +toughness=4 +[/card] +[card] name=Venerable Monk auto=life:2 controller text=When Venerable Monk enters the battlefield, you gain 2 life. @@ -97762,8 +108391,7 @@ toughness=2 [card] name=Vengeful Pharaoh abilities=deathtouch -autograveyard=@combatdamaged(controller):moveTo(ownerlibrary) -autograveyard=@combatdamaged(controller):destroy target(creature[attacking]) +autograveyard=@combatdamaged(player,planeswalker) from(*|opponentbattlefield):and!(destroy target(creature[attacking]))! moveTo(ownerlibrary) text=Deathtouch -- Whenever combat damage is dealt to your or a planeswalker you control, if Vengeful Pharaoh is in your graveyard, destroy target attacking creature, then put Vengeful Pharaoh on top of your library. mana={2}{B}{B}{B} type=Creature @@ -97802,6 +108430,16 @@ type=Enchantment subtype=Aura [/card] [card] +name=Venom Sliver +auto=lord(sliver|myBattlefield) deathtouch +text=Sliver creatures you control have deathtouch. (Any amount of damage a creature with deathtouch deals to a creature is enough to destroy it.) +mana={1}{G} +type=Creature +subtype=Sliver +power=1 +toughness=1 +[/card] +[card] name=Venomous Dragonfly abilities=flying auto=@combat(blocking,blocked) source(this) from(creature):all(trigger[from]) phaseaction[combatends once] destroy @@ -97945,11 +108583,12 @@ subtype=Elemental power=7 toughness=7 [/card] +#produceextra:selectmana when used acts as an observer so the ability must be on the source since its a mayability of mana not a menuability [card] name=Verdant Haven target=land auto=life:2 controller -auto=teach(land) transforms((,newability[@tappedformana(this):chooseacolor add{chosencolor} chooseend])) +auto=all(this) transforms((,newability[produceextra:selectmana])) forever text=Enchant land -- When Verdant Haven enters the battlefield, you gain 2 life. -- Whenever enchanted land is tapped for mana, its controller adds one mana of any color to his or her mana pool (in addition to the mana the land produces). mana={2}{G} type=Enchantment @@ -98024,8 +108663,7 @@ toughness=1 [/card] [card] name=Vernal Bloom -auto=@tappedformana(forest|mybattlefield):Add{G} controller -auto=@tappedformana(forest|opponentbattlefield):Add{G} opponent +auto=lord(forest|battlefield) transforms((,newability[produceextra:{G}])) text=Whenever a Forest is tapped for mana, its controller adds {G} to his or her mana pool (in addition to the mana the land produces). mana={3}{G} type=Enchantment @@ -98097,7 +108735,7 @@ type=Land name=Veteran's Armaments auto={2}:equip auto=@combat(attacking,blocking) source(mytgt) :all(trigger[to]) foreach(creature[attacking]|battlefield) 1/1 ueot -auto=@movedto(creature[soldier]|battlefield):may all(trigger[to]) retarget +auto=@movedto(creature[soldier]|battlefield):may all(trigger[to]) rehook text=Equipped creature has "Whenever this creature attacks or blocks, it gets +1/+1 until end of turn for each attacking creature." -- Whenever a Soldier creature enters the battlefield, you may attach Veteran's Armaments to it. -- Equip {2} mana={2} type=Tribal Artifact @@ -98174,6 +108812,15 @@ mana={W} type=Instant [/card] [card] +name=Veteran's Sidearm +auto={1}:equip +auto=teach(creature) 1/1 +text=Equipped creature gets +1/+1. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) +mana={2} +type=Artifact +subtype=Equipment +[/card] +[card] name=Veteran's Voice target=creature|mybattlefield auto=teach(creature) {T}:target(other creature) 2/1 ueot @@ -98191,17 +108838,16 @@ text=Counter target spell. That spell's controller may draw a card. mana={2}{U} type=Instant [/card] -# P/T modified to make auto rule possible [card] name=Vexing Beetle abilities=nofizzle -auto=aslongas(creature|opponentBattlefield) -3/-3 +auto=this(variable{type:creature:opponentbattlefield}<1) 3/3 text=Vexing Beetle can't be countered. -- Vexing Beetle gets +3/+3 as long as no opponent controls a creature. mana={4}{G} type=Creature subtype=Insect -power=6 -toughness=6 +power=3 +toughness=3 [/card] [card] name=Vexing Sphinx @@ -98228,6 +108874,20 @@ power=3 toughness=3 [/card] [card] +name=Vial of Dragonfire +auto={2}{T}{S}:damage:2 target(creature|battlefield) +text={2}, {T}, Sacrifice Vial of Dragonfire: Vial of Dragonfire deals 2 damage to target creature. +mana={2} +type=Artifact +[/card] +[card] +name=Vial of Poison +auto={1}{S}:target(creature) deathtouch ueot +text={1}, Sacrifice Vial of Poison: Target creature gains deathtouch until end of turn. +mana={1} +type=Artifact +[/card] +[card] name=Viashino Bey auto=aslongas(viashino bey[attacking]|myBattlefield) lord(creature|myBattlefield) mustattack text=If Viashino Bey attacks, all creatures you control attack if able. @@ -98436,8 +109096,8 @@ toughness=4 [/card] [card] name=Vibrating Sphere -auto=this(variable{controllerturn}) lord(creature|mybattlefield) 2/0 -auto=this(variable{opponentturn}) lord(creature|mybattlefield) 0/-2 +auto=this(variable{controllerturn}>0) lord(creature|mybattlefield) 2/0 +auto=this(variable{opponentturn}>0) lord(creature|mybattlefield) 0/-2 text=As long as it's your turn, creatures you control get +2/+0. -- As long as it's not your turn, creatures you control get -0/-2. mana={4} type=Artifact @@ -98639,18 +109299,8 @@ type=Instant [card] name=Vile Requiem auto=@each my upkeep:may counter(0/0,1,Verse) -auto=this(counter{0/0.1.Verse}=) {1}{B}{S}:bury target(creature[-black]) -auto=this(counter{0/0.2.Verse}=) {1}{B}{S}:bury target(creature[-black]) -auto=this(counter{0/0.3.Verse}=) {1}{B}{S}:bury target(creature[-black]) -auto=this(counter{0/0.4.Verse}=) {1}{B}{S}:bury target(creature[-black]) -auto=this(counter{0/0.5.Verse}=) {1}{B}{S}:bury target(creature[-black]) -auto=this(counter{0/0.6.Verse}=) {1}{B}{S}:bury target(creature[-black]) -auto=this(counter{0/0.7.Verse}=) {1}{B}{S}:bury target(creature[-black]) -auto=this(counter{0/0.8.Verse}=) {1}{B}{S}:bury target(creature[-black]) -auto=this(counter{0/0.9.Verse}=) {1}{B}{S}:bury target(creature[-black]) -auto=this(counter{0/0.10.Verse}=) {1}{B}{S}:bury target(creature[-black]) -auto=this(counter{0/0.11.Verse}=) {1}{B}{S}:bury target(creature[-black]) -auto=this(counter{0/0.12.Verse}=) {1}{B}{S}:bury target(creature[-black]) +auto=this(counter{0/0.1.Verse}<1) {1}{B}{S}:name(do nothing) donothing +auto=this(counter{0/0.1.Verse}>0) {1}{B}{S}:bury target(creature[-black]) text=At the beginning of your upkeep, you may put a verse counter on Vile Requiem. -- {1}{B}, Sacrifice Vile Requiem: Destroy up to X target nonblack creatures, where X is the number of verse counters on Vile Requiem. They can't be regenerated. mana={2}{B}{B} type=Enchantment @@ -98785,6 +109435,13 @@ power=1 toughness=3 [/card] [card] +name=Vine Snare +auto=preventAllCombatDamage from(creature[power<=4]) ueot +text=Prevent all combat damage that would be dealt this turn by creatures with power 4 or less. +mana={2}{G} +type=Instant +[/card] +[card] name=Vine Trellis abilities=defender auto={T}:Add{G} @@ -98816,6 +109473,16 @@ mana={G} type=Instant [/card] [card] +name=Vineweft +target=Creature +auto=teach(creature) 1/1 +autograveyard={4}{G}:moveTo(ownerhand) +text=Enchant creature -- Enchanted creature gets +1/+1. -- {4}{G}: Return Vineweft from your graveyard to hand. +mana={G} +type=Enchantment +subtype=Aura +[/card] +[card] name=Vintara Snapper auto=aslongas(land[-tapped]|myBattlefield) shroud <1 text=Vintara Snapper has shroud as long as you control no untapped lands. (It can't be the target of spells or abilities.) @@ -98844,6 +109511,16 @@ type=Tribal Instant subtype=Faerie [/card] [card] +name=Viper's Kiss +target=creature +auto=-1/-1 +auto=noactivatedability +text=Enchant creature -- Enchanted creature gets -1/-1, and its activated abilities can't be activated. +mana={B} +type=Enchantment +subtype=Aura +[/card] +[card] name=Viral Drake abilities=flying,infect auto={3}{U}:target(proliferation) proliferate @@ -99009,6 +109686,13 @@ mana={2}{W} type=Sorcery [/card] [card] +name=Virulent Plague +auto=lord(creature[token]|battlefield) -2/-2 +text=Creature tokens get -2/-2. +mana={2}{B} +type=Enchantment +[/card] +[card] name=Virulent Sliver auto=lord(sliver) poisontoxic text=All Sliver creatures have poisonous 1. (Whenever a Sliver deals combat damage to a player, that player gets a poison counter. A player with ten or more poison counters loses the game.) @@ -99084,7 +109768,7 @@ toughness=3 [/card] [card] name=Viseling -auto=@each opponent upkeep:foreach(*|opponenthand) damage:1 opponent >4 +auto=@each opponent upkeep:damage:morethanfourcards opponent text=At the beginning of each opponent's upkeep, Viseling deals X damage to that player, where X is the number of cards in his or her hand minus 4. mana={4} type=Artifact Creature @@ -99297,7 +109981,7 @@ type=Sorcery [card] name=Vizkopa Guildmage auto={1}{W}{B}:target(creature) lifelink ueot -auto={1}{W}{B}:name(lifeleech) emblem transforms((,newability[@lifed(controller):life:-thatmuch opponent])) ueot +auto={1}{W}{B}:name(lifeleech) emblem transforms((,newability[@lifeof(player):life:-thatmuch opponent])) ueot text={1}{W}{B}: Target creature gains lifelink until end of turn. -- {1}{W}{B}: Whenever you gain life this turn, each opponent loses that much life. mana={W}{B} type=Creature @@ -99408,6 +110092,7 @@ toughness=2 [/card] [card] name=Voice of All +alias=1000 abilities=flying auto=chooseacolor transforms((,newability[protection from(*[chosencolor])],newability[0/0])) forever chooseend text=Flying (This creature can't be blocked except by creatures with flying or reach.) -- As Voice of All enters the battlefield, choose a color. -- Voice of All has protection from the chosen color. (It can't be blocked, targeted, dealt damage, or enchanted by anything of the chosen color.) @@ -99472,7 +110157,7 @@ toughness=2 name=Elemental type=Creature subtype=Elemental -auto=foreach(creature|mybattlefield) 1/1 +anyzone=type:creature:mybattlefield/type:creature:mybattlefield cdaactive text=This creature's power and toughness are each equal to the number of creature cards in its controller's battlefield. power=* toughness=* @@ -99554,6 +110239,14 @@ mana={3}{B}{R} type=Sorcery [/card] [card] +name=Void Snare +target=*[-land]|battlefield +auto=moveTo(ownerHand) +text=Return target nonland permanent to its owner's hand. +mana={U} +type=Sorcery +[/card] +[card] name=Void Stalker auto={2}{U}{T}:name(shuffle target) moveTo(ownerLibrary) all(this) && shuffle controller && target(creature|battlefield) transforms((,newability[moveTo(ownerLibrary) all(this)],newability[shuffle controller])) ueot text={2}{U}, {T}: Put Void Stalker and target creature on top of their owners' libraries, then those players shuffle their libraries. @@ -99665,6 +110358,24 @@ type=Land subtype=Island Mountain [/card] [card] +name=Volcanic Rambler +auto={2}{R}:damage:1 target(player) +text={2}{R}: Volcanic Rambler deals 1 damage to target player. +mana={5}{R} +type=Creature +subtype=Elemental +power=6 +toughness=4 +[/card] +[card] +name=Volcanic Rush +auto=all(creature[attacking]) 2/0 ueot +auto=all(creature[attacking]) trample ueot +text=Attacking creatures get +2/+0 and gain trample until end of turn. +mana={4}{R} +type=Instant +[/card] +[card] name=Volcanic Spray auto=damage:1 all(creature[-flying]) auto=damage:1 all(player) @@ -99893,6 +110604,16 @@ mana={1} type=Artifact [/card] [card] +name=Voyaging Satyr +auto={T}:untap target(land) +text={T}: Untap target land. +mana={1}{G} +type=Creature +subtype=Satyr Druid +power=1 +toughness=2 +[/card] +[card] name=Vow of Duty target=creature auto=2/2 @@ -99960,7 +110681,8 @@ subtype=Vraska [/card] [card] name=Assassin Token -auto=@combatdamaged(player) from(this):winGame controller +auto=@combatdamagefoeof(player) from(this):winGame controller +auto=@combatdamageof(player) from(this):winGame opponent type=Creature subtype=Assassin power=1 @@ -99968,6 +110690,17 @@ toughness=1 color=black [/card] [card] +name=Vryn Wingmare +abilities=flying +auto=lord(*[-creature]|hand,library,graveyard,exile) altercost(colorless, +1) +text=Flying -- Noncreature spells cost {1} more to cast. +mana={2}{W} +type=Creature +subtype=Pegasus +power=2 +toughness=1 +[/card] +[card] name=Vug Lizard abilities=mountainwalk auto=upcost[{1}{R}{R};next upkeep] sacrifice @@ -99979,6 +110712,16 @@ power=3 toughness=4 [/card] [card] +name=Vulpine Goliath +abilities=trample +text=Trample +mana={4}{G}{G} +type=Creature +subtype=Fox +power=6 +toughness=5 +[/card] +[card] name=Vulshok Battlegear auto={3}:equip auto=3/3 @@ -99990,7 +110733,7 @@ subtype=Equipment [card] name=Vulshok Battlemaster abilities=haste -auto=all(equipment|battlefield) newtarget +auto=all(equipment|battlefield) newhook text=Haste -- When Vulshok Battlemaster enters the battlefield, attach all Equipment on the battlefield to it. (Control of the Equipment doesn't change.) mana={4}{R} type=Creature @@ -100080,6 +110823,17 @@ power=5 toughness=5 [/card] [card] +name=Vulturous Aven +abilities=flying +auto=may name(Exploit) sacrifice notatarget(creature|mybattlefield) && draw:2 controller && life:-2 controller +text=Flying -- Exploit (When this creature enters the battlefield, you may sacrifice a creature.) -- When Vulturous Aven exploits a creature, you draw two cards and you lose 2 life. +mana={3}{B} +type=Creature +subtype=Bird Shaman +power=2 +toughness=3 +[/card] +[card] name=Vulturous Zombie abilities=flying auto=@movedTo(*|opponentgraveyard):counter(1/1,1) @@ -100186,7 +110940,7 @@ type=Sorcery [card] name=Walker of Secret Ways autohand={1}{U}{N}:ninjutsu -auto=@combatdamaged(player) from(this):name(look at opponents hand) target(*|opponenthand) donothing ueot +auto=@combatdamagefoeof(player) from(this):name(look at opponents hand) target(*|opponenthand) donothing ueot auto={1}{U}:moveTo(myhand) target(ninja|myBattlefield) myTurnOnly text=Ninjutsu {1}{U} ({1}{U}, Return an unblocked attacker you control to hand: Put this card onto the battlefield from your hand tapped and attacking.) -- Whenever Walker of Secret Ways deals combat damage to a player, look at that player's hand. -- {1}{U}: Return target Ninja you control to its owner's hand. Activate this ability only during your turn. mana={2}{U} @@ -100211,8 +110965,8 @@ toughness=7 name=Walking Archive abilities=defender auto=counter(1/1,1) -auto=@each my upkeep:thisforeach(counter{1/1.1}) draw:1 controller -auto=@each opponent upkeep:thisforeach(counter{1/1.1}) draw:1 opponent +auto=@each my upkeep:draw:counter{1%1} controller +auto=@each opponent upkeep:draw:counter{1%1} opponent auto={2}{W}{U}:counter(1/1,1) text=Defender (This creature can't attack.) -- Walking Archive enters the battlefield with a +1/+1 counter on it. -- At the beginning of each player's upkeep, that player draws a card for each +1/+1 counter on Walking Archive. -- {2}{W}{U}: Put a +1/+1 counter on Walking Archive. mana={3} @@ -100528,6 +111282,18 @@ power=1 toughness=5 [/card] [card] +name=Wall of Limbs +abilities=defender +auto=@lifeof(player):counter(1/1,1) +auto={5}{B}{B}{S}:name(Lose Life) target(player) life:-storedpower +text=Defender (This creature can't attack.) -- Whenever you gain life, put a +1/+1 counter on Wall of Limbs. -- {5}{B}{B}, Sacrifice Wall of Limbs: Target player loses X life, where X is Wall of Limbs's power. +mana={2}{B} +type=Creature +subtype=Zombie Wall +power=0 +toughness=3 +[/card] +[card] name=Wall of Mulch abilities=defender auto={G}{S(wall|myBattlefield)}:draw:1 @@ -100639,7 +111405,10 @@ toughness=5 [card] name=Wall of Shards abilities=defender,flying -auto=@each my upkeep:counter(0/0,1,Age) && all(this) transforms((,newability[choice sacrifice],newability[choice life:counter{0%0.1.Age} opponent])) +auto=@each my upkeep restriction{type(*[nolifegain]|mybattlefield)~lessthan~1,type(*[nolifegainopponent]|opponentbattlefield)~lessthan~1}:counter(0/0,1,Age) && all(this) transforms((,newability[choice sacrifice],newability[choice life:counter{0%0.1.Age} opponent])) +auto=@each my upkeep restriction{type(*[nolifegain]|opponentbattlefield)~morethan~0,type(*[nolifegainopponent]|mybattlefield)~lessthan~1}:sacrifice +auto=@each my upkeep restriction{type(*[nolifegain]|opponentbattlefield)~lessthan~1,type(*[nolifegainopponent]|mybattlefield)~morethan~0}:sacrifice +auto=@each my upkeep restriction{type(*[nolifegain]|opponentbattlefield)~morethan~0,type(*[nolifegainopponent]|mybattlefield)~morethan~0}:sacrifice text=Defender, flying -- Cumulative upkeep - An opponent gains 1 life. (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.) mana={1}{W} type=Snow Creature @@ -100835,6 +111604,16 @@ power=3 toughness=3 [/card] [card] +name=Wandering Champion +auto=@combatdamaged(player) from(this) restriction{type(*[blue;red]|mybattlefield)~morethan~0}:may name(discard and draw) reject notatarget(*|myhand) && transforms((,newability[draw:1 controller])) forever +text=Whenever Wandering Champion deals combat damage to a player, if you control a blue or red permanent, you may discard a card. If you do, draw a card. +mana={1}{W} +type=Creature +subtype=Human Monk +power=3 +toughness=1 +[/card] +[card] name=Wandering Goblins auto={3}:aslongas(plains|myBattlefield]) 1/0 && aslongas(island|myBattlefield]) 1/0 && aslongas(swamp|myBattlefield]) 1/0 && aslongas(mountain|myBattlefield]) 1/0 && aslongas(forest|myBattlefield]) 1/0 text=Domain - {3}: Wandering Goblins gets +1/+0 until end of turn for each basic land type among lands you control. @@ -100876,6 +111655,14 @@ mana={2}{G} type=Sorcery [/card] [card] +name=Wandering Tombshell +mana={3}{B} +type=Creature +subtype=Zombie Turtle +power=1 +toughness=6 +[/card] +[card] name=Wandering Wolf abilities=strong text=Creatures with power less than Wandering Wolf's power can't block it. @@ -100926,6 +111713,17 @@ power=7 toughness=6 [/card] [card] +name=War Behemoth +facedown={3} +autofacedown={4}{W}:morph +text=Morph {4}{W} (You may cast this card face down as a 2/2 creature for 3. Turn it face up any time for its morph cost.) +mana={5}{W} +type=Creature +subtype=Beast +power=3 +toughness=6 +[/card] +[card] name=War Dance auto=@each my upkeep:may counter(0/0,1,Verse) auto={S}:thisforeach(counter{0/0.1.Verse}) 1/1 target(creature) @@ -100943,7 +111741,7 @@ type=Artifact [card] name=War Elemental auto=this(opponentdamagecount < 1) aslongas(War Elemental|mybattlefield) sacrifice oneshot -auto=@damaged(opponent):may all(trigger[to]) dynamicability +auto=@damagefoeof(player):may all(trigger[to]) dynamicability text=When War Elemental enters the battlefield, sacrifice it unless an opponent was dealt damage this turn. -- Whenever an opponent is dealt damage, put that many +1/+1 counters on War Elemental. mana={R}{R}{R} type=Creature @@ -100963,6 +111761,21 @@ power=2 toughness=1 [/card] [card] +name=War Flare +auto=all(creature|myBattlefield) 2/1 ueot +auto=untap all(creature|myBattlefield) +text=Creatures you control get +2/+1 until end of turn. Untap those creatures. +mana={2}{R}{W} +type=Instant +[/card] +[card] +name=War Horn +auto=lord(creature[attacking]|mybattlefield) 1/0 +text=Attacking creatures you control get +1/+0. +mana={3} +type=Artifact +[/card] +[card] name=War Mammoth abilities=trample text=Trample @@ -100973,6 +111786,17 @@ power=3 toughness=3 [/card] [card] +name=War Oracle +abilities=lifelink +auto=this(cantargetcard(*[-renown]) transforms((,newability[@combatdamaged(player) from(this):counter(1/1) && becomes(renown) forever])) +text=Lifelink (Damage dealt by this creature also causes you to gain that much life.) -- Renown 1 (When this creature deals combat damage to a player, if it isn't renowned, put a +1/+1 counter on it and it becomes renowned.) +mana={2}{W}{W} +type=Creature +subtype=Human Cleric +power=3 +toughness=3 +[/card] +[card] name=War Priest of Thune auto=may destroy target(enchantment) text=When Warpriest of Thune enters the battlefield, you may destroy target enchantment. @@ -100991,6 +111815,17 @@ mana={3}{W} type=Instant [/card] [card] +name=War-Name Aspirant +auto=if raid then counter(1/1,1) +auto=cantbeblockedby(creature[power<=1]) +text=Raid - War-Name Aspirant enters the battlefield with a +1/+1 counter on it if you attacked with a creature this turn. -- War-Name Aspirant can't be blocked by creatures with power 1 or less. +mana={1}{R} +type=Creature +subtype=Human Warrior +power=2 +toughness=1 +[/card] +[card] name=War-Spike Changeling abilities=changeling auto={R}:first strike @@ -101012,6 +111847,17 @@ power=1 toughness=1 [/card] [card] +name=War-Wing Siren +abilities=flying +auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):counter(1/1,1) +text=Flying -- Heroic -- Whenever you cast a spell that targets War-Wing Siren, put a +1/+1 counter on War-Wing Siren. +mana={2}{U} +type=Creature +subtype=Siren Soldier +power=1 +toughness=3 +[/card] +[card] name=War's Toll auto=@tappedformana(land|opponentBattlefield):tap all(land|opponentBattlefield) auto=@combat(attacking) source(creature|opponentBattlefield):mustattack all(creature|opponentBattlefield) ueot @@ -101053,6 +111899,7 @@ toughness=1 [/card] [card] name=Ward Sliver +alias=1000 auto=chooseacolor transforms((,newability[lord(sliver) protection from(*[chosencolor])])) forever chooseend text=As Ward Sliver enters the battlefield, choose a color. -- All Slivers have protection from the chosen color. mana={4}{W} @@ -101062,6 +111909,39 @@ power=2 toughness=2 [/card] [card] +name=Warden of Evos Isle +abilities=flying +auto=lord(creature[flying]|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) +text=Flying. -- Creature spells with flying you cast cost 1 less to cast. +mana={2}{U} +type=Creature +subtype=Bird Wizard +power=2 +toughness=2 +[/card] +[card] +name=Warden of the Eye +auto=moveTo(myhand) target(*[-creature;-land]|mygraveyard) +text=When Warden of the Eye enters the battlefield, return target noncreature, nonland card from your graveyard to your hand. +mana={2}{U}{R}{W} +type=Creature +subtype=Djinn Wizard +power=3 +toughness=3 +[/card] +[card] +name=Warden of the First Tree +auto={1}{WB}:becomes(Human Warrior,3/3) forever +auto=this(cantargetcard(*[Warrior]) {2}{WB}{WB}:becomes(Human Spirit Warrior,trample,lifelink) forever ) +auto=this(cantargetcard(*[Spirit]) {3}{WB}{WB}{WB}:counter(1/1,5) +text={1}{WB}: Warden of the First Tree becomes a Human Warrior with base power and toughness 3/3. -- {2}{WB}{WB}: If Warden of the First Tree is a Warrior, it becomes a Human Spirit Warrior with trample and lifelink. -- {3}{WB}{WB}{WB}: If Warden of the First Tree is a Spirit, put five +1/+1 counters on it. +mana={G} +type=Creature +subtype=Human +power=1 +toughness=1 +[/card] +[card] name=Warden of the Wall auto=tap auto={T}:Add{1} @@ -101176,7 +112056,7 @@ type=Instant [card] name=Warren Instigator abilities=double strike -auto=@damaged(player) from(this):may moveto(myBattlefield) target(creature[goblin]|myHand) +auto=@damagefoeof(player) from(this):may moveto(myBattlefield) target(creature[goblin]|myHand) text=Double strike -- Whenever Warren Instigator deals damage to an opponent, you may put a Goblin creature card from your hand onto the battlefield. mana={R}{R} type=Creature @@ -101220,6 +112100,14 @@ mana={2}{W} type=Instant [/card] [card] +name=Warrior's Lesson +target=creature|mybattlefield +auto=transforms((,newability[@combatdamaged(player) from(this):draw:1 controller])) ueot +text=Until end of turn, up to two target creatures you control each gain "Whenever this creature deals combat damage to a player, draw a card." +mana={G} +type=Instant +[/card] +[card] name=Warrior's Oath auto=turns:+1 controller auto=transforms((,newability[@each my upkeep:phaseaction[endofturn once] winGame opponent])) forever @@ -101289,6 +112177,15 @@ mana={4}{B}{discard(*|myhand)} type=Instant [/card] [card] +name=Waste Not +auto=@discarded(creature|opponenthand):token(Zombie,Creature Zombie,2/2,black) controller +auto=@discarded(land|opponenthand):add{B}{B} controller +auto=@discarded(*[-creature;-land]|opponenthand):draw:1 controller +text=Whenever an opponent discards a creature card, put a 2/2 black Zombie creature token onto the battlefield. -- Whenever an opponent discards a land card, add {B}{B} to your mana pool. -- Whenever an opponent discards a noncreature, nonland card, draw a card. +mana={1}{B} +type=Enchantment +[/card] +[card] name=Wasteland auto={T}:Add{1} auto={T}{S}:destroy target(land[-basic]) @@ -101417,6 +112314,14 @@ text={T}: Add {1} to your mana pool. -- {T}: Add {U} or {B} to your mana pool. W type=Land [/card] [card] +name=Waterwhirl +target=creature|battlefield +auto=moveTo(ownerhand) +text=Return up to two target creatures to their owners' hands. +mana={4}{U}{U} +type=Instant +[/card] +[card] name=Watery Grave auto=tap auto=pay({L:2}) untap @@ -101450,6 +112355,16 @@ mana={4}{W} type=Sorcery [/card] [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. +mana={2}{U} +type=Creature +subtype=Merfolk Wizard +power=1 +toughness=4 +[/card] +[card] name=Waves of Aggression retrace={3}{RW}{RW}{S(land|myhand)} auto=nextphasealter(add,combatphaseswithmain,controller,after) @@ -101519,7 +112434,7 @@ toughness=3 [/card] [card] name=Wayfaring Temple -auto=foreach(creature|mybattlefield) 1/1 +anyzone=type:creature:mybattlefield/type:creature:mybattlefield cdaactive auto=@combatdamaged(player) from(this) restriction{type(creature[token]|mybattlefield)~morethan~0}:name(populate) clone notatarget(creature[token]|mybattlefield) text=Wayfaring Temple's power and toughness are each equal to the number of creatures you control. -- Whenever Wayfaring Temple deals combat damage to a player, populate. (Put a token onto the battlefield that's a copy of a creature token you control.) mana={1}{G}{W} @@ -101577,6 +112492,19 @@ mana={4} type=Artifact [/card] [card] +name=Weapon Surge +alias=11000 +other={1}{R} name(Overload) +target=creature|mybattlefield +auto=paidmana 1/0 +auto=paidmana first strike +auto=overload all(creature|mybattlefield) 1/0 +auto=overload all(creature|mybattlefield) first strike +text=Target creature you control gets +1/+0 and gains first strike until end of turn. -- Overload {1}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") +mana={R} +type=Instant +[/card] +[card] name=Weathered Wayfarer auto={W}{T}:moveTo(myhand) target(land|mylibrary) restriction{type(land|opponentbattlefield)~morethan~type(land|mybattlefield)} text={W}, {T}: Search your library for a land card, reveal it, and put it into your hand. Then shuffle your library. Activate this ability only if an opponent controls more lands than you. @@ -101618,6 +112546,13 @@ power=5 toughness=3 [/card] [card] +name=Weave Fate +auto=draw:2 controller +text=Draw two cards. +mana={3}{U} +type=Instant +[/card] +[card] name=Web target=creature auto=reach @@ -101697,7 +112632,7 @@ toughness=1 [card] name=Wei Night Raiders abilities=horsemanship -auto=@damaged(opponent) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@damagefoeof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent text=Horsemanship (This creature can't be blocked except by creatures with horsemanship.) -- Whenever Wei Night Raiders deals damage to an opponent, that player discards a card. mana={2}{B}{B} type=Creature @@ -101869,6 +112804,15 @@ power=3 toughness=3 [/card] [card] +name=Wetland Sambar +text= +mana={1}{U} +type=Creature +subtype=Elk +power=2 +toughness=1 +[/card] +[card] name=Whalebone Glider auto={2}{T}:flying target(creature[power<=3]) text={2}, {T}: Target creature with power 3 or less gains flying until end of turn. @@ -101994,6 +112938,14 @@ mana={1}{R} type=Sorcery [/card] [card] +name=Whip of Erebos +auto=lord(creature|mybattlefield) lifelink +auto={2}{B}{B}{T}:target(creature|mygraveyard) moveTo(mybattlefield) && transforms((,unearth,haste)) ueot asSorcery +text=Creatures you control have lifelink. -- {2}{B}{B},{T}:Return target creature card from your graveyard to the battlefield. It gains haste. Exile it at the beginning of the next end step. If it would leave the battlefield, exile it instead of putting it anywhere else. Activate this ability only any time you could cast a sorcery. +mana={2}{B}{B} +type=Legendary Enchantment Artifact +[/card] +[card] name=Whip Sergeant auto={R}:haste target(creature) text={R}: Target creature gains haste until end of turn. (It can attack this turn.) @@ -102054,6 +113006,17 @@ power=3 toughness=3 [/card] [card] +name=Whirler Rogue +auto=choice token(Thopter,Artifact Creature Thopter,1/1,flying)*2 controller +auto={T(artifact[-tapped]|mybattlefield)}{T(artifact[-tapped]|mybattlefield)}:target(creature) unblockable ueot +text=When Whirler Rogue enters the battlefield, put two 1/1 colorless Thopter artifact creature tokens with flying onto the battlefield. -- Tap two untapped artifacts you control: Target creature can't be blocked this turn. +mana={2}{U}{U} +type=Creature +subtype=Human Rogue Artificer +power=2 +toughness=2 +[/card] +[card] name=Whirling Catapult auto={2}{l2e}{l2e}:damage:1 all(creature[flying]) && damage:1 all(player) text={2}, Exile the top two cards of your library: Whirling Catapult deals 1 damage to each creature with flying and each player. @@ -102063,7 +113026,7 @@ type=Artifact [card] name=Whirling Dervish abilities=protection from black -auto=@damaged(opponent) from(this):all(trigger[from]) phaseaction[endofturn once] counter(1/1,1) +auto=@damagefoeof(player) from(this):all(trigger[from]) phaseaction[endofturn once] counter(1/1,1) text=Protection from black -- At the beginning of each end step, if Whirling Dervish dealt damage to an opponent this turn, put a +1/+1 counter on it. mana={G}{G} type=Creature @@ -102112,6 +113075,36 @@ mana={2}{G}{G} type=Sorcery [/card] [card] +name=Whirlwind Adept +abilities=opponentshroud +auto=@movedTo(*[-creature]|mystack):1/1 ueot +text=Hexproof (This creature can't be the target of spells or abilities your opponents control.) -- Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) +mana={4}{U} +type=Creature +subtype=Djinn Monk +power=4 +toughness=2 +[/card] +[card] +name=Whisk Away +target=creature[attacking;blocking] +auto=moveto(ownerlibrary) +text=Put target attacking or blocking creature on top of its owner's library. +mana={2}{U} +type=Instant +[/card] +[card] +name=Whisperer of the Wilds +auto={T}:add{G} +auto=aslongas(creature[power>=4]|mybattlefield) {T}:Add{G}{G} +text={T}: Add {G} to your mana pool. Ferocious - {T}: Add {G}{G} to your mana pool. Activate this ability only if you control a creature with power 4 or greater. +mana={1}{G} +type=Creature +subtype=Human Shaman +power=0 +toughness=2 +[/card] +[card] name=Whispering Shade abilities=swampwalk auto={B}:1/1 @@ -102200,6 +113193,7 @@ type=Instant [/card] [card] name=White Ward +abilities=auraward target=creature auto=protection from white text=Enchant creature -- Enchanted creature has protection from white. This effect doesn't remove White Ward. @@ -102234,6 +113228,17 @@ mana={1}{W} type=Instant [/card] [card] +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. +mana={3}{U}{U} +type=Enchantment Creature +subtype=Nymph +power=4 +toughness=4 +[/card] +[card] name=Wicked Pact auto=target(<2>creature[-black]) destroy auto=life:-5 controller @@ -102314,7 +113319,7 @@ toughness=1 [/card] [card] name=Wild Beastmaster -auto=@combat(attacking) source(this):all(other creature|myBattlefield) dynamicability ueot +auto=@combat(attacking) source(this):lord(other creature|myBattlefield) dynamicability ueot text=Whenever Wild Beastmaster attacks, each other creature you control gets +X/+X until end of turn, where X is Wild Beastmaster's power. mana={2}{G} type=Creature @@ -102337,6 +113342,16 @@ power=1 toughness=1 [/card] [card] +name=Wild Celebrants +auto=may destroy target(artifact) +text=When Wild Celebrants enters the battlefield, you may destroy target artifact. +mana={3}{R}{R} +type=Creature +subtype=Satyr +power=5 +toughness=3 +[/card] +[card] name=Wild Colos abilities=haste text=Haste @@ -102387,7 +113402,7 @@ toughness=2 [card] name=Wild Growth target=land -auto=@tappedformana(mytgt):add{g} targetcontroller +auto=teach(land) transforms((,newability[produceextra:{G}])) text=Enchant land -- Whenever enchanted land is tapped for mana, its controller adds {G} to his or her mana pool (in addition to the mana the land produces). mana={G} type=Enchantment @@ -102411,6 +113426,16 @@ mana={2}{G} type=Instant [/card] [card] +name=Wild Instincts +target=creature|mybattlefield +auto=2/2 ueot +auto=transforms((,newability[target(creature|opponentbattlefield) dynamicability])) ueot +restriction=type(creature|opponentbattlefield)~morethan~0 +text=Target creature you control gets +2/+2 until end of turn. It fights target creature an opponent controls. (Each deals damage equal to its power to the other.) +mana={3}{G} +type=Sorcery +[/card] +[card] name=Wild Jhovall mana={3}{R} type=Creature @@ -102494,7 +113519,7 @@ toughness=4 [card] name=Wilderness Elemental abilities=trample -auto=foreach(land[-basic]|opponentBattlefield) 1/0 +anyzone=type:land[-basic]:opponentbattlefield/3 cdaactive text=Trample -- Wilderness Elemental's power is equal to the number of nonbasic lands your opponents control. mana={1}{R}{G} type=Creature @@ -102532,6 +113557,16 @@ mana={4}{R}{R} type=Sorcery [/card] [card] +name=Wildfire Cerberus +auto=this(cantargetcard(*[-monstrous]) {5}{R}{R}:becomes(monstrous) forever && counter(1/1,1) transforms((,newability[damage:2 opponent && damage:2 all(creature|opponentbattlefield)])) forever +text={5}{R}{R}: Monstrosity 1. (If this creature isn't monstrous, put a +1/+1 counter on it and it becomes monstrous.) --When Wildfire Cerberus becomes monstrous, it deals 2 damage to each opponent and each creature your opponents control. +mana={4}{R} +type=Creature +subtype=Hound +power=4 +toughness=3 +[/card] +[card] name=Wildfire Emissary abilities=protection from white auto={1}{R}:1/0 @@ -102745,6 +113780,17 @@ power=6 toughness=6 [/card] [card] +name=Windreader Sphinx +abilities=flying +auto=@each blockers:foreach(creature[attacking;flying]|battlefield) draw:1 controller +text=Flying. -- Whenever a creature with flying attacks, you may draw a card. +mana={5}{U}{U} +type=Creature +subtype=Sphinx +power=3 +toughness=7 +[/card] +[card] name=Windreaper Falcon abilities=flying,protection from blue text=Flying, protection from blue @@ -102788,6 +113834,13 @@ mana={R} type=Sorcery [/card] [card] +name=Winds of Qal Sisma +auto=if type(creature[power>=4]|mybattlefield)~morethan~0 then preventAllCombatDamage from(creature|opponentbattlefield) ueot else preventAllcombatDamage ueot +text=Prevent all combat damage that would be dealt this turn. -- Ferocious - If you control a creature with power 4 or greater, instead prevent all combat damage that would be dealt this turn by creatures your opponents control. +mana={1}{G} +type=Instant +[/card] +[card] name=Winds of Rath auto=bury all(creature[-enchanted]) text=Destroy all creatures that aren't enchanted. They can't be regenerated. @@ -102795,6 +113848,15 @@ mana={3}{W}{W} type=Sorcery [/card] [card] +name=Wind-Scarred Crag +auto=tap +auto=life:1 +auto={T}:Add{R} +auto={T}:Add{W} +text=Wind-Scarred Crag enters the battlefield tapped. -- When Wind-Scarred Crag enters the battlefield, you gain 1 life. -- {T}: Add {R} or {W} to your mana pool. +type=Land +[/card] +[card] name=Windscouter abilities=flying auto=@each combatends:moveTo(ownerhand) all(windscouter[attacking;blocking]|myBattlefield) @@ -102934,6 +113996,18 @@ power=1 toughness=1 [/card] [card] +name=Wingmate Roc +abilities=flying +auto=if raid then token(Bird,Creature Bird,3/4,white,flying) +auto=@combat(attacking) source(this):life:type:creature[attacking]:battlefield controller +text=Flying. -- Raid - When Wingmate Roc enters the battlefield, if you attacked with a creature this turn, put a 3/4 white Bird creature token with flying onto the battlefield. -- Whenever Wingmate Roc attacks, you gain 1 life for each attacking creature. +mana={3}{W}{W} +type=Creature +subtype=Bird +power=3 +toughness=4 +[/card] +[card] name=Wingrattle Scarecrow auto=aslongas(creature[blue]|myBattlefield) flying auto=aslongas(creature[black]|myBattlefield) persist @@ -102976,6 +114050,17 @@ type=Tribal Instant subtype=Shapeshifter [/card] [card] +name=Wingsteed Rider +abilities=flying +auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):counter(1/1,1) +text=Flying. -- Heroic -- Whenever you cast a spell that targets Wingsteed Rider, put a +1/+1 counter on Wingsteed Rider. +mana={1}{W}{W} +type=Creature +subtype=Human Knight +power=2 +toughness=2 +[/card] +[card] name=Winnow target=*[-land] auto=aslongas(*[share!name!]|battlefield) destroy @@ -103175,13 +114260,6 @@ power=4 toughness=4 [/card] [card] -name=Witch's Mist -auto={2}{b}{t}:destroy target(creature[damaged]) -text={2}{B}, {T}: Destroy target creature that was dealt damage this turn. -mana={2}{B} -type=Enchantment -[/card] -[card] name=Witch Hunter auto={T}:damage:1 target(player) auto={1}{W}{W}{T}:moveto(ownerHand) target(creature|opponentBattlefield) @@ -103193,6 +114271,22 @@ power=1 toughness=1 [/card] [card] +name=Witch's Familiar +text= +mana={2}{B} +type=Creature +subtype=Zombie Minotaur +power=2 +toughness=3 +[/card] +[card] +name=Witch's Mist +auto={2}{b}{t}:destroy target(creature[damaged]) +text={2}{B}, {T}: Destroy target creature that was dealt damage this turn. +mana={2}{B} +type=Enchantment +[/card] +[card] name=Witchbane Orb abilities=playershroud auto=destroy all(mycurses) @@ -103201,6 +114295,17 @@ mana={4} type=Artifact [/card] [card] +name=Witchstalker +abilities=opponentshroud +auto=@movedto(*[blue;black]|opponentstack) restriction{myturnonly}: counter(1/1,1) all(this) +text=Hexproof. -- Whenever an opponent casts a blue or black spell during your turn, put a +1/+1 counter on Witchstalker. +mana={1}{G}{G} +type=Creature +subtype=Wolf +power=3 +toughness=3 +[/card] +[card] name=Witch-Maw Nephilim auto=@movedTo(*|mystack):may counter(1/1,2) auto=lord(witch-maw nephilim[attacking;power>=10]) trample @@ -103257,7 +114362,7 @@ type=Instant [card] name=Witherscale Wurm auto=@combat(blocking,blocked) source(this) from(creature):all(trigger[from]) wither ueot -auto=@damaged(player) from(this):thisforeach(counter{-1/-1.1}) counter(-1/-1,-1) +auto=@damagefoeof(player) from(this):thisforeach(counter{-1/-1.1}) counter(-1/-1,-1) text=Whenever Witherscale Wurm blocks or becomes blocked by a creature, that creature gains wither until end of turn. (It deals damage to creatures in the form of -1/-1 counters.) -- Whenever Witherscale Wurm deals damage to an opponent, remove all -1/-1 counters from it. mana={4}{G}{G} type=Creature @@ -103266,6 +114371,17 @@ power=9 toughness=9 [/card] [card] +name=Witness of the Ages +facedown={3} +autofacedown={5}:morph +text=Morph {5} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) +mana={6} +type=Artifact Creature +subtype=Golem +power=4 +toughness=4 +[/card] +[card] name=Wit's End target=player auto=ability$!all(*|myhand) reject!$ targetedplayer @@ -103368,7 +114484,7 @@ type=Instant [/card] [card] name=Wolf Pack -auto=@combat(blocked,turnlimited) source(this):may name(assign combat damage to defending player) thisforeach(power>=1) damage:1 opponent && fog from(this) +auto=@combat(blocked,turnlimited) source(this):may name(assign combat damage to defending player) damage:power opponent && fog from(this) text=You may have Wolf Pack assign its combat damage as though it weren't blocked. mana={6}{G}{G} type=Creature @@ -103549,6 +114665,17 @@ power=6 toughness=6 [/card] [card] +name=Woodborn Behemoth +auto=aslongas(land|mybattlefield) 4/4 >7 +auto=aslongas(land|mybattlefield) trample >7 +text=As long as you control eight or more lands, Woodborn Behemoth gets +4/+4 and has trample. +mana={3}{G}{G} +type=Creature +subtype=Elemental +power=4 +toughness=4 +[/card] +[card] name=Wooden Stake auto=1/0 auto=@combat(blocking,blocked) source(mytgt) from(vampire):all(trigger[from]) bury @@ -103559,6 +114686,16 @@ type=Artifact subtype=Equipment [/card] [card] +name=Woodland Bellower +auto=may moveto(mybattlefield) notatarget(creature[green;manacost<=3;-legendary]|mylibrary) +text=When Woodland Bellower enters the battlefield, you may search your library for a nonlegendary green creature card with converted mana cost 3 or less, put it onto the battlefield, then shuffle your library. +mana={4}{G}{G} +type=Creature +subtype=Beast +power=6 +toughness=5 +[/card] +[card] name=Woodland Cemetery auto=aslongas(swamp,forest|myBattlefield) tap <1 oneshot auto={T}:Add{B} @@ -103646,6 +114783,17 @@ power=2 toughness=2 [/card] [card] +name=Woolly Loxodon +facedown={3} +autofacedown={5}{G}:morph +text=Morph {5}{G} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) +mana={5}{G}{G} +type=Creature +subtype=Elephant Warrior +power=6 +toughness=7 +[/card] +[card] name=Woolly Mammoths auto=aslongas(land[snow]|myBattlefield) trample text=Woolly Mammoths has trample as long as you control a snow land. @@ -103892,6 +115040,13 @@ mana={3} type=Artifact [/card] [card] +name=Worship +auto=this(variable{worshipped} >= 1) transforms((,newability[reduceto:1])) +text=If you control a creature, damage that would reduce your life total to less than 1 reduces it to 1 instead. +mana={3}{W} +type=Enchantment +[/card] +[card] name=Worthy Cause auto=life:storedtoughness controller buyback={W}{2} @@ -104035,7 +115190,8 @@ type=Sorcery [card] name=Wrexial, the Risen Deep abilities=islandwalk,swampwalk -auto=@combatdamaged(player) from(this):may target(*[instant;sorcery]|opponentgraveyard) castcard(normal) and!(transforms((,newability[exiledeath])) forever)! +auto=@combatdamagefoeof(player) from(this):may target(*[instant;sorcery]|opponentgraveyard) castcard(restricted) and!(transforms((,newability[exiledeath])) forever)! +auto=@combatdamageof(player) from(this):may target(*[instant;sorcery]|mygraveyard) castcard(restricted) and!(transforms((,newability[exiledeath])) forever)! text=Islandwalk, swampwalk -- Whenever Wrexial, the Risen Deep deals combat damage to a player, you may cast target instant or sorcery card from that player's graveyard without paying its mana cost. If that card would be put into a graveyard this turn, exile it instead. mana={3}{U}{U}{B} type=Legendary Creature @@ -104258,6 +115414,37 @@ power=3 toughness=6 [/card] [card] +name=Xathrid Necromancer +autograveyard=@movedTo(this|graveyard) from(mybattlefield):token(-370619) controller +auto=@movedTo(other human|graveyard) from(mybattlefield):token(-370619) 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 +subtype=Human Wizard +power=2 +toughness=2 +[/card] +[card] +name=Xathrid Necromancer Zombie +type=Creature +subtype=Zombie +auto=tap +power=2 +toughness=2 +color=black +[/card] +[card] +name=Xathrid Slyblade +abilities=opponentshroud +auto={3}{B}:-name(lose Hexproof for First Strike/Deathtouch) transforms((,newability[-opponentshroud],newability[first strike],newability[deathtouch])) ueot +text=Hexproof. -- {3}{B}: Until end of turn, Xathrid Slyblade loses hexproof and gains first strike and deathtouch. +mana={2}{B} +type=Creature +subtype=Human Assassin +power=2 +toughness=1 +[/card] +[card] name=Xenagos, God of Revels abilities=indestructible auto=@each my combatbegins:name(haste and +x/+x) target(other creature|mybattlefield) transforms((,newability[haste],newability[power/power])) ueot @@ -104429,8 +115616,7 @@ type=Legendary Land [/card] [card] name=Yavimaya Kavu -auto=foreach(creature[red]|battlefield) 1/0 -auto=foreach(creature[green]|battlefield) 0/1 +anyzone=type:creature[red]:battlefield/type:creature[green]:battlefield cdaactive text=Yavimaya Kavu's power is equal to the number of red creatures on the battlefield. -- Yavimaya Kavu's toughness is equal to the number of green creatures on the battlefield. mana={2}{R}{G} type=Creature @@ -104481,6 +115667,15 @@ power=6 toughness=6 [/card] [card] +name=Yawgmoth's Agenda +abilities=mygraveexiler +auto=lord(*|mygraveyard) canPlayFromGraveyard +auto=maxCast(*)1 +text=You can't cast more than one spell each turn. -- You may play cards from your graveyard. -- If a card would be put into your graveyard from anywhere, exile it instead. +mana={3}{B}{B} +type=Enchantment +[/card] +[card] name=Yawgmoth's Bargain auto=phasealter(remove,draw,controller) auto={L}:draw:1 controller @@ -104583,6 +115778,15 @@ type=Enchantment subtype=Aura [/card] [card] +name=Yoked Ox +text= +mana={W} +type=Creature +subtype=Ox +power=0 +toughness=4 +[/card] +[card] name=Yoked Plowbeast autohand=__CYCLING__({2}) text=Cycling {2} ({2}, Discard this card: Draw a card.) @@ -104623,6 +115827,17 @@ power=2 toughness=2 [/card] [card] +name=Young Pyromancer +auto=@movedTo(instant|mystack):token(Elemental,Creature Elemental, 1/1,red) controller +auto=@movedTo(sorcery|mystack):token(Elemental,Creature Elemental, 1/1,red) controller +text=Whenever you cast an instant or sorcery spell, put a 1/1 red Elemental creature token onto the battlefield. +mana={1}{R} +type=Creature +subtype=Human Shaman +power=2 +toughness=1 +[/card] +[card] name=Young Wei Recruits abilities=cantblock text=Young Wei Recruits can't block. @@ -104653,6 +115868,16 @@ power=2 toughness=1 [/card] [card] +name=Youthful Scholar +auto=@movedto(this|graveyard) from(mybattlefield):draw:2 controller +text=When Youthful Scholar dies, draw two cards. +mana={3}{U} +type=Creature +subtype=Human Wizard +power=2 +toughness=2 +[/card] +[card] name=Yuan Shao, the Indecisive abilities=horsemanship auto=lord(creature|myBattlefield) oneblocker @@ -104812,6 +116037,23 @@ power=3 toughness=3 [/card] [card] +name=Zendikar Incarnate +anyzone=type:land:mybattlefield/4 cdaactive +text=Zendikar Incarnate's power is equal to the number of lands you control. +mana={2}{R}{G} +type=Creature +subtype=Elemental +power=* +toughness=4 +[/card] +[card] +name=Zendikar's Roil +auto=@movedto(land|mybattlefield):token(Elemental,Creature Elemental,2/2,green) controller +text=Whenever a land enters the battlefield under your control, put a 2/2 green Elemental creature token onto the battlefield. +mana={3}{G}{G} +type=Enchantment +[/card] +[card] name=Zephid abilities=flying,shroud text=Flying; shroud (This permanent can't be the target of spells or abilities.) @@ -104833,6 +116075,13 @@ type=Enchantment subtype=Aura [/card] [card] +name=Zephyr Charge +auto={1}{U}:flying target(creature) ueot +text=Enchantment. -- {1}{U}: Target creature gains flying until end of turn. +mana={1}{U} +type=Enchantment +[/card] +[card] name=Zephyr Falcon abilities=flying,vigilance text=Flying, vigilance @@ -104853,6 +116102,17 @@ type=Enchantment subtype=Aura [/card] [card] +name=Zephyr Scribe +auto={U}{T}:draw:1 && transforms((,newability[target(*|myhand) reject])) forever +auto=@movedto(*[-creature]|mystack):untap all(this) +text={U}, {T}: Draw a card, then discard a card. -- Whenever you cast a noncreature spell, untap Zephyr Scribe. +mana={2}{U} +type=Creature +subtype=Human Monk +power=2 +toughness=1 +[/card] +[card] name=Zephyr Spirit auto=@combat(blocking) source(this):moveTo(ownerhand) text=When Zephyr Spirit blocks, return it to its owner's hand. @@ -104917,7 +116177,7 @@ toughness=2 [/card] [card] name=Zhang Liao, Hero of Hefei -auto=@damaged(opponent) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent +auto=@damagefoeof(player) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent text=Whenever Zhang Liao, Hero of Hefei deals damage to an opponent, that opponent discards a card. mana={4}{B}{B} type=Legendary Creature @@ -104958,6 +116218,17 @@ power=1 toughness=1 [/card] [card] +name=Zhur-Taa Druid +auto={T}:Add{G} +auto=@tappedformana(this):damage:1 opponent +auto={T}: Add {G} to your mana pool. Whenever you tap Zhur-Taa Druid for mana, it deals 1 damage to each opponent. +mana={R}{G} +type=Creature +subtype=Human Druid +power=1 +toughness=1 +[/card] +[card] name=Zhur-Taa Swine autohand={1}{R}{G}{discard}:name(bloodrush) target(creature[attacking]) 5/4 ueot text=Bloodrush — {1}{R}{G}, Discard Zhur-Taa Swine: Target attacking creature gets +5/+4 until end of turn. @@ -105156,7 +116427,8 @@ toughness=3 [/card] [card] name=Zombie Cannibal -auto=@combatdamaged(player) from(this):may moveto(exile) target(*|opponentgraveyard) +auto=@combatdamagefoeof(player) from(this):may moveto(exile) target(*|opponentgraveyard) +auto=@combatdamageof(player) from(this):may moveto(exile) target(*|mygraveyard) text=Whenever Zombie Cannibal deals combat damage to a player, you may exile target card from that player's graveyard. mana={B} type=Creature @@ -105315,6 +116587,30 @@ subtype=Human Wizard power=1 toughness=1 [/card] +[card] +name=Zurgo Bellstriker +auto=cantbeblockerof(creature[power>=2]) +other={1}{R} name(Dash) +auto=if paid(alternative) then transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveto(ownerhand) all(this)])) forever +text=Zurgo Bellstriker can't block creatures with power 2 or greater. -- Dash {1}{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={R} +type=Legendary Creature +subtype=Orc Warrior +power=2 +toughness=2 +[/card] +[card] +name=Zurgo Helmsmasher +abilities=haste,mustattack +auto=this(variable{controllerturn}>0) indestructible +auto=@vampired(creature) from(this):counter(1/1,1) all(this) +text=Haste. -- Zurgo Helmsmasher attacks each combat if able. -- Zurgo Helmsmasher has indestructible as long as it is your turn. -- Whenever a creature dealt damage by Zurgo Helmsmasher dies, put a +1/+1 counter on Zurgo Helmsmasher. +mana={2}{R}{W}{B} +type=Legendary Creature +subtype=Orc Warrior +power=7 +toughness=2 +[/card] ##due to card type association dryad arbor is placed at the end. any other card that associates 2 super types in this manner should also ##be in the end of the primitive to avoid abilities like changling thinking that "forest" is a creature type. [card] name=Dryad Arbor diff --git a/projects/mtg/bin/Res/sets/primitives/unsupported.txt b/projects/mtg/bin/Res/sets/primitives/unsupported.txt index 3c72654be..565840ba0 100644 --- a/projects/mtg/bin/Res/sets/primitives/unsupported.txt +++ b/projects/mtg/bin/Res/sets/primitives/unsupported.txt @@ -187,6 +187,13 @@ power=1 toughness=1 [/card] [card] +name=Aladdin's Lamp +alias=1092 +text={X}, {T}: The next time you would draw a card this turn, instead look at the top X cards of your library, put all but one of them on the bottom of your library in a random order, then draw a card. X can't be 0. +mana={10} +type=Artifact +[/card] +[card] name=Alive // Well text=Put a 3/3 green Centaur creature token onto the battlefield. -- // -- You gain 2 life for each creature you control. -- -- Fuse (You may cast one or both halves of this card from your hand.) mana={3}{G} // {W} @@ -217,12 +224,6 @@ mana={1}{U} type=Instant [/card] [card] -name=Aluren -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 -[/card] -[card] name=Amber Prison text=You may choose not to untap Amber Prison during your untap step. -- {4}, {T}: Tap target artifact, creature, or land. That permanent doesn't untap during its controller's untap step for as long as Amber Prison remains tapped. mana={4} @@ -470,15 +471,6 @@ type=Enchantment subtype=Aura [/card] [card] -name=Arrogant Wurm -text=Trample -- Madness {2}{G} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) -mana={3}{G}{G} -type=Creature -subtype=Wurm -power=4 -toughness=4 -[/card] -[card] name=Arrow Volley Trap text=If four or more creatures are attacking, you may pay {1}{W} rather than pay Arrow Volley Trap's mana cost. -- Arrow Volley Trap deals 5 damage divided as you choose among any number of target attacking creatures. mana={3}{W}{W} @@ -993,15 +985,6 @@ toughness=4 text=Flying -- Players can't cast spells during combat. {R}: Target creature attacks this turn if able. [/card] [card] -name=Basking Rootwalla -text={1}{G}: Basking Rootwalla gets +2/+2 until end of turn. Activate this ability only once each turn. -- Madness {0} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) -mana={G} -type=Creature -subtype=Lizard -power=1 -toughness=1 -[/card] -[card] name=Baton of Morale text={2}: Target creature gains banding until end of turn. (Any creatures with banding, and up to one without, can attack in a band. Bands are blocked as a group. If any creatures with banding a player controls are blocking or being blocked by a creature, that player divides that creature's combat damage, not its controller, among any of the creatures it's being blocked by or is blocking.) mana={2} @@ -1162,15 +1145,6 @@ mana={5}{B} type=Instant [/card] [card] -name=Big Game Hunter -text=When Big Game Hunter enters the battlefield, destroy target creature with power 4 or greater. It can't be regenerated. -- Madness {B} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) -mana={1}{B}{B} -type=Creature -subtype=Human Rebel Assassin -power=1 -toughness=1 -[/card] -[card] name=Bind text=Counter target activated ability. (Mana abilities can't be targeted.) -- Draw a card. mana={1}{G} @@ -1243,6 +1217,7 @@ text=Blazing Salvo deals 3 damage to target creature unless that creature's cont mana={R} type=Instant [/card] +#blazing torch is source of damage but the equipped creature has the activated ability... weird [card] name=Blazing Torch text=Equipped creature can't be blocked by Vampires or Zombies. -- Equipped creature has "{T}, Sacrifice Blazing Torch: Blazing Torch deals 2 damage to target creature or player." -- Equip {1} @@ -1329,12 +1304,6 @@ type=Enchantment text=Each noncreature, non-Equipment artifact is an Equipment with equip {X} and "Equipped creature gets +X/+0," where X is that artifact's converted mana cost. [/card] [card] -name=Blustersquall -text=Tap target creature you don't control. -- Overload {3}{U} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") -mana={U} -type=Instant -[/card] -[card] name=Boar Umbra mana={2}{G} type=Enchantment @@ -1875,12 +1844,6 @@ mana={1}{W} type=Enchantment [/card] [card] -name=Call to the Netherworld -text=Return target black creature card from your graveyard to your hand. -- Madness {0} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) -mana={B} -type=Sorcery -[/card] -[card] name=Callous Deceiver text={1}: Look at the top card of your library. -- {2}: Reveal the top card of your library. If it's a land card, Callous Deceiver gets +1/+0 and gains flying until end of turn. Activate this ability only once each turn. mana={2}{U} @@ -2411,12 +2374,6 @@ type=Enchantment text=Whenever any spell is played, counter that spell if each player, other than the caster and his or her teammates, agrees to choose and discard a card. Those players must discard those cards after agreeing. Checks and Balances may be played only in a game with three or more players. [/card] [card] -name=Chemister's Trick -text=Target creature you don't control gets -2/-0 until end of turn and attacks this turn if able. -- Overload {3}{U}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") -mana={U}{R} -type=Instant -[/card] -[card] name=Chicken Egg mana={1}{R} type=Summon — Egg @@ -3026,12 +2983,6 @@ mana={U}{U} type=Enchantment [/card] [card] -name=Counterflux -text=Counterflux can't be countered by spells or abilities. -- Counter target spell you don't control. -- Overload {1}{U}{U}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") -mana={U}{U}{R} -type=Instant -[/card] -[card] name=Countryside Crusher text=At the beginning of your upkeep, reveal the top card of your library. If it's a land card, put it into your graveyard and repeat this process. -- Whenever a land card is put into your graveyard from anywhere, put a +1/+1 counter on Countryside Crusher. mana={1}{R}{R} @@ -3331,12 +3282,6 @@ mana={2}{G}{G} type=Enchantment [/card] [card] -name=Cyclonic Rift -text=Return target nonland permanent you don't control to its owner's hand. -- Overload {6}{U} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") -mana={1}{U} -type=Instant -[/card] -[card] name=Cyclopean Giant text=When Cyclopean Giant is put into a graveyard from the battlefield, target land becomes a Swamp. Exile Cyclopean Giant. mana={2}{B}{B} @@ -3422,12 +3367,6 @@ mana={2}{B} type=Enchantment [/card] [card] -name=Dark Withering -text=Destroy target nonblack creature. -- Madness {B} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) -mana={4}{B}{B} -type=Instant -[/card] -[card] name=Darkpact text=Remove Darkpact from your deck before playing if you're not playing for ante. -- You own target card in the ante. Exchange that card with the top card of your library. mana={B}{B}{B} @@ -3944,12 +3883,6 @@ mana={2}{U}{U} type=Sorcery [/card] [card] -name=Distortion Strike -mana={U} -type=Sorcery -text=Target creature gets +1/+0 until end of turn and is unblockable this turn. 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=Divert text=Change the target of target spell with a single target unless that spell's controller pays {2}. mana={U} @@ -3992,6 +3925,7 @@ subtype=Djinn power=3 toughness=5 [/card] +#needs alias borderline [card] name=Djinn of Wishes text=Flying -- Djinn of Wishes enters the battlefield with three wish counters on it. -- {2}{U}{U}, Remove a wish counter from Djinn of Wishes: Reveal the top card of your library. You may play that card without paying its mana cost. If you don't, exile it. @@ -4113,12 +4047,6 @@ mana={3}{B} // {2}{G} type=Sorcery // Sorcery [/card] [card] -name=Downsize -text=Target creature you don't control gets -4/-0 until end of turn. -- Overload {2}{U} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") -mana={U} -type=Instant -[/card] -[card] name=Draco text=Domain - Draco costs {2} less to cast for each basic land type among lands you control. -- Flying -- Domain - At the beginning of your upkeep, sacrifice Draco unless you pay {1}0}. This cost is reduced by {2} for each basic land type among lands you control. mana={16} @@ -4149,15 +4077,6 @@ mana={U}{U} type=Sorcery [/card] [card] -name=Draining Whelk -text=Flash (You may cast this spell any time you could cast an instant.) -- Flying -- When Draining Whelk enters the battlefield, counter target spell. Put X +1/+1 counters on Draining Whelk, where X is that spell's converted mana cost. -mana={4}{U}{U} -type=Creature -subtype=Illusion -power=1 -toughness=1 -[/card] -[card] name=Drake Umbra mana={4}{U} type=Enchantment @@ -4329,12 +4248,6 @@ power=1 toughness=1 [/card] [card] -name=Dynacharge -text=Target creature you control gets +2/+0 until end of turn. -- Overload {2}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") -mana={R} -type=Instant -[/card] -[card] name=Echo Chamber text={4}, {T}: An opponent chooses target creature he or she controls. Put a token that's a copy of that creature onto the battlefield. That token gains haste until end of turn. Exile the token at the beginning of the next end step. Activate this ability only any time you could cast a sorcery. mana={4} @@ -4385,12 +4298,6 @@ type=Land text={T}: Add {1} to your mana pool. {T}: Add {2} to your mana pool. Spend this mana only to cast colorless Eldrazi spells or activate abilities of colorless Eldrazi. [/card] [card] -name=Electrickery -text=Electrickery deals 1 damage to target creature you don't control. -- Overload {1}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") -mana={R} -type=Instant -[/card] -[card] name=Electropotence text=Whenever a creature enters the battlefield under your control, you may pay {2}{R}. If you do, that creature deals damage equal to its power to target creature or player. mana={2}{R} @@ -4485,12 +4392,6 @@ toughness=1 text=Whenever another creature comes into play, you may stand up and say in a deep, booming voice "Presenting . . . " and that creature's name. If you do, put a +1/+1 counter on that creature. [/card] [card] -name=Emerge Unscathed -mana={W} -type=Instant -text=Target creature you control gains protection from the color of your choice until end of turn. 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=Empyrial Archangel text=Flying, shroud -- All damage that would be dealt to you is dealt to Empyrial Archangel instead. mana={4}{G}{W}{W}{U} @@ -4518,24 +4419,12 @@ mana={3}{W} type=Enchantment [/card] [card] -name=Endless Swarm -text=Put a 1/1 green Snake creature token onto the battlefield for each card in your hand. -- Epic (For the rest of the game, you can't cast spells. At the beginning of each of your upkeeps, copy this spell except for its epic ability.) -mana={5}{G}{G}{G} -type=Sorcery -[/card] -[card] name=Endoskeleton text=You may choose not to untap Endoskeleton during your untap step. -- {2}, {T}: Target creature gets +0/+3 for as long as Endoskeleton remains tapped. mana={2} type=Artifact [/card] [card] -name=Enduring Ideal -text=Search your library for an enchantment card and put it onto the battlefield. Then shuffle your library. -- Epic (For the rest of the game, you can't cast spells. At the beginning of each of your upkeeps, copy this spell except for its epic ability.) -mana={5}{W}{W} -type=Sorcery -[/card] -[card] name=Enduring Renewal text=Play with your hand revealed. -- If you would draw a card, reveal the top card of your library instead. If it's a creature card, put it into your graveyard. Otherwise, draw a card. -- Whenever a creature is put into your graveyard from the battlefield, return it to your hand. mana={2}{W}{W} @@ -4716,12 +4605,6 @@ type=Enchantment subtype=Aura [/card] [card] -name=Eternal Dominion -text=Search target opponent's library for an artifact, creature, enchantment, or land card. Put that card onto the battlefield under your control. Then that player shuffles his or her library. -- Epic (For the rest of the game, you can't cast spells. At the beginning of each of your upkeeps, copy this spell except for its epic ability. You may choose a new target for the copy.) -mana={7}{U}{U}{U} -type=Sorcery -[/card] -[card] name=Etherium-Horn Sorcerer text={1}{U}{R}: Return Etherium-Horn Sorcerer to its owner's hand. -- Cascade (When you cast this spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.) mana={4}{U}{R} @@ -4839,11 +4722,6 @@ power=1 toughness=2 [/card] [card] -name=Exotic Orchard -text={T}: Add to your mana pool one mana of any color that a land an opponent controls could produce. -type=Land -[/card] -[card] name=Experiment Kraj text=Experiment Kraj has all activated abilities of each other creature with a +1/+1 counter on it. -- {T}: Put a +1/+1 counter on target creature. mana={2}{G}{G}{U}{U} @@ -5062,12 +4940,6 @@ type=Enchantment subtype=Aura [/card] [card] -name=Fellwar Stone -text={T}: Add to your mana pool one mana of any color that a land an opponent controls could produce. -mana={2} -type=Artifact -[/card] -[card] name=Feral Contest text=Put a +1/+1 counter on target creature you control. Another target creature blocks it this turn if able. mana={3}{G} @@ -5143,12 +5015,6 @@ mana={R}{G}{W} type=Sorcery [/card] [card] -name=Fiery Temper -text=Fiery Temper deals 3 damage to target creature or player. -- Madness {R} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) -mana={1}{R}{R} -type=Instant -[/card] -[card] name=Fight or Flight text=At the beginning of each opponent's combat phase, separate all creatures that player controls into two piles. Only creatures in the pile of his or her choice can attack this turn. mana={3}{W} @@ -5437,12 +5303,6 @@ mana={2}{G} type=Enchantment [/card] [card] -name=Forbidden Crypt -text=If you would draw a card, return a card from your graveyard to your hand instead. If you can't, you lose the game. -- If a card would be put into your graveyard from anywhere, exile that card instead. -mana={3}{B}{B} -type=Enchantment -[/card] -[card] name=Forbidden Ritual text=Sacrifice a nontoken permanent. If you do, target opponent loses 2 life unless he or she sacrifices a permanent or discards a card. You may repeat this process any number of times. mana={2}{B}{B} @@ -5588,12 +5448,6 @@ toughness=3 text=At the beginning of your upkeep, you may ask target player a yes-or-no question. If you do, that player answers the question truthfully and abides by that answer if able until end of turn. [/card] [card] -name=Frantic Purification -text=Destroy target enchantment. -- Madness {W} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) -mana={2}{W} -type=Instant -[/card] -[card] name=Frazzled Editor mana={1}{R} type=Creature — Human Bureaucrat @@ -5961,8 +5815,14 @@ subtype=Turtle power=2 toughness=4 [/card] +#bug phasealter not turning off [card] name=Gibbering Descent +abilities=madness +autoexile=restriction{discarded} pay({2}{B}{B}) name(pay 2BB to cast) activate name(pay 2BB to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard) +auto=@each my upkeep:life:-1 controller && reject target(*|myhand) +auto=@each opponentupkeep:life:-1 opponent && ability$!name(discard) target(*|myhand) reject!$ opponent +auto=this(variable{phandcount} <1) phasealter(remove,upkeep,controller) text=At the beginning of each player's upkeep, that player loses 1 life and discards a card. -- Hellbent - Skip your upkeep step if you have no cards in hand. -- Madness {2}{B}{B} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) mana={4}{B}{B} type=Enchantment @@ -6203,15 +6063,6 @@ mana={G} type=Instant [/card] [card] -name=Gnat Miser -text=Each opponent's maximum hand size is reduced by one. -mana={B} -type=Creature -subtype=Rat Shaman -power=1 -toughness=1 -[/card] -[card] name=Goblin Artisans text={T}: Flip a coin. If you win the flip, draw a card. If you lose the flip, counter target artifact spell you control that isn't the target of an ability from another creature named Goblin Artisans. mana={R} @@ -6462,15 +6313,6 @@ power=0 toughness=3 [/card] [card] -name=Gorgon Recluse -text=Whenever Gorgon Recluse blocks or becomes blocked by a nonblack creature, destroy that creature at end of combat. -- Madness {B}{B} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) -mana={3}{B}{B} -type=Creature -subtype=Gorgon -power=2 -toughness=4 -[/card] -[card] name=Gorilla Berserkers text=Trample; rampage 2 (Whenever this creature becomes blocked, it gets +2/+2 until end of turn for each creature blocking it beyond the first.) -- Gorilla Berserkers can't be blocked except by three or more creatures. mana={3}{G}{G} @@ -6607,15 +6449,6 @@ type=Enchantment subtype=Aura [/card] [card] -name=Gravebane Zombie -text=If Gravebane Zombie would be put into a graveyard from the battlefield, put Gravebane Zombie on top of its owner's library instead. -mana={3}{B} -type=Creature -subtype=Zombie -power=3 -toughness=2 -[/card] -[card] name=Graven Dominator text=Flying -- Haunt (When this card is put into a graveyard from the battlefield, exile it haunting target creature.) -- When Graven Dominator enters the battlefield or the creature it haunts is put into a graveyard, each other creature becomes 1/1 until end of turn. mana={4}{W}{W} @@ -6976,15 +6809,6 @@ power=1 toughness=1 [/card] [card] -name=Harvester Druid -text={T}: Add to your mana pool one mana of any color that a land you control could produce. -mana={1}{G} -type=Creature -subtype=Human Druid -power=1 -toughness=1 -[/card] -[card] name=Hatred text=As an additional cost to cast Hatred, pay X life. -- Target creature gets +X/+0 until end of turn. mana={3}{B}{B} @@ -7483,12 +7307,6 @@ power=1 toughness=1 [/card] [card] -name=Ichor Slick -text=Target creature gets -3/-3 until end of turn. -- Cycling {2} ({2}, Discard this card: Draw a card.) -- Madness {3}{B} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) -mana={2}{B} -type=Sorcery -[/card] -[card] name=Icy Prison text=When Icy Prison enters the battlefield, exile target creature. -- At the beginning of your upkeep, sacrifice Icy Prison unless any player pays {3}. -- When Icy Prison leaves the battlefield, return the exiled creature to the battlefield under its owner's control. mana={U}{U} @@ -7676,12 +7494,6 @@ type=Instant text=As an additional cost to cast Induce Despair, reveal a creature card from your hand. Target creature gets -X/-X until end of turn, where X is the revealed card's converted mana cost. [/card] [card] -name=Induce Paranoia -text=Counter target spell. If {B} was spent to cast Induce Paranoia, that spell's controller puts the top X cards of his or her library into his or her graveyard, where X is the spell's converted mana cost. -mana={2}{U}{U} -type=Instant -[/card] -[card] name=Inescapable Brute text=Wither (This deals damage to creatures in the form of -1/-1 counters.) -- Inescapable Brute must be blocked if able. mana={5}{R} @@ -8864,6 +8676,7 @@ text=Look at the top five cards of your library. You may reveal any number of cr mana={2}{G} type=Sorcery [/card] +#needs alias borderline [card] name=Leaf-Crowned Elder text=Kinship - At the beginning of your upkeep, you may look at the top card of your library. If it shares a creature type with Leaf-Crowned Elder, you may reveal it. If you do, you may play that card without paying its mana cost. @@ -9950,15 +9763,6 @@ type=Artifact text=Imprint — Whenever a nontoken creature dies, you may exile that card. If you do, return each other card exiled with Mimic Vat to its owner's graveyard. {3}, {T}: Put a token onto the battlefield that's a copy of the exiled card. It gains haste. Exile it at the beginning of the next end step. [/card] [card] -name=Minamo Scrollkeeper -text=Defender (This creature can't attack.) -- Your maximum hand size is increased by one. -mana={1}{U} -type=Creature -subtype=Human Wizard -power=2 -toughness=3 -[/card] -[card] name=Minamo's Meddling text=Counter target spell. That spell's controller reveals his or her hand, then discards each card with the same name as a card spliced onto that spell. mana={2}{U}{U} @@ -9994,6 +9798,7 @@ text=Each opponent reveals cards from the top of his or her library until he or mana={X}{U}{B} type=Sorcery [/card] +#needs alias [card] name=Mind's Desire text=Shuffle your library. Then exile the top card of your library. Until end of turn, you may play that card without paying its mana cost. (If it has X in its mana cost, X is 0.) -- Storm (When you cast this spell, copy it for each spell cast before it this turn.) @@ -10228,18 +10033,6 @@ mana={1}{U}{U} type=Sorcery [/card] [card] -name=Mizzium Mortars -text=Mizzium Mortars deals 4 damage to target creature you don't control. -- Overload {3}{R}{R}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") -mana={1}{R} -type=Sorcery -[/card] -[card] -name=Mizzium Skin -text=Target creature you control gets +0/+1 and gains hexproof until end of turn. -- Overload {1}{U} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") -mana={U} -type=Instant -[/card] -[card] name=Mizzium Transreliquat text={3}: Mizzium Transreliquat becomes a copy of target artifact until end of turn. -- {1}{U}{R}: Mizzium Transreliquat becomes a copy of target artifact and gains this ability. mana={3} @@ -10828,12 +10621,6 @@ power=2 toughness=2 [/card] [card] -name=Neverending Torment -text=Search target player's library for X cards, where X is the number of cards in your hand, and exile them. Then that player shuffles his or her library. -- Epic (For the rest of the game, you can't cast spells. At the beginning of each of your upkeeps, copy this spell except for its epic ability. You may choose a new target for the copy.) -mana={4}{B}{B} -type=Sorcery -[/card] -[card] name=New Benalia text=New Benalia enters the battlefield tapped. -- When New Benalia enters the battlefield, scry 1. (To scry 1, look at the top card of your library, then you may put that card on the bottom of your library.) -- {T}: Add {W} to your mana pool. type=Land @@ -10972,14 +10759,6 @@ power=1 toughness=1 [/card] [card] -name=Nomads' Assembly -auto=token(Kor Soldier,Creature Kor Soldier,1/1,white)*type:creature:mybattlefield -auto=@movedto(this|stack) from(myhand) restriction{casted(this)}:moveto(exile) and!( transforms((,newability[@each my upkeep once:may activate castcard(restricted)])) )! forever -mana={4}{W}{W} -type=Sorcery -text=Put a 1/1 white Kor Soldier creature token onto the battlefield for each creature you control. 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=Norn's Annex #cant choose mana or life mana={3}{p(W)}{p(W)} @@ -11122,12 +10901,6 @@ type=Legendary Artifact subtype=Equipment [/card] [card] -name=Obsessive Search -text=Draw a card. -- Madness {U} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) -mana={U} -type=Instant -[/card] -[card] name=Obstinate Baloth auto=life:4 text=When Obstinate Baloth enters the battlefield, you gain 4 life. -- If a spell or ability an opponent controls causes you to discard Hardheaded Baloth, put it onto the battlefield instead of putting it into your graveyard. @@ -11226,6 +10999,7 @@ text=Look at the top three cards of your library, then put them back in any orde mana={1}{U} type=Sorcery [/card] +#needs alias [card] name=Omen Machine mana={6} @@ -11691,51 +11465,6 @@ mana={3}{B}{B} type=Sorcery [/card] [card] -name=Patron of the Akki -text=Goblin offering (You may cast this card any time you could cast an instant by sacrificing a Goblin and paying the difference in mana costs between this and the sacrificed Goblin. Mana cost includes color.) -- Whenever Patron of the Akki attacks, creatures you control get +2/+0 until end of turn. -mana={4}{R}{R} -type=Legendary Creature -subtype=Spirit -power=5 -toughness=5 -[/card] -[card] -name=Patron of the Kitsune -text=Fox offering (You may cast this card any time you could cast an instant by sacrificing a Fox and paying the difference in mana costs between this and the sacrificed Fox. Mana cost includes color.) -- Whenever a creature attacks, you may gain 1 life. -mana={4}{W}{W} -type=Legendary Creature -subtype=Spirit -power=5 -toughness=6 -[/card] -[card] -name=Patron of the Moon -text=Moonfolk offering (You may cast this card any time you could cast an instant by sacrificing a Moonfolk and paying the difference in mana costs between this and the sacrificed Moonfolk. Mana cost includes color.) -- Flying -- {1}: Put up to two land cards from your hand onto the battlefield tapped. -mana={5}{U}{U} -type=Legendary Creature -subtype=Spirit -power=5 -toughness=4 -[/card] -[card] -name=Patron of the Nezumi -text=Rat offering (You may cast this card any time you could cast an instant by sacrificing a Rat and paying the difference in mana costs between this and the sacrificed Rat. Mana cost includes color.) -- Whenever a permanent is put into an opponent's graveyard, that player loses 1 life. -mana={5}{B}{B} -type=Legendary Creature -subtype=Spirit -power=6 -toughness=6 -[/card] -[card] -name=Patron of the Orochi -text=Snake offering (You may cast this card any time you could cast an instant by sacrificing a Snake and paying the difference in mana costs between this and the sacrificed Snake. Mana cost includes color.) -- {T}: Untap all Forests and all green creatures. Activate this ability only once each turn. -mana={6}{G}{G} -type=Legendary Creature -subtype=Spirit -power=7 -toughness=7 -[/card] -[card] name=Pay No Heed text=Prevent all damage a source of your choice would deal this turn. mana={W} @@ -12299,12 +12028,6 @@ mana={U} type=Sorcery [/card] [card] -name=Prey's Vengeance -mana={G} -type=Instant -text=Target creature gets +2/+2 until end of turn. 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=Primal Beyond text=As Primal Beyond enters the battlefield, you may reveal an Elemental card from your hand. If you don't, Primal Beyond enters the battlefield tapped. -- {T}: Add {1} to your mana pool. -- {T}: Add one mana of any color to your mana pool. Spend this mana only to cast Elemental spells or activate abilities of Elementals. type=Land @@ -12524,12 +12247,6 @@ mana={1}{B}{B} type=Sorcery [/card] [card] -name=Psychotic Haze -text=Psychotic Haze deals 1 damage to each creature and each player. -- Madness {1}{B} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) -mana={2}{B}{B} -type=Instant -[/card] -[card] name=Puca's Mischief text=At the beginning of your upkeep, you may exchange control of target nonland permanent you control and target nonland permanent an opponent controls with an equal or lesser converted mana cost. mana={3}{U} @@ -12573,18 +12290,6 @@ type=Enchantment subtype=Aura [/card] [card] -#to be tested.... -name=Puresteel Paladin -auto=@movedTo(equipment|mybattlefield):may draw:1 controller -auto=lord(equipment|mybattlefield) transforms((,newability[{0}:name(equip 0) retarget target(creature|mybattlefield) assorcery restriction{type(artifact|mybattlefield)~morethan~2}])) -text=Whenever an Equipment enters the battlefield under your control, you may draw a card. -- Metalcraft - As long as you control 3 or more artifacts, each Equipment you control has equip {0}. -mana={W}{W} -type=Creature -subtype=Human Knight -power=2 -toughness=2 -[/card] -[card] name=Pure // Simple (Pure) text=Destroy target multicolored permanent. mana={1}{R}{G} @@ -12718,6 +12423,7 @@ text=Pyrotechnics deals 4 damage divided as you choose among any number of targe mana={4}{R} type=Sorcery [/card] +#anyzone is basic for now and used for cdaactive [card] name=Qasali Ambusher text=Reach -- If a creature is attacking you and you control a Forest and a Plains, you may cast Qasali Ambusher without paying its mana cost and as though it had flash. @@ -12835,15 +12541,6 @@ mana={1}{U} type=Sorcery [/card] [card] -name=Quirion Explorer -text={T}: Add to your mana pool one mana of any color that a land an opponent controls could produce. -mana={1}{G} -type=Creature -subtype=Elf Druid Scout -power=1 -toughness=1 -[/card] -[card] name=R&D's Secret Lair mana= type=Legendary Land @@ -12877,13 +12574,6 @@ mana={R}{R} type=Enchantment [/card] [card] -name=Ral Zarek -text=+1: Tap target permanent, then untap another target permanent. -- -2: Ral Zarek deals 3 damage to target creature or player. -- -7: Flip five coins. Take an extra turn after this one for each coin that comes up heads. -mana={2}{U}{R} -type=Planeswalker -subtype=Ral -[/card] -[card] name=Raiding Party text=Raiding Party can't be the target of white spells or abilities from white sources. -- Sacrifice an Orc: Each player may tap any number of untapped white creatures he or she controls. For each creature tapped this way, that player chooses up to two Plains. Then destroy all Plains that weren't chosen this way by any player. mana={2}{R} @@ -13039,6 +12729,7 @@ mana={2}{U} type=Enchantment subtype=Aura [/card] +#needs suspend ability not suspend activated ability [card] name=Reality Strobe text=Return target permanent to its owner's hand. Exile Reality Strobe with three time counters on it. -- Suspend 3 - {2}{U} (Rather than cast this card from your hand, you may pay {2}{U} and exile it with three time counters on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost.) @@ -13089,15 +12780,6 @@ mana={W} type=Instant [/card] [card] -name=Reckless Wurm -text=Trample -- Madness {2}{R} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) -mana={3}{R}{R} -type=Creature -subtype=Wurm -power=4 -toughness=4 -[/card] -[card] name=Reclamation auto=lord(creature[black]) cantattack auto=lord(creature[black]) {S(land|myinplay)}:-cantattack @@ -13121,12 +12803,6 @@ mana={2}{G} type=Sorcery [/card] [card] -name=Recurring Insight -mana={4}{U}{U} -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=Recycle text=Skip your draw step. -- Whenever you play a card, draw a card. -- Your maximum hand size is two. mana={4}{G}{G} @@ -13165,11 +12841,6 @@ mana={4} type=Artifact [/card] [card] -name=Reflecting Pool -text={T}: Add to your mana pool one mana of any type that a land you control could produce. -type=Land -[/card] -[card] name=Refraction Trap text=If an opponent cast a red instant or sorcery spell this turn, you may pay {W} rather than pay Refraction Trap's mana cost. -- Prevent the next 3 damage that a source of your choice would deal to you and/or permanents you control this turn. If damage is prevented this way, Refraction Trap deals that much damage to target creature or player. mana={3}{W} @@ -13293,15 +12964,6 @@ mana={1}{U} type=Sorcery [/card] [card] -name=Rest in Peace -#Note this is replacement effect, I think wagic has no override rule. -auto=moveto(exile) all(*|graveyard) -auto=@movedTo(*|graveyard):all(trigger[to]) moveTo(exile) -text=When Rest in Peace enters the battlefield, exile all cards from all graveyards. -- If a card or token would be put into a graveyard from anywhere, exile it instead. -mana={1}{W} -type=Enchantment -[/card] -[card] name=Restless Dreams text=As an additional cost to cast Restless Dreams, discard X cards. -- Return X target creature cards from your graveyard to your hand. mana={B} @@ -13741,6 +13403,7 @@ subtype=Elemental power=3 toughness=2 [/card] +#seems possible [card] name=Roiling Horror text=Roiling Horror's power and toughness are each equal to your life total minus the life total of an opponent with the most life. -- Suspend X - {X}{B}{B}{B}. X can't be 0. (Rather than cast this card from your hand, you may pay {X}{B}{B}{B} and exile it with X time counters on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost. It has haste.) -- Whenever a time counter is removed from Roiling Horror while it's exiled, target player loses 1 life and you gain 1 life. @@ -14190,6 +13853,7 @@ subtype=Giant Warrior power=4 toughness=5 [/card] +#modded ingest [card] name=Scalpelexis text=Flying (This creature can't be blocked except by creatures with flying or reach.) -- Whenever Scalpelexis deals combat damage to a player, that player exiles the top four cards of his or her library. If two or more of those cards have the same name, repeat this process. @@ -14344,6 +14008,7 @@ text=Look at the top X cards of target opponent's library. Exile one of those ca mana={X}{U}{B} type=Sorcery [/card] +#moverandom? [card] name=Search for Survivors text=Reorder your graveyard at random. An opponent chooses a card at random in your graveyard. If it's a creature card, put it onto the battlefield. Otherwise, exile it. @@ -14513,12 +14178,6 @@ mana={W} type=Enchantment [/card] [card] -name=Serum Powder -text={T}: Add {1} to your mana pool. -- Any time you could mulligan and Serum Powder is in your hand, you may exile all the cards from your hand, then draw that many cards. (You can do this in addition to taking mulligans.) -mana={3} -type=Artifact -[/card] -[card] name=Serum Visions text=Draw a card. -- Scry 2. (To 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={U} @@ -14737,6 +14396,7 @@ mana={3}{U} type=Instant subtype=Arcane [/card] +#phaseactionmulti? [card] name=Shifty Doppelganger text={3}{U}, Exile Shifty Doppelganger: You may put a creature card from your hand onto the battlefield. If you do, that creature gains haste until end of turn. At the beginning of the next end step, sacrifice that creature. If you do, return Shifty Doppelganger to the battlefield. @@ -15201,6 +14861,7 @@ type=Enchantment subtype=Aura text=Enchant creature Enchanted creature gets +1/+1 and has "Whenever this creature deals damage to an opponent, you may draw a card." Totem armor (If enchanted creature would be destroyed, instead remove all damage from it and destroy this Aura.) [/card] +#manaflashback rule [card] name=Snapcaster Mage abilities=flash @@ -15822,6 +15483,7 @@ subtype=Monger power=3 toughness=3 [/card] +#needs alias [card] name=Squandered Resources text=Sacrifice a land: Add to your mana pool one mana of any type the sacrificed land could produce. @@ -15886,12 +15548,6 @@ mana={3} type=Artifact [/card] [card] -name=Staggershock -mana={2}{R} -type=Instant -text=Staggershock deals 2 damage to target creature or player. 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=Stalking Yeti text=When Stalking Yeti enters the battlefield, if it's on the battlefield, it deals damage equal to its power to target creature an opponent controls and that creature deals damage equal to its power to Stalking Yeti. -- {2}{S}i}: Return Stalking Yeti to its owner's hand. Activate this ability only any time you could cast a sorcery. ({S}i} can be paid with one mana from a snow permanent.) mana={2}{R}{R} @@ -16169,26 +15825,6 @@ type=Enchantment subtype=Aura [/card] [card] -name=Street Spasm -text=Street Spasm deals X damage to target creature without flying you don't control. -- Overload {X}{X}{R}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") -mana={X}{R} -type=Instant -[/card] -[card] -name=Strength of Isolation -text=Enchant creature -- Enchanted creature gets +1/+2 and has protection from black. -- Madness {W} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) -mana={1}{W} -type=Enchantment -subtype=Aura -[/card] -[card] -name=Strength of Lunacy -text=Enchant creature -- Enchanted creature gets +2/+1 and has protection from white. -- Madness {B} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.) -mana={1}{B} -type=Enchantment -subtype=Aura -[/card] -[card] name=Strength of the Tajuru text=Multikicker {1} (You may pay an additional {1} any number of times as you cast this spell.) -- Choose target creature, then choose another target creature for each time Strength of the Tajuru was kicked. Put X +1/+1 counters on each of them. mana={X}{G}{G} @@ -16405,27 +16041,6 @@ power=2 toughness=1 [/card] [card] -name=Surreal Memoir -mana={3}{R} -type=Sorcery -text=Return an instant card at random from your graveyard to your 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=Survival Cache -mana={2}{W} -type=Sorcery -text=You gain 2 life. Then if you have more life than an opponent, draw a card. 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=Sustaining Spirit -text=Cumulative upkeep {1}{W} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.) -- Damage that would reduce your life total to less than 1 reduces it to 1 instead. -mana={1}{W} -type=Creature -subtype=Angel Spirit -power=0 -toughness=3 -[/card] -[card] name=Sutured Ghoul text=Trample -- As Sutured Ghoul enters the battlefield, exile any number of creature cards from your graveyard. -- Sutured Ghoul's power is equal to the total power of the exiled cards and its toughness is equal to their total toughness. mana={4}{B}{B}{B} @@ -16507,27 +16122,12 @@ power=2 toughness=2 [/card] [card] -name=Sylvok Explorer -text={T}: Add to your mana pool one mana of any color that a land an opponent controls could produce. -mana={1}{G} -type=Creature -subtype=Human Druid -power=1 -toughness=1 -[/card] -[card] name=Symbol Status mana={2}{G}{G} type=Sorcery text=Put a 1/1 colorless Expansion-Symbol creature token into play for each different expansion symbol among permanents you control. [/card] [card] -name=Syncopate -text=Counter target spell unless its controller pays {X}. If that spell is countered this way, exile it instead of putting it into its owner's graveyard. -mana={X}{U} -type=Instant -[/card] -[card] name=Synod Artificer text={X}, {T}: Tap X target noncreature artifacts. -- {X}, {T}: Untap X target noncreature artifacts. mana={2}{U} @@ -16708,12 +16308,6 @@ mana={U} type=Enchantment [/card] [card] -name=Teleportal -text=Target creature you control gets +1/+0 until end of turn and is unblockable this turn. -- Overload {3}{U}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") -mana={U}{R} -type=Sorcery -[/card] -[card] name=Telling Time text=Look at the top three cards of your library. Put one of those cards into your hand, one on top of your library, and one on the bottom of your library. mana={1}{U} @@ -16788,15 +16382,6 @@ type=Planeswalker subtype=Tezzeret [/card] [card] -name=Thada Adel, Acquisitor -text=Islandwalk -- Whenever Thada Adel, Acquisitor deals combat damage to a player, search that player's library for an artifact card and exile it. Then that player shuffles his or her library. Until end of turn, you may play that card. -mana={1}{U}{U} -type=Legendary Creature -subtype=Merfolk Rogue -power=2 -toughness=2 -[/card] -[card] name=Thalakos Dreamsower text=Shadow (This creature can block or be blocked by only creatures with shadow.) -- You may choose not to untap Thalakos Dreamsower during your untap step. -- Whenever Thalakos Dreamsower deals damage to an opponent, tap target creature. That creature doesn't untap during its controller's untap step for as long as Thalakos Dreamsower remains tapped. mana={2}{U} @@ -16921,45 +16506,18 @@ power=2 toughness=2 [/card] [card] -name=Thought Devourer -text=Flying -- Your maximum hand size is reduced by four. -mana={2}{U}{U} -type=Creature -subtype=Beast -power=4 -toughness=4 -[/card] -[card] name=Thought Dissector text={X}, {T}: Target opponent reveals cards from the top of his or her library until an artifact card or X cards are revealed, whichever comes first. If an artifact card is revealed this way, put it onto the battlefield under your control and sacrifice Thought Dissector. Put the rest of the revealed cards into that player's graveyard. mana={4} type=Artifact [/card] [card] -name=Thought Eater -text=Flying -- Your maximum hand size is reduced by three. -mana={1}{U} -type=Creature -subtype=Beast -power=2 -toughness=2 -[/card] -[card] name=Thought Hemorrhage text=Name a nonland card. Target player reveals his or her hand. Thought Hemorrhage deals 3 damage to that player for each card with that name revealed this way. Search that player's graveyard, hand, and library for all cards with that name and exile them. Then that player shuffles his or her library. mana={2}{B}{R} type=Sorcery [/card] [card] -name=Thought Nibbler -text=Flying -- Your maximum hand size is reduced by two. -mana={U} -type=Creature -subtype=Beast -power=1 -toughness=1 -[/card] -[card] name=Thought Prison text=Imprint - When Thought Prison enters the battlefield, you may have target player reveal his or her hand. If you do, choose a nonland card from it and exile that card. -- Whenever a player casts a spell that shares a color or converted mana cost with the exiled card, Thought Prison deals 2 damage to that player. mana={5} @@ -17436,6 +16994,15 @@ mana={U} type=Instant [/card] [card] +name=Trinisphere +auto=this(untapped) lord(*[manacost=0]|hand) altercost(colorless, +3) +auto=this(untapped) lord(*[manacost=1]|hand) altercost(colorless, +2) +auto=this(untapped) lord(*[manacost=2]|hand) altercost(colorless, +1) +text=As long as Trinisphere is untapped, each spell that would cost less than three mana to cast costs three mana to cast. (Additional mana in the cost may be paid with any color of mana or colorless mana. For example, a spell that would cost {1}{B} to cast costs {2}{B} to cast instead.) +mana={3} +type=Artifact +[/card] +[card] name=Trumpeting Armodon text={1}{G}: Target creature blocks Trumpeting Armodon this turn if able. mana={3}{G} @@ -17445,15 +17012,6 @@ power=3 toughness=3 [/card] [card] -name=Trusted Advisor -text=Your maximum hand size is increased by two. -- At the beginning of your upkeep, return a blue creature you control to its owner's hand. -mana={U} -type=Creature -subtype=Human Advisor -power=1 -toughness=2 -[/card] -[card] name=Truth or Tale text=Reveal the top five cards of your library and separate them into two piles. An opponent chooses one of those piles. Put a card from the chosen pile into your hand, then put all other cards revealed this way on the bottom of your library in any order. mana={1}{U} @@ -17609,17 +17167,6 @@ mana={2}{U} type=Sorcery [/card] [card] -name=Undead Alchemist -auto=@combatdamaged(player) from(zombie|mybattlefield):deplete:thatmuch opponent && life:thatmuch opponent -auto=@movedTo(creature|opponentgraveyard) from(opponentlibrary):token(Zombie,Creature Zombie,2/2,black) -text=If a Zombie you control would deal combat damage to a player, instead that player puts that many cards from the top of his or her library into his or her graveyard. -- Whenever a creature card is put into an opponent's graveyard from his or her library, exile that card and put a 2/2 black Zombie creature token onto the battlefield. -mana={3}{U} -type=Creature -subtype=Zombie -power=4 -toughness=2 -[/card] -[card] name=Undercity Informer text={1}, Sacrifice a creature: Target player reveals cards from the top of his or her library until he or she reveals a land card, then puts those cards into his or her graveyard. mana={2}{B} @@ -17781,12 +17328,6 @@ power=3 toughness=3 [/card] [card] -name=Vandalblast -text=Destroy target artifact you don't control. -- Overload {4}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") -mana={R} -type=Sorcery -[/card] -[card] name=Vanguard's Shield text=Equipped creature gets +0/+3 and can block an additional creature. -- Equip {3} ({3}: Attach to target creature you control. Equip only as a sorcery.) mana={2} @@ -18038,12 +17579,6 @@ mana={1}{R}{G} type=Instant [/card] [card] -name=Virulent Swipe -mana={B} -type=Instant -text=Target creature gets +2/+0 and gains deathtouch until end of turn. 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=Virulent Wound mana={B} type=Instant @@ -18934,12 +18469,6 @@ mana={2}{B}{B}{B} type=Enchantment [/card] [card] -name=Worship -text=If you control a creature, damage that would reduce your life total to less than 1 reduces it to 1 instead. -mana={3}{W} -type=Enchantment -[/card] -[card] name=Wort, the Raidmother text=When Wort, the Raidmother enters the battlefield, put two 1/1 red and green Goblin Warrior creature tokens onto the battlefield. -- Each red or green instant or sorcery spell you cast has conspire. (As you cast the spell, you may tap two untapped creatures you control that share a color with it. When you do, copy it and you may choose new targets for the copy.) mana={4}{RG}{RG} @@ -18982,12 +18511,6 @@ mana={2}{W} type=Instant [/card] [card] -name=Yawgmoth's Agenda -text=You can't cast more than one spell each turn. -- You may play cards from your graveyard. -- If a card would be put into your graveyard from anywhere, exile it instead. -mana={3}{B}{B} -type=Enchantment -[/card] -[card] name=Ydwen Efreet text=Whenever Ydwen Efreet blocks, flip a coin. If you lose the flip, remove Ydwen Efreet from combat and it can't block this turn. Creatures it was blocking that had become blocked by only Ydwen Efreet this combat become unblocked. mana={R}{R}{R} diff --git a/projects/mtg/bin/Res/test/CDA#1.txt b/projects/mtg/bin/Res/test/CDA#1.txt new file mode 100644 index 000000000..4c583a5e9 --- /dev/null +++ b/projects/mtg/bin/Res/test/CDA#1.txt @@ -0,0 +1,46 @@ +#Testing CDA Tarmogoyf vs Godhead of Awe +#Godhead of Awe makes other creatures 1/1 on layer 7b +#Tarmogoyf's CDA ability is on layer 7a so it will be overriden +#by Godhead of Awe. Giant Growth's ability is on layer 7c so +#the +3/+3 bonus is intact. :) +[INIT] +FIRSTMAIN +[PLAYER1] +inplay:Concordant Crossroads, Godhead of Awe, Forest +hand:Tarmogoyf, Giant Growth +graveyard:mountain, lightning bolt, grizzly bear +manapool:{1}{G} +[PLAYER2] +[DO] +Tarmogoyf +next +next +Tarmogoyf +next +eot +eot +#untap +next +#upkeep +next +#draw +next +#main1 +Forest +Giant Growth +Tarmogoyf +next +#combat begin +next +#attackers +Tarmogoyf +eot +[ASSERT] +UNTAP +[PLAYER1] +inplay:Concordant Crossroads, Godhead of Awe, Tarmogoyf, Forest +graveyard:mountain, lightning bolt, grizzly bear, Giant Growth +manapool:{0} +[PLAYER2] +life:15 +[END] diff --git a/projects/mtg/bin/Res/test/CDA#2.txt b/projects/mtg/bin/Res/test/CDA#2.txt new file mode 100644 index 000000000..c1fca2d5b --- /dev/null +++ b/projects/mtg/bin/Res/test/CDA#2.txt @@ -0,0 +1,38 @@ +#Testing CDA Turn to Frog vs Krosan Cloudscraper +#Krosan Cloudscraper that is turned into frog with 1 damage +#from Lightning Dart must die because when you change +#the power and toughness into 1/1, the 1 point of damage +#is taken into account... +[INIT] +FIRSTMAIN +[PLAYER1] +inplay:Krosan Cloudscraper +[PLAYER2] +inplay:Mountain, Plains, Swamp, Island +hand:Lightning Dart, Turn to Frog +[DO] +next +next +Krosan Cloudscraper +next +no +yes +Mountain +Plains +Lightning Dart +Krosan Cloudscraper +Swamp +Island +Turn to Frog +Krosan Cloudscraper +endinterruption +eot +[ASSERT] +UNTAP +[PLAYER1] +graveyard:Krosan Cloudscraper +[PLAYER2] +inplay:Mountain, Plains, Swamp, Island +graveyard:Lightning Dart, Turn to Frog +life:20 +[END] diff --git a/projects/mtg/bin/Res/test/ExchangeController.txt b/projects/mtg/bin/Res/test/ExchangeController.txt new file mode 100644 index 000000000..887ddb4b5 --- /dev/null +++ b/projects/mtg/bin/Res/test/ExchangeController.txt @@ -0,0 +1,28 @@ +#Hypnotic Specter vs Control Magic +#The opponent of the current controller of Hypnotic Specter +#Must discard at random when combat damage is dealt... +[INIT] +FIRSTMAIN +[PLAYER1] +hand:Control Magic +inplay:Concordant Crossroads +manapool:{B}{B}{U}{U} +[PLAYER2] +inplay:Hypnotic Specter +hand:Forest +[DO] +Control Magic +Hypnotic Specter +next +next +Hypnotic Specter +next +eot +[ASSERT] +UNTAP +[PLAYER1] +inplay:Control Magic, Hypnotic Specter, Concordant Crossroads +[PLAYER2] +graveyard:Forest +life:18 +[END] diff --git a/projects/mtg/bin/Res/test/Gravebane_Zombie.txt b/projects/mtg/bin/Res/test/Gravebane_Zombie.txt new file mode 100644 index 000000000..a1a944388 --- /dev/null +++ b/projects/mtg/bin/Res/test/Gravebane_Zombie.txt @@ -0,0 +1,28 @@ +#Testing Gravebane Zombie +#after gravebane zombie dies, activate archivist +#and you must draw gravebane zombie if its on the top +#of your library +[INIT] +FIRSTMAIN +[PLAYER1] +inplay:Gravebane Zombie, Archivist +hand:Wrecking Ball +library:mountain, plains, swamp +manapool:{2}{R}{B} +[PLAYER2] +[DO] +Wrecking Ball +Gravebane Zombie +Archivist +[ASSERT] +FIRSTMAIN +[PLAYER1] +inplay:Archivist +library:mountain, plains, swamp +hand:Gravebane Zombie +graveyard:Wrecking Ball +manapool:{0} +life:20 +[PLAYER2] +life:20 +[END] \ No newline at end of file diff --git a/projects/mtg/bin/Res/test/PTInstant.txt b/projects/mtg/bin/Res/test/PTInstant.txt new file mode 100644 index 000000000..437357e6d --- /dev/null +++ b/projects/mtg/bin/Res/test/PTInstant.txt @@ -0,0 +1,29 @@ +# BUG..cast tundra wolves with soul warden in play, kill soul warden with last gasp, you still get a life because the spell resolved +# first before Soul Warden goes to graveyard. +[INIT] +FIRSTMAIN +[PLAYER1] +hand:Tundra Wolves +manapool:{W} +inplay:Soul Warden +life:20 +[PLAYER2] +manapool:{B}{B} +hand:Last Gasp +[DO] +Tundra Wolves +no +yes +Last Gasp +Soul Warden +endinterruption +[ASSERT] +FIRSTMAIN +[PLAYER1] +graveyard:Soul Warden +inplay:Tundra Wolves +life:20 +[PLAYER2] +graveyard:Last Gasp +life:20 +[END] diff --git a/projects/mtg/bin/Res/test/PT_M15_errata.txt b/projects/mtg/bin/Res/test/PT_M15_errata.txt new file mode 100644 index 000000000..6aa8b7770 --- /dev/null +++ b/projects/mtg/bin/Res/test/PT_M15_errata.txt @@ -0,0 +1,47 @@ +#Testing Turn to Frog to Serra Angel with Crusade in play. +#M15 uses base power template, so setting the power/toughness. +#only affects the base or original power/toughness. +#Turn to Frog makes Serra Angel a 1/1 blue frog... latest pull +#request from GIT fixes the issue of Serra Angel dying +#from crusade because of invalid reduction of P/T :) +# +#First attack is 1/1 blue Serra Angel unaffected by Crusade +#Second attack is 5/5 Serra Angel affected by Crusade :) +[INIT] +FIRSTMAIN +[PLAYER1] +inplay:Serra Angel, Crusade +hand:Turn to Frog +manapool:{1}{U} +[PLAYER2] +[DO] +Turn to Frog +Serra Angel +next +next +Serra Angel +next +eot +eot +#untap +next +#upkeep +next +#draw +next +#main1 +next +#combat begin +next +#attackers +Serra Angel +eot +[ASSERT] +UNTAP +[PLAYER1] +inplay:Serra Angel, Crusade +graveyard:Turn to Frog +manapool:{0} +[PLAYER2] +life:14 +[END] diff --git a/projects/mtg/bin/Res/test/PT_M15_errata2.txt b/projects/mtg/bin/Res/test/PT_M15_errata2.txt new file mode 100644 index 000000000..b71083d80 --- /dev/null +++ b/projects/mtg/bin/Res/test/PT_M15_errata2.txt @@ -0,0 +1,41 @@ +#Testing Turn to Frog to Serra Angel with Glorious Anthem in play. +#First attack is 2/2 blue Serra Angel affected by Glorious Anthem +#Second attack is 5/5 Serra Angel affected by Glorious Anthem :) +[INIT] +FIRSTMAIN +[PLAYER1] +inplay:Serra Angel, Glorious Anthem +hand:Turn to Frog +manapool:{1}{U} +[PLAYER2] +[DO] +Turn to Frog +Serra Angel +next +next +Serra Angel +next +eot +eot +#untap +next +#upkeep +next +#draw +next +#main1 +next +#combat begin +next +#attackers +Serra Angel +eot +[ASSERT] +UNTAP +[PLAYER1] +inplay:Serra Angel, Glorious Anthem +graveyard:Turn to Frog +manapool:{0} +[PLAYER2] +life:13 +[END] diff --git a/projects/mtg/bin/Res/test/PTswitch.txt b/projects/mtg/bin/Res/test/PTswitch.txt new file mode 100644 index 000000000..93ffb1260 --- /dev/null +++ b/projects/mtg/bin/Res/test/PTswitch.txt @@ -0,0 +1,36 @@ +#Testing PT Switch. Windreaver and Screaming Fury... Layer 7e +#A 1/3 creature is given +0/+1 by an effect. Then another effect switches the +#creature’s power and toughness. Its new power and toughness is 4/1. A new effect gives +#the creature +5/+0. Its ā€œunswitchedā€ power and toughness would be 6/4, so its actual +#power and toughness is 4/6. +[INIT] +FIRSTMAIN +[PLAYER1] +hand:Screaming Fury +inplay:Windreaver, Mountain, Plains, Swamp, Island, Forest +[PLAYER2] +[DO] +Plains +Windreaver +choice 1 +Island +Windreaver +choice 0 +Mountain +Forest +Swamp +Screaming Fury +Windreaver +next +next +Windreaver +next +eot +[ASSERT] +UNTAP +[PLAYER1] +inplay:Windreaver, Mountain, Plains, Swamp, Island, Forest +graveyard:Screaming Fury +[PLAYER2] +life:16 +[END] diff --git a/projects/mtg/bin/Res/test/Savra_Queen_of_the_Golgari.txt b/projects/mtg/bin/Res/test/Savra_Queen_of_the_Golgari.txt index 1ea05e352..0b385dca1 100644 --- a/projects/mtg/bin/Res/test/Savra_Queen_of_the_Golgari.txt +++ b/projects/mtg/bin/Res/test/Savra_Queen_of_the_Golgari.txt @@ -16,6 +16,9 @@ choice 0 choice 0 choice 0 180595 +choice 0 +180595 +choice 1 eot [ASSERT] untap diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index 53bb5f826..5ef04fa98 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -210,6 +210,8 @@ Call_to_Heel_1.txt Call_to_Heel_2.txt castle.txt cathodion.txt +CDA#1.txt +CDA#2.txt celestial_mantle.txt celestial_purge.txt celestial_sword.txt @@ -309,10 +311,12 @@ evil_presence3.txt evil_presence_i647.txt evil_presence_i647_2.txt exaltedsourcekilled.txt +ExchangeController.txt executioners_swing.txt executioners_swing2.txt executioners_swing3.txt explore.txt +exquisite_blood_i953.txt Faceless_Butcher.txt fading.txt fangren_pathcutter.txt @@ -345,6 +349,7 @@ foratog.txt force_of_nature.txt force_of_nature2.txt force_of_nature3.txt +formidable.txt fountain_of_youth.txt Frogmite.txt fungus_sliver.txt @@ -372,6 +377,7 @@ goblin_lackey4.txt goblin_offensive.txt goblin_razerunners.txt golgari_germination_i153.txt +Gravebane_Zombie.txt gravedigger.txt gravity_well.txt gravity_well2.txt @@ -438,6 +444,7 @@ kudzu_i168.txt Lethargy_Trap.txt Lethargy_Trap2.txt leveler.txt +leyline_of_the_void.txt lhurgoyf.txt liability.txt library_of_alexandria1.txt @@ -520,6 +527,7 @@ pillory_of_the_sleepless2_i188.txt pillory_of_the_sleepless3_i188.txt pillory_of_the_sleepless4_i188.txt plague_rats.txt +pledge_protection.txt plumes_of_peace_i260.txt pouncing_jaguar_i425.txt power_armor.txt @@ -529,6 +537,10 @@ protomatter_powder.txt prowess_of_the_fair.txt prowess_of_the_fair2.txt prowess_of_the_fair3.txt +PTInstant.txt +PTswitch.txt +PT_M15_errata.txt +PT_M15_errata2.txt pygmy_troll.txt pyknite_i426.txt pyroclasm.txt @@ -566,6 +578,7 @@ Rending_Vines2.txt resounding_roar.txt resurrection.txt resuscitate_i210.txt +restinpeace.txt righteous_cause.txt rise_from_the_grave.txt river_kelpie2_i335.txt @@ -654,6 +667,7 @@ thallid.txt the_tabernacle_at_pendrell_vale.txt thelon_of_havenwood.txt threaten.txt +thraximundar.txt throne_of_bone.txt thunder-thrash_elder.txt tidal_warrior_i646.txt @@ -661,6 +675,8 @@ tidal_warrior_i649.txt tidal_warrior_i652.txt Timely_Reinforcements.txt titanic_ultimatum.txt +tokenizer.txt +tokenizer2.txt torture.txt tranquil_domain.txt turn_to_slag.txt diff --git a/projects/mtg/bin/Res/test/aegis_of_the_meek.txt b/projects/mtg/bin/Res/test/aegis_of_the_meek.txt index 114710b9d..8104e890c 100644 --- a/projects/mtg/bin/Res/test/aegis_of_the_meek.txt +++ b/projects/mtg/bin/Res/test/aegis_of_the_meek.txt @@ -23,6 +23,7 @@ firstmain [PLAYER1] inplay:Aegis of the Meek,Steppe Lynx,Savannah Lions,Courier Hawk graveyard:Swords to Plowshares +exile:Raging Goblin life:22 [PLAYER2] [END] diff --git a/projects/mtg/bin/Res/test/angry_mob1.txt b/projects/mtg/bin/Res/test/angry_mob1.txt index b67b42e3b..63d7dbde4 100644 --- a/projects/mtg/bin/Res/test/angry_mob1.txt +++ b/projects/mtg/bin/Res/test/angry_mob1.txt @@ -16,6 +16,7 @@ Angry Mob firstmain [PLAYER1] graveyard:Swords to Plowshares +exile:Angry Mob life:25 [PLAYER2] inplay:1373,1374,1375 diff --git a/projects/mtg/bin/Res/test/angry_mob2.txt b/projects/mtg/bin/Res/test/angry_mob2.txt index eba0817f5..7ccb6de6f 100644 --- a/projects/mtg/bin/Res/test/angry_mob2.txt +++ b/projects/mtg/bin/Res/test/angry_mob2.txt @@ -19,6 +19,7 @@ Angry Mob [ASSERT] firstmain [PLAYER1] +exile:Angry Mob graveyard:Swords to Plowshares,Boomerang life:24 [PLAYER2] diff --git a/projects/mtg/bin/Res/test/angry_mob3.txt b/projects/mtg/bin/Res/test/angry_mob3.txt index 00a84e8d6..936a7a8e1 100644 --- a/projects/mtg/bin/Res/test/angry_mob3.txt +++ b/projects/mtg/bin/Res/test/angry_mob3.txt @@ -22,6 +22,7 @@ Angry Mob [ASSERT] firstmain [PLAYER1] +exile:Angry Mob life:22 [PLAYER2] inplay:1373,1374,1375,Plains diff --git a/projects/mtg/bin/Res/test/angry_mob4.txt b/projects/mtg/bin/Res/test/angry_mob4.txt index e2a08256a..0077db594 100644 --- a/projects/mtg/bin/Res/test/angry_mob4.txt +++ b/projects/mtg/bin/Res/test/angry_mob4.txt @@ -25,6 +25,7 @@ Angry Mob [ASSERT] firstmain [PLAYER1] +exile:Angry Mob life:22 [PLAYER2] inplay:1373,1374,1375,Plains diff --git a/projects/mtg/bin/Res/test/angry_mob4b.txt b/projects/mtg/bin/Res/test/angry_mob4b.txt index 76be465d0..38a33177a 100644 --- a/projects/mtg/bin/Res/test/angry_mob4b.txt +++ b/projects/mtg/bin/Res/test/angry_mob4b.txt @@ -29,6 +29,7 @@ Angry Mob [ASSERT] firstmain [PLAYER1] +exile:Angry Mob life:22 [PLAYER2] inplay:1373,1374,Plains diff --git a/projects/mtg/bin/Res/test/angry_mob5.txt b/projects/mtg/bin/Res/test/angry_mob5.txt index 12d26b0be..85e812dd1 100644 --- a/projects/mtg/bin/Res/test/angry_mob5.txt +++ b/projects/mtg/bin/Res/test/angry_mob5.txt @@ -23,6 +23,7 @@ Angry Mob [ASSERT] firstmain [PLAYER1] +exile:Angry Mob inplay:Plains graveyard:Swords to Plowshares life:25 diff --git a/projects/mtg/bin/Res/test/angry_mob7.txt b/projects/mtg/bin/Res/test/angry_mob7.txt index d82073fa7..2ca2eb106 100644 --- a/projects/mtg/bin/Res/test/angry_mob7.txt +++ b/projects/mtg/bin/Res/test/angry_mob7.txt @@ -22,6 +22,7 @@ Angry Mob firstmain [PLAYER1] graveyard:Swords to Plowshares,Annex,Demystify +exile:Angry Mob life:25 [PLAYER2] inplay:1373,1374,1375 diff --git a/projects/mtg/bin/Res/test/celestial_purge.txt b/projects/mtg/bin/Res/test/celestial_purge.txt index 69492a32e..fccdd052c 100644 --- a/projects/mtg/bin/Res/test/celestial_purge.txt +++ b/projects/mtg/bin/Res/test/celestial_purge.txt @@ -15,4 +15,5 @@ FIRSTMAIN graveyard:183055 manapool:{0} [PLAYER2] +exile:184994 [END] \ No newline at end of file diff --git a/projects/mtg/bin/Res/test/control_magic2.txt b/projects/mtg/bin/Res/test/control_magic2.txt index a64751632..67e6f0099 100644 --- a/projects/mtg/bin/Res/test/control_magic2.txt +++ b/projects/mtg/bin/Res/test/control_magic2.txt @@ -28,6 +28,7 @@ graveyard:1194 manapool:{0} life:24 [PLAYER2] +exile:1366 graveyard:1367 inplay:1397 manapool:{0} diff --git a/projects/mtg/bin/Res/test/cranial_plating.txt b/projects/mtg/bin/Res/test/cranial_plating.txt index 3de1d04f2..184321939 100644 --- a/projects/mtg/bin/Res/test/cranial_plating.txt +++ b/projects/mtg/bin/Res/test/cranial_plating.txt @@ -19,6 +19,7 @@ Grizzly Bears [ASSERT] combatattackers [PLAYER1] +exile:Grizzly Bears inplay:Cranial Plating,Rod of Ruin graveyard:Swords to Plowshares life:24 diff --git a/projects/mtg/bin/Res/test/curiosity2_i217.txt b/projects/mtg/bin/Res/test/curiosity2_i217.txt index efc1f4a99..8f36e109a 100644 --- a/projects/mtg/bin/Res/test/curiosity2_i217.txt +++ b/projects/mtg/bin/Res/test/curiosity2_i217.txt @@ -2,6 +2,15 @@ #DESC: Tests whether Curiosity works correctly #DESC: when cast on an opponent's creature #DESC: http://code.google.com/p/wagic/issues/detail?id=217 +# +#revised...10-22-2015...kevlahnota +#2/1/2007 You draw one card each time the enchanted creature damages the opponent. This is not one card per point of damage. +#2/1/2007 If put on your opponent's creature, you do not draw a card when that creature damages you. The creature has to damage your opponent in order to have this work. +#2/1/2007 Drawing a card is optional. If you forget, you can't go back later and do it, even if it is something you normally do. +#9/22/2011 "You" refers to the controller of Curiosity, which may be different from the controller of the enchanted creature."An opponent" refers to an opponent of Curiosity's controller. +#9/22/2011 Any damage dealt by the enchanted creature to an opponent will cause Curiosity to trigger, not just combat damage. +#9/22/2011 Curiosity doesn't trigger if the enchanted creature deals damage to a planeswalker controlled by an opponent. +# [INIT] firstmain [PLAYER1] @@ -29,7 +38,7 @@ next combatend [PLAYER1] inplay:Curiosity -hand:Island +library:Island life:14 [PLAYER2] inplay:Craw Wurm diff --git a/projects/mtg/bin/Res/test/bugs/exquisite_blood_i953.txt b/projects/mtg/bin/Res/test/exquisite_blood_i953.txt similarity index 100% rename from projects/mtg/bin/Res/test/bugs/exquisite_blood_i953.txt rename to projects/mtg/bin/Res/test/exquisite_blood_i953.txt diff --git a/projects/mtg/bin/Res/test/fists_of_ironwood.txt b/projects/mtg/bin/Res/test/fists_of_ironwood.txt index 7e852fa3b..8cfb9a324 100644 --- a/projects/mtg/bin/Res/test/fists_of_ironwood.txt +++ b/projects/mtg/bin/Res/test/fists_of_ironwood.txt @@ -19,6 +19,7 @@ endinterruption [ASSERT] FIRSTMAIN [PLAYER1] +exile:grizzly bears graveyard:fists of ironwood life:22 [PLAYER2] diff --git a/projects/mtg/bin/Res/test/fizzleto_exile.txt b/projects/mtg/bin/Res/test/fizzleto_exile.txt index cb9e4fe7a..3ca6532a3 100644 --- a/projects/mtg/bin/Res/test/fizzleto_exile.txt +++ b/projects/mtg/bin/Res/test/fizzleto_exile.txt @@ -17,6 +17,7 @@ endinterruption [ASSERT] FIRSTMAIN [PLAYER1] +exile:bad moon manapool:{0} life:20 [PLAYER2] diff --git a/projects/mtg/bin/Res/test/formidable.txt b/projects/mtg/bin/Res/test/formidable.txt new file mode 100644 index 000000000..0566d7d46 --- /dev/null +++ b/projects/mtg/bin/Res/test/formidable.txt @@ -0,0 +1,33 @@ +#Testing Atarka Beastbreaker,Stampeding Elk Herd -- Formidable +#Atarka Beastbreaker will become 6/6, and then attacks along with Stampeding Elk Herd, trample effect will trigger +#then p2 will block with Steel Wall, p2 must have 13 life... +[INIT] +COMBATATTACKERS +[PLAYER1] +inplay:Atarka Beastbreaker,Krosan Tusker,Stampeding Elk Herd +manapool:{4}{G} +[PLAYER2] +inplay:Steel Wall +life:20 +[DO] +Atarka Beastbreaker +choice 1 +Atarka Beastbreaker +Stampeding Elk Herd +next +Steel Wall +#blockers +next +#combatdamage 2 +next +next +#endofcombat 2 +[ASSERT] +COMBATEND +[PLAYER1] +inplay:Atarka Beastbreaker,Krosan Tusker,Stampeding Elk Herd +manapool:{0} +[PLAYER2] +graveyard:Steel Wall +life:13 +[END] \ No newline at end of file diff --git a/projects/mtg/bin/Res/test/generic/rampage3.txt b/projects/mtg/bin/Res/test/generic/rampage3.txt index 04ff5c715..8e598e1f0 100644 --- a/projects/mtg/bin/Res/test/generic/rampage3.txt +++ b/projects/mtg/bin/Res/test/generic/rampage3.txt @@ -26,6 +26,7 @@ secondmain [PLAYER1] inplay:Plains graveyard:Swords to Plowshares +exile:Frost Giant life:28 [PLAYER2] graveyard:Suntail Hawk,Scryb Sprites,Raging Goblin diff --git a/projects/mtg/bin/Res/test/karns_touch_i233.txt b/projects/mtg/bin/Res/test/karns_touch_i233.txt index 7c0b36aab..aa9ac8c17 100644 --- a/projects/mtg/bin/Res/test/karns_touch_i233.txt +++ b/projects/mtg/bin/Res/test/karns_touch_i233.txt @@ -18,6 +18,7 @@ Jayemdae Tome [ASSERT] firstmain [PLAYER1] +exile:Jayemdae Tome graveyard:Karn's Touch,Swords to Plowshares life:24 [PLAYER2] diff --git a/projects/mtg/bin/Res/test/leveler.txt b/projects/mtg/bin/Res/test/leveler.txt index a00f1860a..a58558a75 100644 --- a/projects/mtg/bin/Res/test/leveler.txt +++ b/projects/mtg/bin/Res/test/leveler.txt @@ -11,6 +11,7 @@ leveler [ASSERT] FIRSTMAIN [PLAYER1] +exile:swamp,mountain inplay:leveler [PLAYER2] [END] \ No newline at end of file diff --git a/projects/mtg/bin/Res/test/leyline_of_the_void.txt b/projects/mtg/bin/Res/test/leyline_of_the_void.txt new file mode 100644 index 000000000..48bf357b2 --- /dev/null +++ b/projects/mtg/bin/Res/test/leyline_of_the_void.txt @@ -0,0 +1,26 @@ +#Testing Leyline of the Void vs Darksteel Colossus and Black Sun's Zenith +#Darksteel Colossus must be on owners library +[INIT] +FIRSTMAIN +[PLAYER1] +inplay:Leyline of the Void, Forbidden Orchard +hand:Black Sun's Zenith +manapool:{B}{B}{B}{B}{B}{B}{B}{B}{B}{B}{B}{B}{B}{B} +[PLAYER2] +inplay:Darksteel Colossus +library:Mountain +[DO] +Forbidden Orchard +choice 2 +Black Sun's Zenith +[ASSERT] +FIRSTMAIN +[PLAYER1] +inplay:Leyline of the Void, Forbidden Orchard +library:Black Sun's Zenith +manapool:{0} +life:20 +[PLAYER2] +library:Mountain, Darksteel Colossus +life:20 +[END] \ No newline at end of file diff --git a/projects/mtg/bin/Res/test/necrogenesis.txt b/projects/mtg/bin/Res/test/necrogenesis.txt index a330a02d0..fbe6bbcb4 100644 --- a/projects/mtg/bin/Res/test/necrogenesis.txt +++ b/projects/mtg/bin/Res/test/necrogenesis.txt @@ -16,4 +16,5 @@ FIRSTMAIN inplay:necrogenesis,* manapool:{0} [PLAYER2] +exile:1250 [END] \ No newline at end of file diff --git a/projects/mtg/bin/Res/test/pledge_protection.txt b/projects/mtg/bin/Res/test/pledge_protection.txt new file mode 100644 index 000000000..364af6a76 --- /dev/null +++ b/projects/mtg/bin/Res/test/pledge_protection.txt @@ -0,0 +1,46 @@ +#Testing Protection +#702.16c A permanent or player with protection can’t be enchanted by Auras that have the stated +#quality. Such Auras attached to the permanent or player with protection will be put into their +#owners’ graveyards as a state-based action. +# +#702.16d A permanent with protection can’t be equipped by Equipment that have the stated quality +#or fortified by Fortifications that have the stated quality. Such Equipment or Fortifications +#become unattached from that permanent as a state-based action, but remain on the battlefield. +[INIT] +FIRSTMAIN +[PLAYER1] +hand:Pledge of Loyalty, Shuko, Holy Strength, Shifting Sky +inplay:Crimson Acolyte +manapool:{W}{W}{W}{W}{U}{U}{U} +[PLAYER2] +[DO] +Holy Strength +Crimson Acolyte +#crimson acolyte becomes 2/3 +Shuko +Shuko +Crimson Acolyte +#crimson acolyte becomes 3/3 +Pledge of Loyalty +Crimson Acolyte +#crimson acolyte becomes 2/1 since you have white permanents, pledge of loyalty grants protection from white +#holy strength is put into the graveyard as state based action :) +Shifting Sky +choice 0 +choice 2 +#after casting shifting sky, choose the color red, and all nonland permanents becomes red +#since shuko becomes red and crimson has protection from red, it will be unattached +#as state based action, pledge of loyalty stays on the creature :) +next +next +Crimson Acolyte +next +eot +[ASSERT] +UNTAP +[PLAYER1] +inplay:Crimson Acolyte, Pledge of Loyalty, Shuko, Shifting Sky +graveyard:Holy Strength +[PLAYER2] +life:19 +[END] diff --git a/projects/mtg/bin/Res/test/restinpeace.txt b/projects/mtg/bin/Res/test/restinpeace.txt new file mode 100644 index 000000000..347121900 --- /dev/null +++ b/projects/mtg/bin/Res/test/restinpeace.txt @@ -0,0 +1,23 @@ +#Testing Rest in Peace vs Disenchant +#Rest in Peace should be exiled while Disenchant must be put +#in the owner's graveyard.. +[INIT] +FIRSTMAIN +[PLAYER1] +inplay:Rest in Peace +hand:Disenchant +manapool:{W}{W} +[PLAYER2] +[DO] +Disenchant +Rest in Peace +[ASSERT] +FIRSTMAIN +[PLAYER1] +graveyard:Disenchant +manapool:{0} +exile:Rest in Peace +life:20 +[PLAYER2] +life:20 +[END] \ No newline at end of file diff --git a/projects/mtg/bin/Res/test/sword_to_plowshares.txt b/projects/mtg/bin/Res/test/sword_to_plowshares.txt index 16fda5125..5ca45d047 100644 --- a/projects/mtg/bin/Res/test/sword_to_plowshares.txt +++ b/projects/mtg/bin/Res/test/sword_to_plowshares.txt @@ -16,5 +16,6 @@ FIRSTMAIN graveyard:1367 manapool:{0} [PLAYER2] +exile:141935 life:23 [END] \ No newline at end of file diff --git a/projects/mtg/bin/Res/test/thelon_of_havenwood.txt b/projects/mtg/bin/Res/test/thelon_of_havenwood.txt index 5d1853199..6a697f9a4 100644 --- a/projects/mtg/bin/Res/test/thelon_of_havenwood.txt +++ b/projects/mtg/bin/Res/test/thelon_of_havenwood.txt @@ -25,6 +25,7 @@ next [assert] secondmain [player1] +exile:fungusaur inplay:Thelon Of Havenwood,Thallid,Deathspore Thallid,forest,swamp [player2] life:14 diff --git a/projects/mtg/bin/Res/test/thraximundar.txt b/projects/mtg/bin/Res/test/thraximundar.txt new file mode 100644 index 000000000..a6ad2ddf9 --- /dev/null +++ b/projects/mtg/bin/Res/test/thraximundar.txt @@ -0,0 +1,20 @@ +#Bug: thraximundar ability must resolve first... and survives +[INIT] +FIRSTMAIN +[PLAYER1] +inplay:thraximundar,bloodfire colossus +manapool:{R} +[PLAYER2] +[DO] +bloodfire colossus +choice 0 +[ASSERT] +FIRSTMAIN +[PLAYER1] +graveyard:bloodfire colossus +inplay:thraximundar +manapool:{0} +life:14 +[PLAYER2] +life:14 +[END] \ No newline at end of file diff --git a/projects/mtg/bin/Res/test/tokenizer.txt b/projects/mtg/bin/Res/test/tokenizer.txt new file mode 100644 index 000000000..96875f319 --- /dev/null +++ b/projects/mtg/bin/Res/test/tokenizer.txt @@ -0,0 +1,29 @@ +# Testing Tokenizer - Parallel Lives (ISD) 249662 +# Dragon Fodder (ALA) 174936 +# text=Put two 1/1 red Goblin creature tokens into play. +# Tokens must be 2.. since there are no tokenizer. +[INIT] +FIRSTMAIN +[PLAYER1] +hand:174936 +manapool:{R}{1} +inplay:249662 +[PLAYER2] +hand:Demystify +manapool:{W} +[DO] +174936 +no +yes +Demystify +249662 +endinterruption +[ASSERT] +FIRSTMAIN +[PLAYER1] +graveyard:249662,174936 +inplay:-174936,-174936 +[PLAYER2] +graveyard:Demystify +life:20 +[END] \ No newline at end of file diff --git a/projects/mtg/bin/Res/test/tokenizer2.txt b/projects/mtg/bin/Res/test/tokenizer2.txt new file mode 100644 index 000000000..0f413c291 --- /dev/null +++ b/projects/mtg/bin/Res/test/tokenizer2.txt @@ -0,0 +1,27 @@ +# Testing Tokenizer - Parallel Lives (ISD) 249662 +# Dragon Fodder (ALA) 174936 +# text=Put two 1/1 red Goblin creature tokens into play. +# Tokens must be 8.. since there are two tokenizer... original value +# is 2 with first tokenizer it will become 4, with the second tokenizer +# the value will be 8... +[INIT] +FIRSTMAIN +[PLAYER1] +hand:174936 +manapool:{R}{1} +inplay:249662,249662 +[PLAYER2] +inplay:plains +hand:Demystify +[DO] +174936 +[ASSERT] +FIRSTMAIN +[PLAYER1] +graveyard:174936 +inplay:249662,249662,-174936,-174936,-174936,-174936,-174936,-174936,-174936,-174936 +[PLAYER2] +hand:Demystify +inplay:plains +life:20 +[END] \ No newline at end of file diff --git a/projects/mtg/bin/Res/test/unearth3.txt b/projects/mtg/bin/Res/test/unearth3.txt index 7c6e8af54..2344bb1f5 100644 --- a/projects/mtg/bin/Res/test/unearth3.txt +++ b/projects/mtg/bin/Res/test/unearth3.txt @@ -24,6 +24,7 @@ next [ASSERT] CLEANUP [PLAYER1] +exile:Dregscape Zombie inplay:129754 [PLAYER2] graveyard:Grizzly Bears diff --git a/projects/mtg/bin/Res/themes/Christmas/backdrop.jpg b/projects/mtg/bin/Res/themes/Christmas/backdrop.jpg index 96df925ad..269d2c2c3 100644 Binary files a/projects/mtg/bin/Res/themes/Christmas/backdrop.jpg and b/projects/mtg/bin/Res/themes/Christmas/backdrop.jpg differ diff --git a/projects/mtg/bin/Res/themes/Classic/backdrop.jpg b/projects/mtg/bin/Res/themes/Classic/backdrop.jpg index 228964878..648a6b086 100644 Binary files a/projects/mtg/bin/Res/themes/Classic/backdrop.jpg and b/projects/mtg/bin/Res/themes/Classic/backdrop.jpg differ diff --git a/projects/mtg/bin/Res/themes/Gemstones/backdrop_black.jpg b/projects/mtg/bin/Res/themes/Gemstones/backdrop_black.jpg index 35d77fa27..b3c01c72e 100644 Binary files a/projects/mtg/bin/Res/themes/Gemstones/backdrop_black.jpg and b/projects/mtg/bin/Res/themes/Gemstones/backdrop_black.jpg differ diff --git a/projects/mtg/bin/Res/themes/Gemstones/backdrop_blue.jpg b/projects/mtg/bin/Res/themes/Gemstones/backdrop_blue.jpg index 4ca776b0d..a8e129f0c 100644 Binary files a/projects/mtg/bin/Res/themes/Gemstones/backdrop_blue.jpg and b/projects/mtg/bin/Res/themes/Gemstones/backdrop_blue.jpg differ diff --git a/projects/mtg/bin/Res/themes/Gemstones/backdrop_green.jpg b/projects/mtg/bin/Res/themes/Gemstones/backdrop_green.jpg index f4ae6edca..663901da4 100644 Binary files a/projects/mtg/bin/Res/themes/Gemstones/backdrop_green.jpg and b/projects/mtg/bin/Res/themes/Gemstones/backdrop_green.jpg differ diff --git a/projects/mtg/bin/Res/themes/Gemstones/backdrop_red.jpg b/projects/mtg/bin/Res/themes/Gemstones/backdrop_red.jpg index f79bd5bc9..52d3d66c3 100644 Binary files a/projects/mtg/bin/Res/themes/Gemstones/backdrop_red.jpg and b/projects/mtg/bin/Res/themes/Gemstones/backdrop_red.jpg differ diff --git a/projects/mtg/bin/Res/themes/Gemstones/backdrop_white.jpg b/projects/mtg/bin/Res/themes/Gemstones/backdrop_white.jpg index 04c5588ea..3ec0453b6 100644 Binary files a/projects/mtg/bin/Res/themes/Gemstones/backdrop_white.jpg and b/projects/mtg/bin/Res/themes/Gemstones/backdrop_white.jpg differ diff --git a/projects/mtg/bin/Res/themes/Green/backdrop.jpg b/projects/mtg/bin/Res/themes/Green/backdrop.jpg index b2c8b8dc0..427da7540 100644 Binary files a/projects/mtg/bin/Res/themes/Green/backdrop.jpg and b/projects/mtg/bin/Res/themes/Green/backdrop.jpg differ diff --git a/projects/mtg/bin/Res/themes/White Shrine/backdrop.JPG b/projects/mtg/bin/Res/themes/White Shrine/backdrop.JPG index b881729aa..aa16211a2 100644 Binary files a/projects/mtg/bin/Res/themes/White Shrine/backdrop.JPG and b/projects/mtg/bin/Res/themes/White Shrine/backdrop.JPG differ diff --git a/projects/mtg/iOS/Makefile b/projects/mtg/iOS/Makefile new file mode 100644 index 000000000..753632933 --- /dev/null +++ b/projects/mtg/iOS/Makefile @@ -0,0 +1,201 @@ +export ARCHS = armv7 armv7s +export TARGET = iphone:clang:latest:8.0 + +include ../../../theos/makefiles/common.mk + +APPLICATION_NAME = wagic +wagic_FILES = ../../../JGE/src/iOS/main.m\ + ../../../JGE/src/iOS/wagicAppDelegate.m\ + ../../../JGE/src/iOS/ES2Renderer.m\ + ../../../JGE/src/iOS/EAGLView.m\ + ../../../JGE/src/iOS/EAGLViewController.m\ + ../../../JGE/src/iOS/JSfx.cpp\ + ../../../JGE/src/pc/JGfx.cpp\ + ../iOS/UI/WagicDownloadProgressViewController.m\ + ../iOS/asi-http-request/ASIAuthenticationDialog.m\ + ../iOS/asi-http-request/ASIDataCompressor.m\ + ../iOS/asi-http-request/ASIDataDecompressor.m\ + ../iOS/asi-http-request/ASIDownloadCache.m\ + ../iOS/asi-http-request/ASIFormDataRequest.m\ + ../iOS/asi-http-request/ASIHTTPRequest.m\ + ../iOS/asi-http-request/ASIInputStream.m\ + ../iOS/asi-http-request/ASINetworkQueue.m\ + ../iOS/SoundManager/SoundManager.m\ + ../iOS/SoundManager/MyOpenALSupport.c\ + ../iOS/Reachability/Reachability/Reachability.m\ + ../../../JGE/src/unzip/unzip.c\ + ../../../JGE/src/unzip/zip.c\ + ../../../JGE/src/unzip/ioapi.c\ + ../iOS/ZipArchive/ZipArchive.mm\ + ../src/SimpleMenu.cpp\ + ../src/AbilityParser.cpp\ + ../src/ActionElement.cpp\ + ../src/ActionLayer.cpp\ + ../src/ActionStack.cpp\ + ../src/AIHints.cpp\ + ../src/AIMomirPlayer.cpp\ + ../src/AIPlayer.cpp\ + ../src/AIPlayerBaka.cpp\ + ../src/AIStats.cpp\ + ../src/AllAbilities.cpp\ + ../src/CardDescriptor.cpp\ + ../src/CardDisplay.cpp\ + ../src/CardGui.cpp\ + ../src/CardPrimitive.cpp\ + ../src/CardSelector.cpp\ + ../src/CarouselDeckView.cpp\ + ../src/Closest.cpp\ + ../src/Counters.cpp\ + ../src/Credits.cpp\ + ../src/Damage.cpp\ + ../src/DamagerDamaged.cpp\ + ../src/DeckDataWrapper.cpp\ + ../src/DeckEditorMenu.cpp\ + ../src/DeckManager.cpp\ + ../src/DeckMenu.cpp\ + ../src/DeckMenuItem.cpp\ + ../src/DeckMetaData.cpp\ + ../src/DeckStats.cpp\ + ../src/DeckView.cpp\ + ../src/DuelLayers.cpp\ + ../src/ExtraCost.cpp\ + ../src/GameApp.cpp\ + ../src/GameLauncher.cpp\ + ../src/GameObserver.cpp\ + ../src/GameOptions.cpp\ + ../src/GameStateAwards.cpp\ + ../src/GameState.cpp\ + ../src/GameStateDeckViewer.cpp\ + ../src/GameStateDuel.cpp\ + ../src/GameStateMenu.cpp\ + ../src/GameStateOptions.cpp\ + ../src/GameStateShop.cpp\ + ../src/GameStateStory.cpp\ + ../src/GameStateTransitions.cpp\ + ../src/GridDeckView.cpp\ + ../src/GuiAvatars.cpp\ + ../src/GuiBackground.cpp\ + ../src/GuiCardsController.cpp\ + ../src/GuiCombat.cpp\ + ../src/GuiFrame.cpp\ + ../src/GuiHand.cpp\ + ../src/GuiLayers.cpp\ + ../src/GuiMana.cpp\ + ../src/GuiPhaseBar.cpp\ + ../src/GuiPlay.cpp\ + ../src/GuiStatic.cpp\ + ../src/IconButton.cpp\ + ../src/InteractiveButton.cpp\ + ../src/ManaCost.cpp\ + ../src/ManaCostHybrid.cpp\ + ../src/MenuItem.cpp\ + ../src/ModRules.cpp\ + ../src/MTGAbility.cpp\ + ../src/MTGCard.cpp\ + ../src/MTGCardInstance.cpp\ + ../src/MTGDeck.cpp\ + ../src/MTGDefinitions.cpp\ + ../src/MTGGamePhase.cpp\ + ../src/MTGGameZones.cpp\ + ../src/MTGPack.cpp\ + ../src/MTGRules.cpp\ + ../src/ObjectAnalytics.cpp\ + ../src/OptionItem.cpp\ + ../src/PhaseRing.cpp\ + ../src/Player.cpp\ + ../src/PlayerData.cpp\ + ../src/PlayGuiObject.cpp\ + ../src/PlayGuiObjectController.cpp\ + ../src/PlayRestrictions.cpp\ + ../src/Pos.cpp\ + ../src/PriceList.cpp\ + ../src/ReplacementEffects.cpp\ + ../src/Rules.cpp\ + ../src/SimpleButton.cpp\ + ../src/SimpleMenu.cpp\ + ../src/SimpleMenuItem.cpp\ + ../src/SimplePad.cpp\ + ../src/SimplePopup.cpp\ + ../src/StoryFlow.cpp\ + ../src/Subtypes.cpp\ + ../src/StyleManager.cpp\ + ../src/TargetChooser.cpp\ + ../src/TargetsList.cpp\ + ../src/Tasks.cpp\ + ../src/TextScroller.cpp\ + ../src/ThisDescriptor.cpp\ + ../src/Token.cpp\ + ../src/Translate.cpp\ + ../src/TranslateKeys.cpp\ + ../src/Trash.cpp\ + ../src/utils.cpp\ + ../src/WCachedResource.cpp\ + ../src/WDataSrc.cpp\ + ../src/WEvent.cpp\ + ../src/WFilter.cpp\ + ../src/WFont.cpp\ + ../src/WGui.cpp\ + ../src/WResourceManager.cpp \ + ../src/AIPlayerBakaB.cpp \ + ../src/TestSuiteAI.cpp\ + ../../../JGE/src/Encoding.cpp\ + ../../../JGE/src/JAnimator.cpp\ + ../../../JGE/src/JApp.cpp\ + ../../../JGE/src/JDistortionMesh.cpp\ + ../../../JGE/src/JFileSystem.cpp\ + ../../../JGE/src/JGameObject.cpp\ + ../../../JGE/src/JGE.cpp\ + ../../../JGE/src/JGui.cpp\ + ../../../JGE/src/JLogger.cpp\ + ../../../JGE/src/JLBFont.cpp\ + ../../../JGE/src/JOBJModel.cpp\ + ../../../JGE/src/JParticle.cpp\ + ../../../JGE/src/JParticleEffect.cpp\ + ../../../JGE/src/JParticleEmitter.cpp\ + ../../../JGE/src/JParticleSystem.cpp\ + ../../../JGE/src/JResourceManager.cpp\ + ../../../JGE/src/JSpline.cpp\ + ../../../JGE/src/JSprite.cpp\ + ../../../JGE/src/Vector2D.cpp\ + ../../../JGE/src/tinyxml/tinystr.cpp\ + ../../../JGE/src/tinyxml/tinyxml.cpp\ + ../../../JGE/src/tinyxml/tinyxmlerror.cpp\ + ../../../JGE/src/tinyxml/tinyxmlparser.cpp\ + ../../../JGE/src/hge/hgecolor.cpp\ + ../../../JGE/src/hge/hgedistort.cpp\ + ../../../JGE/src/hge/hgefont.cpp\ + ../../../JGE/src/hge/hgeparticle.cpp\ + ../../../JGE/src/hge/hgerect.cpp\ + ../../../JGE/src/hge/hgevector.cpp\ + ../../../JGE/src/zipFS/zfsystem.cpp\ + ../../../JGE/src/zipFS/ziphdr.cpp\ + ../../../JGE/src/zipFS/zstream.cpp\ + ../../../Boost/lib/pthread/once.cpp\ + ../../../Boost/lib/pthread/thread.cpp\ + + +wagic_LDFLAGS = -lz +wagic_FRAMEWORKS = UIKit CoreGraphics OpenGLES Foundation CFNetwork MobileCoreServices AVFoundation OpenAL AudioToolbox QuartzCore SystemConfiguration +include ../../../theos/makefiles/application.mk + +ADDITIONAL_CFLAGS = -I ../include\ + -I ../../../JGE/include\ + -I ../../../JGE/src/unzip\ + -I ../../../JGE/src/zipFS\ + -I ../../../JGE/Dependencies/include\ + -I ../../../Boost\ + -I ../../../JGE/src/iOS\ + -I ../iOS/UI\ + -I ../iOS/Reachability/Reachability\ + -I ../iOS/asi-http-request\ + -I ../iOS/ZipArchive\ + -I ../iOS/SoundManager\ + -DIOS -D__arm__ -DTIXML_USE_STL -DVERSION=\"$(GIT_VERSION)\"\ + -Wno-parentheses-equality -Wno-delete-non-virtual-dtor\ + -Wno-tautological-undefined-compare -Wno-undefined-bool-conversion\ + -Wno-visibility -Wno-deprecated-declarations -Wno-non-literal-null-conversion\ + -Wno-format -Wno-distributed-object-modifiers -Wno-missing-braces\ + -Wno-unused-const-variable -Wno-unused-function -Wno-unknown-warning-option\ + -x objective-c++ + +_THEOS_TARGET_ONLY_OBJCFLAGS :="" diff --git a/projects/mtg/iOS/Reachability/Reachability 2.0.4ddg/Reachability/Reachability.h b/projects/mtg/iOS/Reachability/Reachability/Reachability.h similarity index 100% rename from projects/mtg/iOS/Reachability/Reachability 2.0.4ddg/Reachability/Reachability.h rename to projects/mtg/iOS/Reachability/Reachability/Reachability.h diff --git a/projects/mtg/iOS/Reachability/Reachability 2.0.4ddg/Reachability/Reachability.m b/projects/mtg/iOS/Reachability/Reachability/Reachability.m similarity index 99% rename from projects/mtg/iOS/Reachability/Reachability 2.0.4ddg/Reachability/Reachability.m rename to projects/mtg/iOS/Reachability/Reachability/Reachability.m index 05ed2692f..257d5d9a1 100644 --- a/projects/mtg/iOS/Reachability/Reachability 2.0.4ddg/Reachability/Reachability.m +++ b/projects/mtg/iOS/Reachability/Reachability/Reachability.m @@ -180,7 +180,7 @@ static void logNetworkStatus_(const char *name, int line, NetworkStatus status) #define logNetworkStatus(status) #endif -@interface Reachability (private) +@interface Reachability () - (NetworkStatus) networkStatusForFlags: (SCNetworkReachabilityFlags) flags; diff --git a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/._.DS_Store b/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/._.DS_Store deleted file mode 100644 index 460d887a2..000000000 Binary files a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/._.DS_Store and /dev/null differ diff --git a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/._.DS_Store b/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/._.DS_Store deleted file mode 100644 index 460d887a2..000000000 Binary files a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/._.DS_Store and /dev/null differ diff --git a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/._Airport.png b/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/._Airport.png deleted file mode 100644 index bfd971348..000000000 Binary files a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/._Airport.png and /dev/null differ diff --git a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/._Default.png b/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/._Default.png deleted file mode 100644 index 40fb6c343..000000000 Binary files a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/._Default.png and /dev/null differ diff --git a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/._Network.png b/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/._Network.png deleted file mode 100644 index 35682fa90..000000000 Binary files a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/._Network.png and /dev/null differ diff --git a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/._WWAN5.png b/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/._WWAN5.png deleted file mode 100644 index d8369e0b2..000000000 Binary files a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/._WWAN5.png and /dev/null differ diff --git a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/._icon.png b/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/._icon.png deleted file mode 100644 index 3248fe194..000000000 Binary files a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/._icon.png and /dev/null differ diff --git a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/._red.png b/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/._red.png deleted file mode 100644 index 27ed6e4e3..000000000 Binary files a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/._red.png and /dev/null differ diff --git a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/._stop-32.png b/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/._stop-32.png deleted file mode 100644 index 3eddbdfcc..000000000 Binary files a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/._stop-32.png and /dev/null differ diff --git a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/Classes/._ReachabilityAppDelegate.h b/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/Classes/._ReachabilityAppDelegate.h deleted file mode 100644 index 456136c51..000000000 Binary files a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/Classes/._ReachabilityAppDelegate.h and /dev/null differ diff --git a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/Classes/._ReachabilityAppDelegate.m b/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/Classes/._ReachabilityAppDelegate.m deleted file mode 100644 index 6d4e1fc8f..000000000 Binary files a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/DDG Reachability/Classes/._ReachabilityAppDelegate.m and /dev/null differ diff --git a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/Reachability/._Reachability.h b/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/Reachability/._Reachability.h deleted file mode 100644 index 2f77ca571..000000000 Binary files a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/Reachability/._Reachability.h and /dev/null differ diff --git a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/Reachability/._Reachability.m b/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/Reachability/._Reachability.m deleted file mode 100644 index c20617b41..000000000 Binary files a/projects/mtg/iOS/Reachability/__MACOSX/Reachability 2.0.4ddg/Reachability/._Reachability.m and /dev/null differ diff --git a/projects/mtg/Default-568h@2x.png b/projects/mtg/iOS/Resources/Default-568h@2x.png similarity index 100% rename from projects/mtg/Default-568h@2x.png rename to projects/mtg/iOS/Resources/Default-568h@2x.png diff --git a/projects/mtg/Default-Landscape.png b/projects/mtg/iOS/Resources/Default-Landscape.png similarity index 100% rename from projects/mtg/Default-Landscape.png rename to projects/mtg/iOS/Resources/Default-Landscape.png diff --git a/projects/mtg/Default-Landscape~ipad.png b/projects/mtg/iOS/Resources/Default-Landscape~ipad.png similarity index 100% rename from projects/mtg/Default-Landscape~ipad.png rename to projects/mtg/iOS/Resources/Default-Landscape~ipad.png diff --git a/projects/mtg/Default-Portrait.png b/projects/mtg/iOS/Resources/Default-Portrait.png similarity index 100% rename from projects/mtg/Default-Portrait.png rename to projects/mtg/iOS/Resources/Default-Portrait.png diff --git a/projects/mtg/Default-Portrait~ipad.png b/projects/mtg/iOS/Resources/Default-Portrait~ipad.png similarity index 100% rename from projects/mtg/Default-Portrait~ipad.png rename to projects/mtg/iOS/Resources/Default-Portrait~ipad.png diff --git a/projects/mtg/Default.png b/projects/mtg/iOS/Resources/Default.png similarity index 100% rename from projects/mtg/Default.png rename to projects/mtg/iOS/Resources/Default.png diff --git a/projects/mtg/Default@2x.png b/projects/mtg/iOS/Resources/Default@2x.png similarity index 100% rename from projects/mtg/Default@2x.png rename to projects/mtg/iOS/Resources/Default@2x.png diff --git a/projects/mtg/iOS/Resources/EAGLViewController.xib b/projects/mtg/iOS/Resources/EAGLViewController.xib new file mode 100755 index 000000000..81b2d2bac --- /dev/null +++ b/projects/mtg/iOS/Resources/EAGLViewController.xib @@ -0,0 +1,333 @@ + + + + 800 + 10D573 + 762 + 1038.29 + 460.00 + + YES + + YES + + + YES + + + + YES + + + + YES + + + YES + + + + YES + + IBFilesOwner + IBIPadFramework + + + IBFirstResponder + IBIPadFramework + + + + + YES + + + + YES + + 0 + + + + + + -1 + + + EAGL View Controller + + + -2 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + + + YES + EAGLViewController + UIResponder + + + + YES + + + YES + + + + + YES + + + YES + + + + 3 + + + + YES + + EAGLViewController + UIViewController + + IBProjectSource + Classes/EAGLViewController.h + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSNetServices.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPort.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSStream.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSXMLParser.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CAAnimation.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CALayer.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIResponder + NSObject + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UINavigationController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UIPopoverController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UISplitViewController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + + 0 + IBIPadFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + wagic.xcodeproj + 3 + 87 + + diff --git a/projects/mtg/iOS/Resources/Info.plist b/projects/mtg/iOS/Resources/Info.plist new file mode 100644 index 000000000..b8ab0609c Binary files /dev/null and b/projects/mtg/iOS/Resources/Info.plist differ diff --git a/projects/mtg/iOS/Resources/MainWindow.xib b/projects/mtg/iOS/Resources/MainWindow.xib new file mode 100755 index 000000000..32b0a474d --- /dev/null +++ b/projects/mtg/iOS/Resources/MainWindow.xib @@ -0,0 +1,465 @@ + + + + 1056 + 10H574 + 823 + 1038.35 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 132 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBIPadFramework + + + IBFirstResponder + IBIPadFramework + + + IBIPadFramework + + + + 2 + + + 1 + + IBIPadFramework + NO + + + + 292 + {768, 1024} + + 1 + MSAxIDEAA + + NO + NO + IBIPadFramework + YES + YES + + + + + YES + + + window + + + + 7 + + + + delegate + + + + 8 + + + + glViewController + + + + 12 + + + + + YES + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 2 + + + YES + + + + + 6 + + + + + 11 + + + EAGL View Controller + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 11.CustomClassName + 11.IBEditorWindowLastContentRect + 11.IBPluginDependency + 2.IBEditorWindowLastContentRect + 2.IBPluginDependency + 2.IBViewBoundsToFrameTransform + 6.CustomClassName + 6.IBPluginDependency + + + YES + UIApplication + UIResponder + EAGLViewController + {{-4, -150}, {500, 698}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + {{0, 4}, {783, 852}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAAAAAAAAxH+AAA + + wagicAppDelegate + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 12 + + + + YES + + EAGLViewController + UIViewController + + IBProjectSource + Classes/EAGLViewController.h + + + + wagicAppDelegate + NSObject + + YES + + YES + glViewController + window + + + YES + EAGLViewController + UIWindow + + + + YES + + YES + glViewController + window + + + YES + + glViewController + EAGLViewController + + + window + UIWindow + + + + + IBProjectSource + Classes/wagicAppDelegate.h + + + + wagicAppDelegate + NSObject + + IBUserSource + + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CAAnimation.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CALayer.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIApplication + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIApplication.h + + + + UIResponder + NSObject + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIPrintFormatter.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UINavigationController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UIPopoverController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UISplitViewController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + UIWindow + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIWindow.h + + + + + 0 + IBIPadFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + wagic.xcodeproj + 3 + 132 + + diff --git a/projects/mtg/iOS/Resources/ResourceRules.plist b/projects/mtg/iOS/Resources/ResourceRules.plist new file mode 100644 index 000000000..e7ec329dc --- /dev/null +++ b/projects/mtg/iOS/Resources/ResourceRules.plist @@ -0,0 +1,25 @@ + + + + + rules + + .* + + Info.plist + + omit + + weight + 10 + + ResourceRules.plist + + omit + + weight + 100 + + + + diff --git a/projects/mtg/iOS/Resources/wagic-64x64.png b/projects/mtg/iOS/Resources/wagic-64x64.png new file mode 100644 index 000000000..b54e9a716 Binary files /dev/null and b/projects/mtg/iOS/Resources/wagic-64x64.png differ diff --git a/projects/mtg/iOS/SoundManager/MyOpenALSupport.c b/projects/mtg/iOS/SoundManager/MyOpenALSupport.c index 51265e1af..4a51223d9 100755 --- a/projects/mtg/iOS/SoundManager/MyOpenALSupport.c +++ b/projects/mtg/iOS/SoundManager/MyOpenALSupport.c @@ -73,66 +73,67 @@ void* MyGetOpenALAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *out void* theData = NULL; AudioStreamBasicDescription theOutputFormat; - // Open a file with ExtAudioFileOpen() - err = ExtAudioFileOpenURL(inFileURL, &extRef); - if(err) { printf("MyGetOpenALAudioData: ExtAudioFileOpenURL FAILED, Error = %ld\n", err); goto Exit; } - - // Get the audio data format - err = ExtAudioFileGetProperty(extRef, kExtAudioFileProperty_FileDataFormat, &thePropertySize, &theFileFormat); - if(err) { printf("MyGetOpenALAudioData: ExtAudioFileGetProperty(kExtAudioFileProperty_FileDataFormat) FAILED, Error = %ld\n", err); goto Exit; } - if (theFileFormat.mChannelsPerFrame > 2) { printf("MyGetOpenALAudioData - Unsupported Format, channel count is greater than stereo\n"); goto Exit;} + do { + // Open a file with ExtAudioFileOpen() + err = ExtAudioFileOpenURL(inFileURL, &extRef); + if(err) { printf("MyGetOpenALAudioData: ExtAudioFileOpenURL FAILED, Error = %ld\n", err); break; } - // Set the client format to 16 bit signed integer (native-endian) data - // Maintain the channel count and sample rate of the original source format - theOutputFormat.mSampleRate = theFileFormat.mSampleRate; - theOutputFormat.mChannelsPerFrame = theFileFormat.mChannelsPerFrame; + // Get the audio data format + err = ExtAudioFileGetProperty(extRef, kExtAudioFileProperty_FileDataFormat, &thePropertySize, &theFileFormat); + if(err) { printf("MyGetOpenALAudioData: ExtAudioFileGetProperty(kExtAudioFileProperty_FileDataFormat) FAILED, Error = %ld\n", err); break; } + if (theFileFormat.mChannelsPerFrame > 2) { printf("MyGetOpenALAudioData - Unsupported Format, channel count is greater than stereo\n"); break;} - theOutputFormat.mFormatID = kAudioFormatLinearPCM; - theOutputFormat.mBytesPerPacket = 2 * theOutputFormat.mChannelsPerFrame; - theOutputFormat.mFramesPerPacket = 1; - theOutputFormat.mBytesPerFrame = 2 * theOutputFormat.mChannelsPerFrame; - theOutputFormat.mBitsPerChannel = 16; - theOutputFormat.mFormatFlags = kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked | kAudioFormatFlagIsSignedInteger; + // Set the client format to 16 bit signed integer (native-endian) data + // Maintain the channel count and sample rate of the original source format + theOutputFormat.mSampleRate = theFileFormat.mSampleRate; + theOutputFormat.mChannelsPerFrame = theFileFormat.mChannelsPerFrame; + + theOutputFormat.mFormatID = kAudioFormatLinearPCM; + theOutputFormat.mBytesPerPacket = 2 * theOutputFormat.mChannelsPerFrame; + theOutputFormat.mFramesPerPacket = 1; + theOutputFormat.mBytesPerFrame = 2 * theOutputFormat.mChannelsPerFrame; + theOutputFormat.mBitsPerChannel = 16; + theOutputFormat.mFormatFlags = kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked | kAudioFormatFlagIsSignedInteger; + + // Set the desired client (output) data format + err = ExtAudioFileSetProperty(extRef, kExtAudioFileProperty_ClientDataFormat, sizeof(theOutputFormat), &theOutputFormat); + if(err) { printf("MyGetOpenALAudioData: ExtAudioFileSetProperty(kExtAudioFileProperty_ClientDataFormat) FAILED, Error = %ld\n", err); break; } + + // Get the total frame count + thePropertySize = sizeof(theFileLengthInFrames); + err = ExtAudioFileGetProperty(extRef, kExtAudioFileProperty_FileLengthFrames, &thePropertySize, &theFileLengthInFrames); + if(err) { printf("MyGetOpenALAudioData: ExtAudioFileGetProperty(kExtAudioFileProperty_FileLengthFrames) FAILED, Error = %ld\n", err); break; } + + // Read all the data into memory + UInt32 dataSize = theFileLengthInFrames * theOutputFormat.mBytesPerFrame;; + theData = malloc(dataSize); + if (theData) + { + AudioBufferList theDataBuffer; + theDataBuffer.mNumberBuffers = 1; + theDataBuffer.mBuffers[0].mDataByteSize = dataSize; + theDataBuffer.mBuffers[0].mNumberChannels = theOutputFormat.mChannelsPerFrame; + theDataBuffer.mBuffers[0].mData = theData; + + // Read the data into an AudioBufferList + err = ExtAudioFileRead(extRef, (UInt32*)&theFileLengthInFrames, &theDataBuffer); + if(err == noErr) + { + // success + *outDataSize = (ALsizei)dataSize; + *outDataFormat = (theOutputFormat.mChannelsPerFrame > 1) ? AL_FORMAT_STEREO16 : AL_FORMAT_MONO16; + *outSampleRate = (ALsizei)theOutputFormat.mSampleRate; + } + else + { + // failure + free (theData); + theData = NULL; // make sure to return NULL + printf("MyGetOpenALAudioData: ExtAudioFileRead FAILED, Error = %ld\n", err); break; + } + } + } while(0); - // Set the desired client (output) data format - err = ExtAudioFileSetProperty(extRef, kExtAudioFileProperty_ClientDataFormat, sizeof(theOutputFormat), &theOutputFormat); - if(err) { printf("MyGetOpenALAudioData: ExtAudioFileSetProperty(kExtAudioFileProperty_ClientDataFormat) FAILED, Error = %ld\n", err); goto Exit; } - - // Get the total frame count - thePropertySize = sizeof(theFileLengthInFrames); - err = ExtAudioFileGetProperty(extRef, kExtAudioFileProperty_FileLengthFrames, &thePropertySize, &theFileLengthInFrames); - if(err) { printf("MyGetOpenALAudioData: ExtAudioFileGetProperty(kExtAudioFileProperty_FileLengthFrames) FAILED, Error = %ld\n", err); goto Exit; } - - // Read all the data into memory - UInt32 dataSize = theFileLengthInFrames * theOutputFormat.mBytesPerFrame;; - theData = malloc(dataSize); - if (theData) - { - AudioBufferList theDataBuffer; - theDataBuffer.mNumberBuffers = 1; - theDataBuffer.mBuffers[0].mDataByteSize = dataSize; - theDataBuffer.mBuffers[0].mNumberChannels = theOutputFormat.mChannelsPerFrame; - theDataBuffer.mBuffers[0].mData = theData; - - // Read the data into an AudioBufferList - err = ExtAudioFileRead(extRef, (UInt32*)&theFileLengthInFrames, &theDataBuffer); - if(err == noErr) - { - // success - *outDataSize = (ALsizei)dataSize; - *outDataFormat = (theOutputFormat.mChannelsPerFrame > 1) ? AL_FORMAT_STEREO16 : AL_FORMAT_MONO16; - *outSampleRate = (ALsizei)theOutputFormat.mSampleRate; - } - else - { - // failure - free (theData); - theData = NULL; // make sure to return NULL - printf("MyGetOpenALAudioData: ExtAudioFileRead FAILED, Error = %ld\n", err); goto Exit; - } - } - -Exit: // Dispose the ExtAudioFileRef, it is no longer needed if (extRef) ExtAudioFileDispose(extRef); return theData; diff --git a/projects/mtg/iOS/SoundManager/SoundManager.m b/projects/mtg/iOS/SoundManager/SoundManager.m index d6c79cc32..22ad35d6b 100644 --- a/projects/mtg/iOS/SoundManager/SoundManager.m +++ b/projects/mtg/iOS/SoundManager/SoundManager.m @@ -206,7 +206,7 @@ SYNTHESIZE_SINGLETON_FOR_CLASS(SoundManager); ALenum format; ALsizei size; ALsizei freq; - ALvoid *data; + ALvoid *data = 0; alError = AL_NO_ERROR; NSBundle *bundle = [NSBundle mainBundle]; @@ -780,8 +780,6 @@ SYNTHESIZE_SINGLETON_FOR_CLASS(SoundManager); - (void)setActivated:(BOOL)aState { - OSStatus result; - if(aState) { NSLog(@"INFO - SoundManager: OpenAL Active"); diff --git a/projects/mtg/iOS/UI/WagicDownloadProgressViewController.m b/projects/mtg/iOS/UI/WagicDownloadProgressViewController.m index 480145397..fb0274c77 100644 --- a/projects/mtg/iOS/UI/WagicDownloadProgressViewController.m +++ b/projects/mtg/iOS/UI/WagicDownloadProgressViewController.m @@ -21,8 +21,6 @@ #define WAGIC_IOS_RESOURCE_NAME WAGIC_CORE_VERSION_STRING "_iOS.zip" -static NSString *kDownloadUrlPath = @"http://wagic.googlecode.com/files/"; - - (void) handleFailedDownload: (NSNotification *) sender { NSString *downloadType = [sender object]; @@ -103,6 +101,7 @@ static NSString *kDownloadUrlPath = @"http://wagic.googlecode.com/files/"; NSURL *url = nil; NSString *downloadFilename = nil; // determine which file to download + kDownloadFileName = [NSString stringWithCString: WAGIC_RESOURCE_NAME encoding:NSUTF8StringEncoding]; kDownloadIosUpdateFileName = [NSString stringWithCString: WAGIC_IOS_RESOURCE_NAME encoding:NSUTF8StringEncoding]; @@ -118,8 +117,9 @@ static NSString *kDownloadUrlPath = @"http://wagic.googlecode.com/files/"; { NSLog( @"Not Implemented for type: %@", downloadType); } + + url = [NSURL URLWithString: [NSString stringWithCString: WAGIC_RESOURCE_URL encoding:NSUTF8StringEncoding]]; - url = [NSURL URLWithString: [NSString stringWithFormat: @"%@/%@", kDownloadUrlPath, downloadFilename]]; NSString *downloadFilePath = [systemResourceDirectory stringByAppendingString: [NSString stringWithFormat: @"/%@", downloadFilename]]; NSLog(@"Downloading %@", [url absoluteURL]); diff --git a/projects/mtg/ZipArchive.mm b/projects/mtg/iOS/ZipArchive/ZipArchive.mm similarity index 100% rename from projects/mtg/ZipArchive.mm rename to projects/mtg/iOS/ZipArchive/ZipArchive.mm diff --git a/projects/mtg/iOS/asi-http-request/ASIHTTPRequest.m b/projects/mtg/iOS/asi-http-request/ASIHTTPRequest.m index 77eac076c..cc8ba445a 100644 --- a/projects/mtg/iOS/asi-http-request/ASIHTTPRequest.m +++ b/projects/mtg/iOS/asi-http-request/ASIHTTPRequest.m @@ -573,7 +573,7 @@ static NSOperationQueue *sharedQueue = nil; return; } if ([self shouldStreamPostDataFromDisk]) { - [[self postBodyWriteStream] write:[data bytes] maxLength:[data length]]; + [[self postBodyWriteStream] write:(const uint8_t *)[data bytes] maxLength:[data length]]; } else { [[self postBody] appendData:data]; } @@ -3367,7 +3367,7 @@ static NSOperationQueue *sharedQueue = nil; [[self inflatedFileDownloadOutputStream] open]; } - [[self inflatedFileDownloadOutputStream] write:[inflatedData bytes] maxLength:[inflatedData length]]; + [[self inflatedFileDownloadOutputStream] write:(const uint8_t *)[inflatedData bytes] maxLength:[inflatedData length]]; } diff --git a/projects/mtg/iOS/control b/projects/mtg/iOS/control new file mode 100644 index 000000000..5e3a20f29 --- /dev/null +++ b/projects/mtg/iOS/control @@ -0,0 +1,12 @@ +Package: net.wagic +Name: wagic +Depends: +Version: 0.19.2 +Architecture: iphoneos-arm +Description: Wagic is an heroic fantasy collectible trading card game + In Wagic, you play/Users/ybi/Documents/wagic/tools/Makefile.backup as a wizard against the CPU with your army of minions. You start the game with a small collection of cards (symbolizing creatures and spells), and as you win battles against the AI, you earn credits that allow you to buy more cards and build more powerful decks. + As you play, you unlock cards and new game modes, so Wagic is much more than a simple card simulation. Wagic features several thousands of cards in the official release,but if that’s not enough for you, it is highly customizable and allows to create your own cards and mods. +Homepage: https://github.com/WagicProject/wagic +Maintainer: WagicProject +Author: WagicProject +Section: Games diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 69693794f..0912bbe9c 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -68,6 +68,7 @@ private: bool plusone = false; bool plustwo = false; bool plusthree = false; + bool other = false;//othertype:[subtype] if (!target) target = card; int multiplier = 1; if (s[0] == '-') @@ -134,6 +135,30 @@ private: size_t pThree = s.find("plusthree"); s.erase(pThree,pThree + 9); } + if(s.find("othertype") != string::npos) + { + other = true; + size_t oth = s.find("othertype"); + s.erase(oth,oth + 5); + } + if(s.find("otherpower") != string::npos) + { + other = true; + size_t otp = s.find("otherpower"); + s.erase(otp,otp + 5); + } + if(s.find("othertoughness") != string::npos) + { + other = true; + size_t ott = s.find("othertoughness"); + s.erase(ott,ott + 5); + } + if(s.find("otherconvertedcost") != string::npos) + { + other = true; + size_t otc = s.find("otherconvertedcost"); + s.erase(otc,otc + 5); + } if(s == "prex") { ManaCost * cX = card->controller()->getManaPool()->Diff(card->getManaCost()); @@ -170,7 +195,10 @@ private: } else if (s == "manacost") { - intValue = target->getManaCost()->getConvertedCost(); + if (target->currentZone == target->controller()->game->stack)//X is 0 except if it's on the stack + intValue = target->myconvertedcost + target->castX; + else + intValue = target->myconvertedcost; } else if (s == "azorius")//devotion blue white { @@ -179,8 +207,8 @@ private: for (int i = 0; i < 2; i++) { Player * dp = card->getObserver()->players[i]; - MTGGameZone * dzones[] = { dp->game->inPlay, dp->game->graveyard, dp->game->hand, dp->game->library }; - for (int k = 0; k < 4; k++) + MTGGameZone * dzones[] = { dp->game->inPlay, dp->game->graveyard, dp->game->hand, dp->game->library, dp->game->exile }; + for (int k = 0; k < 5; k++) { MTGGameZone * zone = dzones[k]; if (dtc->targetsZone(zone, card)&&dp == card->controller()) @@ -199,8 +227,8 @@ private: for (int i = 0; i < 2; i++) { Player * dp = card->getObserver()->players[i]; - MTGGameZone * dzones[] = { dp->game->inPlay, dp->game->graveyard, dp->game->hand, dp->game->library }; - for (int k = 0; k < 4; k++) + MTGGameZone * dzones[] = { dp->game->inPlay, dp->game->graveyard, dp->game->hand, dp->game->library, dp->game->exile }; + for (int k = 0; k < 5; k++) { MTGGameZone * zone = dzones[k]; if (dtc->targetsZone(zone, card)&&dp == card->controller()) @@ -219,8 +247,8 @@ private: for (int i = 0; i < 2; i++) { Player * dp = card->getObserver()->players[i]; - MTGGameZone * dzones[] = { dp->game->inPlay, dp->game->graveyard, dp->game->hand, dp->game->library }; - for (int k = 0; k < 4; k++) + MTGGameZone * dzones[] = { dp->game->inPlay, dp->game->graveyard, dp->game->hand, dp->game->library, dp->game->exile }; + for (int k = 0; k < 5; k++) { MTGGameZone * zone = dzones[k]; if (dtc->targetsZone(zone, card)&&dp == card->controller()) @@ -239,8 +267,8 @@ private: for (int i = 0; i < 2; i++) { Player * dp = card->getObserver()->players[i]; - MTGGameZone * dzones[] = { dp->game->inPlay, dp->game->graveyard, dp->game->hand, dp->game->library }; - for (int k = 0; k < 4; k++) + MTGGameZone * dzones[] = { dp->game->inPlay, dp->game->graveyard, dp->game->hand, dp->game->library, dp->game->exile }; + for (int k = 0; k < 5; k++) { MTGGameZone * zone = dzones[k]; if (dtc->targetsZone(zone, card)&&dp == card->controller()) @@ -259,8 +287,8 @@ private: for (int i = 0; i < 2; i++) { Player * dp = card->getObserver()->players[i]; - MTGGameZone * dzones[] = { dp->game->inPlay, dp->game->graveyard, dp->game->hand, dp->game->library }; - for (int k = 0; k < 4; k++) + MTGGameZone * dzones[] = { dp->game->inPlay, dp->game->graveyard, dp->game->hand, dp->game->library, dp->game->exile }; + for (int k = 0; k < 5; k++) { MTGGameZone * zone = dzones[k]; if (dtc->targetsZone(zone, card)&&dp == card->controller()) @@ -279,8 +307,8 @@ private: for (int i = 0; i < 2; i++) { Player * dp = card->getObserver()->players[i]; - MTGGameZone * dzones[] = { dp->game->inPlay, dp->game->graveyard, dp->game->hand, dp->game->library }; - for (int k = 0; k < 4; k++) + MTGGameZone * dzones[] = { dp->game->inPlay, dp->game->graveyard, dp->game->hand, dp->game->library, dp->game->exile }; + for (int k = 0; k < 5; k++) { MTGGameZone * zone = dzones[k]; if (dtc->targetsZone(zone, card)&&dp == card->controller()) @@ -299,8 +327,8 @@ private: for (int i = 0; i < 2; i++) { Player * dp = card->getObserver()->players[i]; - MTGGameZone * dzones[] = { dp->game->inPlay, dp->game->graveyard, dp->game->hand, dp->game->library }; - for (int k = 0; k < 4; k++) + MTGGameZone * dzones[] = { dp->game->inPlay, dp->game->graveyard, dp->game->hand, dp->game->library, dp->game->exile }; + for (int k = 0; k < 5; k++) { MTGGameZone * zone = dzones[k]; if (dtc->targetsZone(zone, card)&&dp == card->controller()) @@ -319,8 +347,8 @@ private: for (int i = 0; i < 2; i++) { Player * dp = card->getObserver()->players[i]; - MTGGameZone * dzones[] = { dp->game->inPlay, dp->game->graveyard, dp->game->hand, dp->game->library }; - for (int k = 0; k < 4; k++) + MTGGameZone * dzones[] = { dp->game->inPlay, dp->game->graveyard, dp->game->hand, dp->game->library, dp->game->exile }; + for (int k = 0; k < 5; k++) { MTGGameZone * zone = dzones[k]; if (dtc->targetsZone(zone, card)&&dp == card->controller()) @@ -339,8 +367,8 @@ private: for (int i = 0; i < 2; i++) { Player * dp = card->getObserver()->players[i]; - MTGGameZone * dzones[] = { dp->game->inPlay, dp->game->graveyard, dp->game->hand, dp->game->library }; - for (int k = 0; k < 4; k++) + MTGGameZone * dzones[] = { dp->game->inPlay, dp->game->graveyard, dp->game->hand, dp->game->library, dp->game->exile }; + for (int k = 0; k < 5; k++) { MTGGameZone * zone = dzones[k]; if (dtc->targetsZone(zone, card)&&dp == card->controller()) @@ -359,8 +387,8 @@ private: for (int i = 0; i < 2; i++) { Player * dp = card->getObserver()->players[i]; - MTGGameZone * dzones[] = { dp->game->inPlay, dp->game->graveyard, dp->game->hand, dp->game->library }; - for (int k = 0; k < 4; k++) + MTGGameZone * dzones[] = { dp->game->inPlay, dp->game->graveyard, dp->game->hand, dp->game->library, dp->game->exile }; + for (int k = 0; k < 5; k++) { MTGGameZone * zone = dzones[k]; if (dtc->targetsZone(zone, card)&&dp == card->controller()) @@ -392,11 +420,12 @@ private: } TargetChooserFactory tf(card->getObserver()); TargetChooser * tc = tf.createTargetChooser(theType.c_str(),NULL); + tc->other = other; for (int i = 0; i < 2; i++) { Player * p = card->getObserver()->players[i]; - MTGGameZone * zones[] = { p->game->inPlay, p->game->graveyard, p->game->hand, p->game->library }; - for (int k = 0; k < 4; k++) + MTGGameZone * zones[] = { p->game->inPlay, p->game->graveyard, p->game->hand, p->game->library, p->game->exile }; + for (int k = 0; k < 5; k++) { MTGGameZone * zone = zones[k]; if (tc->targetsZone(zone, card)) @@ -482,12 +511,13 @@ private: } TargetChooserFactory tf(card->getObserver()); TargetChooser * tc = tf.createTargetChooser(theType.c_str(),NULL); + tc->other = other; int check = 0; for (int i = 0; i < 2; i++) { Player * p = card->getObserver()->players[i]; - MTGGameZone * zones[] = { p->game->battlefield, p->game->graveyard, p->game->hand, p->game->library }; - for (int k = 0; k < 4; k++) + MTGGameZone * zones[] = { p->game->battlefield, p->game->graveyard, p->game->hand, p->game->library, p->game->exile }; + for (int k = 0; k < 5; k++) { MTGGameZone * zone = zones[k]; if(tc->targetsZone(zone,target)) @@ -526,6 +556,15 @@ private: intValue = card->previous->previous->sunburst; } } + else if (s == "converge") + { + intValue = 0; + for (int i = Constants::MTG_COLOR_GREEN; i <= Constants::MTG_COLOR_WHITE; ++i) + { + if(card->getManaCost()->getManaUsedToCast()->hasColor(i)) + intValue +=1; + } + } else if (s == "targetedcurses") { if(card->playerTarget) @@ -535,6 +574,16 @@ private: { intValue = target->controller()->life; } + else if (s == "startinglife") + { + intValue = target->controller()->initLife; + } + else if (s == "abundantlife")//current life is morethan or equal to starting life + { + intValue = 0; + if (target->controller()->life >= target->controller()->initLife) + intValue = 1; + } else if (s == "highestlifetotal") { intValue = target->controller()->life <= target->controller()->opponent()->life? target->controller()->opponent()->life:target->controller()->life; @@ -599,13 +648,17 @@ private: { intValue = target->controller()->opponent()->drawCounter; } + else if (s == "epicactivated") + { + intValue = target->controller()->epic; + } else if (s == "p" || s == "power") { - intValue = target->getPower(); + intValue = target->getCurrentPower(); } else if (s == "t" || s == "toughness") { - intValue = target->getToughness(); + intValue = target->getCurrentToughness(); } else if (s == "kicked") { @@ -615,6 +668,116 @@ private: { intValue = target->controller()->handsize; } + else if (s == "olandg") + { + intValue = 0; + for (size_t i = 0; i < target->getObserver()->mLayers->actionLayer()->manaObjects.size(); i++) + {//start + MTGAbility * a = ((MTGAbility *) target->getObserver()->mLayers->actionLayer()->manaObjects[i]); + AManaProducer * amp = dynamic_cast (a); + if (amp && amp->source->isLand() && amp->source->controller() == target->controller()->opponent() && amp->output->hasColor(1)) + intValue = 1; + }//end + } + else if (s == "olandu") + { + intValue = 0; + for (size_t i = 0; i < target->getObserver()->mLayers->actionLayer()->manaObjects.size(); i++) + {//start + MTGAbility * a = ((MTGAbility *) target->getObserver()->mLayers->actionLayer()->manaObjects[i]); + AManaProducer * amp = dynamic_cast (a); + if (amp && amp->source->isLand() && amp->source->controller() == target->controller()->opponent() && amp->output->hasColor(2)) + intValue = 1; + }//end + } + else if (s == "olandr") + { + intValue = 0; + for (size_t i = 0; i < target->getObserver()->mLayers->actionLayer()->manaObjects.size(); i++) + {//start + MTGAbility * a = ((MTGAbility *) target->getObserver()->mLayers->actionLayer()->manaObjects[i]); + AManaProducer * amp = dynamic_cast (a); + if (amp && amp->source->isLand() && amp->source->controller() == target->controller()->opponent() && amp->output->hasColor(3)) + intValue = 1; + }//end + } + else if (s == "olandb") + { + intValue = 0; + for (size_t i = 0; i < target->getObserver()->mLayers->actionLayer()->manaObjects.size(); i++) + {//start + MTGAbility * a = ((MTGAbility *) target->getObserver()->mLayers->actionLayer()->manaObjects[i]); + AManaProducer * amp = dynamic_cast (a); + if (amp && amp->source->isLand() && amp->source->controller() == target->controller()->opponent() && amp->output->hasColor(4)) + intValue = 1; + }//end + } + else if (s == "olandw") + { + intValue = 0; + for (size_t i = 0; i < target->getObserver()->mLayers->actionLayer()->manaObjects.size(); i++) + {//start + MTGAbility * a = ((MTGAbility *) target->getObserver()->mLayers->actionLayer()->manaObjects[i]); + AManaProducer * amp = dynamic_cast (a); + if (amp && amp->source->isLand() && amp->source->controller() == target->controller()->opponent() && amp->output->hasColor(5)) + intValue = 1; + }//end + } + else if (s == "plandg") + { + intValue = 0; + for (size_t i = 0; i < target->getObserver()->mLayers->actionLayer()->manaObjects.size(); i++) + {//start + MTGAbility * a = ((MTGAbility *) target->getObserver()->mLayers->actionLayer()->manaObjects[i]); + AManaProducer * amp = dynamic_cast (a); + if (amp && amp->source->isLand() && amp->source->controller() == target->controller() && amp->output->hasColor(1)) + intValue = 1; + }//end + } + else if (s == "plandu") + { + intValue = 0; + for (size_t i = 0; i < target->getObserver()->mLayers->actionLayer()->manaObjects.size(); i++) + {//start + MTGAbility * a = ((MTGAbility *) target->getObserver()->mLayers->actionLayer()->manaObjects[i]); + AManaProducer * amp = dynamic_cast (a); + if (amp && amp->source->isLand() && amp->source->controller() == target->controller() && amp->output->hasColor(2)) + intValue = 1; + }//end + } + else if (s == "plandr") + { + intValue = 0; + for (size_t i = 0; i < target->getObserver()->mLayers->actionLayer()->manaObjects.size(); i++) + {//start + MTGAbility * a = ((MTGAbility *) target->getObserver()->mLayers->actionLayer()->manaObjects[i]); + AManaProducer * amp = dynamic_cast (a); + if (amp && amp->source->isLand() && amp->source->controller() == target->controller() && amp->output->hasColor(3)) + intValue = 1; + }//end + } + else if (s == "plandb") + { + intValue = 0; + for (size_t i = 0; i < target->getObserver()->mLayers->actionLayer()->manaObjects.size(); i++) + {//start + MTGAbility * a = ((MTGAbility *) target->getObserver()->mLayers->actionLayer()->manaObjects[i]); + AManaProducer * amp = dynamic_cast (a); + if (amp && amp->source->isLand() && amp->source->controller() == target->controller() && amp->output->hasColor(4)) + intValue = 1; + }//end + } + else if (s == "plandw") + { + intValue = 0; + for (size_t i = 0; i < target->getObserver()->mLayers->actionLayer()->manaObjects.size(); i++) + {//start + MTGAbility * a = ((MTGAbility *) target->getObserver()->mLayers->actionLayer()->manaObjects[i]); + AManaProducer * amp = dynamic_cast (a); + if (amp && amp->source->isLand() && amp->source->controller() == target->controller() && amp->output->hasColor(5)) + intValue = 1; + }//end + } else if (s == "controllerturn")//intvalue = 1 if its your turn this(variable{controllerturn}) { intValue = 0; @@ -635,6 +798,191 @@ private: { intValue = target->controller()->opponent()->game->hand->nb_cards; } + else if (s == "urzatron")//Urza lands + { + if(card->controller()->game->battlefield->hasAlias(4192) && card->controller()->game->battlefield->hasAlias(4193) && card->controller()->game->battlefield->hasAlias(4194)) + intValue = 1; + else + intValue = 0; + } + else if (s == "worshipped")//Worship + { + if(card->controller()->game->battlefield->hasType("creature")) + intValue = card->controller()->life; + else + intValue = 0; + } + else if (s == "pancientooze")//Ancient Ooze + { + intValue = 0; + for (int j = card->controller()->game->inPlay->nb_cards - 1; j >= 0; --j) + { + if (card->controller()->game->inPlay->cards[j]->hasType(Subtypes::TYPE_CREATURE) && card->controller()->game->inPlay->cards[j] != card) + { + intValue += card->controller()->game->inPlay->cards[j]->getManaCost()->getConvertedCost(); + } + } + } + else if (s == "pdauntless")//Dauntless Dourbark + { + intValue = 0; + for (int j = card->controller()->game->battlefield->nb_cards - 1; j >= 0; --j) + { + if (card->controller()->game->battlefield->cards[j]->hasType("forest")) + { + intValue += 1; + } + if (card->controller()->game->battlefield->cards[j]->hasType("treefolk")) + { + intValue += 1; + } + } + } + else if (s == "pbasiclandtypes")//Basic Land types + { + intValue = 0; + int forest = 0, plains = 0, swamp = 0, island = 0, mountain = 0; + for (int j = card->controller()->game->battlefield->nb_cards - 1; j >= 0; --j) + { + if (card->controller()->game->battlefield->cards[j]->hasType("forest")) + { + forest = 1; + } + if (card->controller()->game->battlefield->cards[j]->hasType("plains")) + { + plains = 1; + } + if (card->controller()->game->battlefield->cards[j]->hasType("swamp")) + { + swamp = 1; + } + if (card->controller()->game->battlefield->cards[j]->hasType("island")) + { + island = 1; + } + if (card->controller()->game->battlefield->cards[j]->hasType("mountain")) + { + mountain = 1; + } + } + intValue = mountain + island + forest + swamp + plains; + } + else if (s == "myname")//Name of the card you control + { + intValue = 0; + for (int i = 0; i < 2; i++) + { + Player * p = card->getObserver()->players[i]; + for (int j = p->game->battlefield->nb_cards - 1; j >= 0; --j) + { + if (p->game->battlefield->cards[j]->name == card->name && p == card->controller()) + { + intValue += 1; + } + } + } + } + else if (s == "allmyname")//Plague Rats and others + { + intValue = 0; + for (int i = 0; i < 2; i++) + { + Player * p = card->getObserver()->players[i]; + for (int j = p->game->battlefield->nb_cards - 1; j >= 0; --j) + { + if (p->game->battlefield->cards[j]->name == card->name) + { + intValue += 1; + } + } + } + } + else if (s == "pgbzombie")//Soulless One + { + intValue = 0; + for (int i = 0; i < 2; i++) + { + Player * p = card->getObserver()->players[i]; + for (int j = p->game->graveyard->nb_cards - 1; j >= 0; --j) + { + if (p->game->graveyard->cards[j]->hasType("zombie")) + { + intValue += 1; + } + } + for (int j = p->game->inPlay->nb_cards - 1; j >= 0; --j) + { + if (p->game->inPlay->cards[j]->hasType("zombie")) + { + intValue += 1; + } + } + } + } + else if (s == "pginstantsorcery")//Spellheart Chimera + { + intValue = 0; + for (int j = card->controller()->game->graveyard->nb_cards - 1; j >= 0; --j) + { + if (card->controller()->game->graveyard->cards[j]->hasType(Subtypes::TYPE_INSTANT) + ||card->controller()->game->graveyard->cards[j]->hasType(Subtypes::TYPE_SORCERY)) + { + intValue += 1; + } + } + } + else if (s == "gravecardtypes")//Tarmogoyf + { + intValue = 0; + int art = 0, cre = 0, enc = 0, ins = 0, lnd = 0, sor = 0, trb = 0, pwk = 0; + for (int i = 0; i < 2; i++) + { + Player * p = card->getObserver()->players[i]; + if(p->game->graveyard->hasType("planeswalker")) + pwk = 1; + if(p->game->graveyard->hasType("tribal")) + trb = 1; + if(p->game->graveyard->hasType("sorcery")) + sor = 1; + if(p->game->graveyard->hasType("land")) + lnd = 1; + if(p->game->graveyard->hasType("instant")) + ins = 1; + if(p->game->graveyard->hasType("enchantment")) + enc = 1; + if(p->game->graveyard->hasType("creature")) + cre = 1; + if(p->game->graveyard->hasType("artifact")) + art = 1; + } + intValue = art + cre + enc + ins + lnd + sor + trb + pwk; + } + else if (s == "morethanfourcards") + { + if(card->playerTarget) + {//blackvise + intValue = 0; + if ((card->playerTarget->game->hand->nb_cards - 4)>0) + intValue = (card->playerTarget->game->hand->nb_cards - 4); + } + else + {//viseling + intValue = 0; + if ((card->controller()->opponent()->game->hand->nb_cards - 4)>0) + intValue = (card->controller()->opponent()->game->hand->nb_cards - 4); + } + } + else if (s == "powertotalinplay")//Count Total Power of Creatures you control... Formidable + { + intValue = 0; + for (int j = card->controller()->game->inPlay->nb_cards - 1; j >= 0; --j) + { + if (card->controller()->game->inPlay->cards[j]->hasType(Subtypes::TYPE_CREATURE)) + { + intValue += card->controller()->game->inPlay->cards[j]->power; + } + } + } else { intValue = atoi(s.c_str()); @@ -958,9 +1306,9 @@ public: class TrcardDrawn: public Trigger { public: - - TrcardDrawn(GameObserver* observer, int id, MTGCardInstance * source, TargetChooser * tc,bool once = false) : - Trigger(observer, id, source,once, tc) + bool thiscontroller, thisopponent; + TrcardDrawn(GameObserver* observer, int id, MTGCardInstance * source, TargetChooser * tc,bool once = false, bool thiscontroller = false, bool thisopponent = false) : + Trigger(observer, id, source,once, tc),thiscontroller(thiscontroller),thisopponent(thisopponent) { } @@ -969,7 +1317,12 @@ public: WEventcardDraw * e = dynamic_cast (event); if (!e) return 0; if (!tc->canTarget(e->player)) return 0; - + if(thiscontroller) + if(e->player != source->controller()) + return 0; + if(thisopponent) + if(e->player == source->controller()) + return 0; return 1; } @@ -1057,8 +1410,10 @@ public: bool sourceUntapped; bool limitOnceATurn; int triggeredTurn; - TrDamaged(GameObserver* observer, int id, MTGCardInstance * source, TargetChooser * tc, TargetChooser * fromTc = NULL, int type = 0,bool sourceUntapped = false,bool limitOnceATurn = false,bool once = false) : - Trigger(observer, id, source, once, tc), fromTc(fromTc), type(type) , sourceUntapped(sourceUntapped),limitOnceATurn(limitOnceATurn) + bool thiscontroller; + bool thisopponent; + TrDamaged(GameObserver* observer, int id, MTGCardInstance * source, TargetChooser * tc, TargetChooser * fromTc = NULL, int type = 0,bool sourceUntapped = false,bool limitOnceATurn = false,bool once = false, bool thiscontroller = false, bool thisopponent = false) : + Trigger(observer, id, source, once, tc), fromTc(fromTc), type(type) , sourceUntapped(sourceUntapped),limitOnceATurn(limitOnceATurn),thiscontroller(thiscontroller),thisopponent(thisopponent) { triggeredTurn = -1; } @@ -1075,6 +1430,15 @@ public: if (fromTc && !fromTc->canTarget(e->damage->source)) return 0; if (type == 1 && e->damage->typeOfDamage != Damage::DAMAGE_COMBAT) return 0; if (type == 2 && e->damage->typeOfDamage == Damage::DAMAGE_COMBAT) return 0; + if (e->damage->target->type_as_damageable == Damageable::DAMAGEABLE_PLAYER) + { + if(thiscontroller) + if(e->damage->target != (Damageable *)source->controller()) + return 0; + if(thisopponent) + if(e->damage->target == (Damageable *)source->controller()) + return 0; + } e->damage->target->thatmuch = e->damage->damage; e->damage->source->thatmuch = e->damage->damage; this->source->thatmuch = e->damage->damage; @@ -1099,9 +1463,9 @@ class TrLifeGained: public Trigger public: TargetChooser * fromTc; int type;//this allows damagenoncombat and combatdamage to share this trigger - bool sourceUntapped; - TrLifeGained(GameObserver* observer, int id, MTGCardInstance * source, TargetChooser * tc, TargetChooser * fromTc = NULL, int type = 0,bool sourceUntapped = false,bool once = false) : - Trigger(observer, id, source, once , tc), fromTc(fromTc), type(type) , sourceUntapped(sourceUntapped) + bool sourceUntapped, thiscontroller, thisopponent; + TrLifeGained(GameObserver* observer, int id, MTGCardInstance * source, TargetChooser * tc, TargetChooser * fromTc = NULL, int type = 0,bool sourceUntapped = false,bool once = false, bool thiscontroller = false, bool thisopponent = false) : + Trigger(observer, id, source, once , tc), fromTc(fromTc), type(type) , sourceUntapped(sourceUntapped) , thiscontroller(thiscontroller) , thisopponent(thisopponent) { } @@ -1115,6 +1479,12 @@ public: if (fromTc && !fromTc->canTarget(e->player)) return 0; if (type == 1 && (e->amount > 0)) return 0; if (type == 0 && (e->amount < 0)) return 0; + if(thiscontroller) + if(e->player != source->controller()) + return 0; + if(thisopponent) + if(e->player == source->controller()) + return 0; e->player->thatmuch = abs(e->amount); this->source->thatmuch = abs(e->amount); @@ -1202,7 +1572,7 @@ public: } }; -//targetted trigger +//counter trigger class TrCounter: public Trigger { public: @@ -1324,6 +1694,16 @@ public: AAFakeAbility * clone() const; }; +class AAEPIC: public ActivatedAbility +{ +public: + string named; + AAEPIC(GameObserver* observer, int id, MTGCardInstance * source, MTGCardInstance * target,string _newName, ManaCost * cost = NULL); + int resolve(); + const string getMenuText(); + AAEPIC * clone() const; +}; + class AAFizzler: public ActivatedAbility { public: @@ -1524,7 +1904,9 @@ public: string destination; MTGAbility * andAbility; string named; - AAMover(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target, string dest,string _name, ManaCost * _cost = NULL); + bool undying; + bool persist; + AAMover(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target, string dest,string _name, ManaCost * _cost = NULL, bool undying = false, bool persist = false); MTGGameZone * destinationZone(Targetable * target = NULL); int resolve(); const string getMenuText(); @@ -1843,6 +2225,7 @@ public: assert(value < 2); _target->basicAbilities.set(ability, value > 0); + _target->modifiedbAbi += 1; return InstantAbility::addToGame(); } @@ -1855,7 +2238,10 @@ public: { MTGCardInstance * _target = (MTGCardInstance *) target; if (_target) + { _target->basicAbilities.set(ability, stateBeforeActivation); + _target->modifiedbAbi -= 1; + } return 1; } @@ -2210,49 +2596,105 @@ public: WParsedPT * wppt; string PT; bool nonstatic; + bool cda; APowerToughnessModifier(GameObserver* observer, int id, MTGCardInstance * _source, MTGCardInstance * _target, WParsedPT * wppt,string PT,bool nonstatic) : MTGAbility(observer, id, _source, _target), wppt(wppt),PT(PT),nonstatic(nonstatic) { aType = MTGAbility::STANDARD_PUMP; + cda = PT.find("cdaactive") != string::npos; } - void Update(float) + void Update(float) + { + if(!nonstatic) + return; + if(!cda || (cda && (((MTGCardInstance *) target)->isSettingBase < 1))) { - if(!nonstatic) - return; + if(((MTGCardInstance *) target)->isSwitchedPT) + ((MTGCardInstance *) target)->switchPT(false);//revert + ((MTGCardInstance *) target)->power -= wppt->power.getValue(); ((MTGCardInstance *) target)->addToToughness(-wppt->toughness.getValue()); if(PT.size()) - { - SAFE_DELETE(wppt); - wppt = NEW WParsedPT(PT,NULL,(MTGCardInstance *) source); - } + { + SAFE_DELETE(wppt); + if(cda) + wppt = NEW WParsedPT(cReplaceString(PT, " cdaactive", ""),NULL,(MTGCardInstance *) source); + else + wppt = NEW WParsedPT(cReplaceString(PT, " nonstatic", ""),NULL,(MTGCardInstance *) source); + } MTGCardInstance * _target = (MTGCardInstance *) target; _target->power += wppt->power.getValue(); _target->addToToughness(wppt->toughness.getValue()); + + if(_target->isSwitchedPT) + _target->switchPT(true);//reaapply } - + if(cda) + {//update but not apply + if(PT.size()) + { + SAFE_DELETE(wppt); + if(cda) + wppt = NEW WParsedPT(cReplaceString(PT, " cdaactive", ""),NULL,(MTGCardInstance *) source); + else + wppt = NEW WParsedPT(cReplaceString(PT, " nonstatic", ""),NULL,(MTGCardInstance *) source); + } + ((MTGCardInstance *) target)->origpower = wppt->power.getValue(); + ((MTGCardInstance *) target)->origtoughness = (wppt->toughness.getValue() + ((MTGCardInstance *) target)->life)-((MTGCardInstance *) target)->life;//what? + } + } int addToGame() { MTGCardInstance * _target = (MTGCardInstance *) target; if(PT.size()) { SAFE_DELETE(wppt); - wppt = NEW WParsedPT(PT,NULL,(MTGCardInstance *) source); + if(cda) + wppt = NEW WParsedPT(cReplaceString(PT, " cdaactive", ""),NULL,(MTGCardInstance *) source); + else + wppt = NEW WParsedPT(cReplaceString(PT, " nonstatic", ""),NULL,(MTGCardInstance *) source); + } + if(cda) + {//Characteristic-defining abilities + if(_target->isSwitchedPT) + { + _target->switchPT(false); + _target->cdaPT(wppt->power.getValue(),wppt->toughness.getValue()); + _target->switchPT(true); + } + else + _target->cdaPT(wppt->power.getValue(),wppt->toughness.getValue()); + + _target->isCDA = true; + } + else + { + if(_target->isSwitchedPT) + { + _target->switchPT(false); + _target->addptbonus(wppt->power.getValue(),wppt->toughness.getValue()); + _target->switchPT(true); + } + else + _target->addptbonus(wppt->power.getValue(),wppt->toughness.getValue()); } - _target->power += wppt->power.getValue(); - _target->addToToughness(wppt->toughness.getValue()); if(_target->has(Constants::INDESTRUCTIBLE) && wppt->toughness.getValue() < 0 && _target->toughness <= 0) { - _target->controller()->game->putInGraveyard(_target); + _target->controller()->game->putInGraveyard(_target); } return MTGAbility::addToGame(); } - int destroy() { - ((MTGCardInstance *) target)->power -= wppt->power.getValue(); - ((MTGCardInstance *) target)->addToToughness(-wppt->toughness.getValue()); + if(cda) + { + /*??Do Nothing??*/; + } + else + { + ((MTGCardInstance *) target)->removeptbonus(wppt->power.getValue(),wppt->toughness.getValue()); + } return 1; } const string getMenuText() @@ -2260,7 +2702,10 @@ public: if(PT.size()) { SAFE_DELETE(wppt); - wppt = NEW WParsedPT(PT,NULL,(MTGCardInstance *) source); + if(cda) + wppt = NEW WParsedPT(cReplaceString(PT, " cdaactive", ""),NULL,(MTGCardInstance *) source); + else + wppt = NEW WParsedPT(cReplaceString(PT, " nonstatic", ""),NULL,(MTGCardInstance *) source); } sprintf(menuText, "%i/%i", wppt->power.getValue(), wppt->toughness.getValue()); return menuText; @@ -2271,12 +2716,10 @@ public: a->wppt = NEW WParsedPT(*(a->wppt)); return a; } - ~APowerToughnessModifier() { delete (wppt); } - }; class GenericInstantAbility: public InstantAbility, public NestedAbility @@ -2583,8 +3026,8 @@ public: for (int i = 0; i < 2; i++) { Player * p = game->players[i]; - MTGGameZone * zones[] = { p->game->inPlay, p->game->graveyard, p->game->hand, p->game->library }; - for (int k = 0; k < 4; k++) + MTGGameZone * zones[] = { p->game->inPlay, p->game->graveyard, p->game->hand, p->game->library, p->game->exile }; + for (int k = 0; k < 5; k++) { MTGGameZone * zone = zones[k]; Value = zone->countByCanTarget(tc); @@ -3129,7 +3572,7 @@ public: SAFE_DELETE(NewPow); SAFE_DELETE(NewTou); } - for (int i = 0; i < multiplier->getValue(); ++i) + for (int i = 0; i < Tokenizer(); ++i) { //MTGCardInstance * myToken; if (tokenId) @@ -3188,6 +3631,23 @@ public: return 1; } + int Tokenizer()//tokenizer + { + int tokenize = 1; + if (source->controller()->game->battlefield->hasAbility(Constants::TOKENIZER)) + { + int nbcards = source->controller()->game->battlefield->nb_cards; + for (int j = 0; j < nbcards; j++) + { + if (source->controller()->game->battlefield->cards[j]->has(Constants::TOKENIZER)) + tokenize *= 2; + } + return multiplier->getValue()*tokenize; + } + else + return multiplier->getValue(); + } + void setTokenOwner() { switch(who) @@ -3736,6 +4196,20 @@ public: } }; +//Modify Hand +class AModifyHand: public AbilityTP +{ +public: + string hand; + AModifyHand(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable * _target, string hand, int who = TargetChooser::UNSET); + int addToGame(); + int destroy(); + const string getMenuText(); + AModifyHand * clone() const; + //~AModifyHand(); + +}; + //set a players hand size class AASetHand: public ActivatedAbilityTP { @@ -3871,7 +4345,9 @@ class AANewTarget: public ActivatedAbility { public: bool retarget; - AANewTarget(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target,bool retarget = false, ManaCost * _cost = NULL); +bool reequip; +bool newhook; + AANewTarget(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target,bool retarget = false, ManaCost * _cost = NULL, bool reequip = false, bool newhook = false); int resolve(); const string getMenuText(); AANewTarget * clone() const; @@ -3970,8 +4446,6 @@ string menu; class ASwapPT: public InstantAbility { public: - int oldpower; - int oldtoughness; ASwapPT(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target) : InstantAbility(observer, _id, _source, _target) { @@ -3985,13 +4459,17 @@ public: { while (_target->next) _target = _target->next; //This is for cards such as rampant growth - oldpower = _target->power; - oldtoughness = _target->toughness; - - _target->addToToughness(oldpower); - _target->addToToughness(-oldtoughness); - _target->power = oldtoughness; - + + if(!_target->isSwitchedPT) + { + _target->isSwitchedPT = true; + _target->switchPT(true); + } + else + { + _target->isSwitchedPT = false; + _target->switchPT(false); + } } return 1; } @@ -4003,13 +4481,12 @@ public: { while (_target->next) _target = _target->next; //This is for cards such as rampant growth - oldpower = _target->power; - oldtoughness = _target->toughness; - - _target->addToToughness(oldpower); - _target->addToToughness(-oldtoughness); - _target->power = oldtoughness; - + + if(_target->isSwitchedPT) + { + _target->isSwitchedPT = false; + _target->switchPT(false); + } } return 1; } @@ -4244,16 +4721,15 @@ public: vector dontremove; bool addNewColors; bool remove; - bool removeCreatureSubtypes; + bool removeCreatureSubtypes; bool removeTypes; string menu; string newpower; bool newpowerfound; - int oldpower; string newtoughness; bool newtoughnessfound; - int oldtoughness; + map > newAbilities; vector newAbilitiesList; bool newAbilityFound; @@ -4481,6 +4957,49 @@ public: ~AVanishing(); }; +//Produce Mana when tapped for mana... +class AProduceMana: public MTGAbility +{ +public: + string ManaDescription; + string mana[5]; + + AProduceMana(GameObserver* observer, int _id, MTGCardInstance * _source, string _ManaDescription); + int receiveEvent(WEvent * event); + int produce(); + const string getMenuText(); + //virtual ostream& toString(ostream& out) const; + AProduceMana * clone() const; + ~AProduceMana(); +}; + +//Produce Mana when a mana is engaged... +class AEngagedManaAbility: public MTGAbility +{ +public: + string colorname; + AEngagedManaAbility(GameObserver* observer, int _id, MTGCardInstance * _source, string _colorname) : + MTGAbility(observer, _id, _source) + { + colorname = _colorname; + } + int receiveEvent(WEvent * event) + { + if(WEventEngageMana * isManaProduced = dynamic_cast (event)) + { + if ((isManaProduced->card == source) && isManaProduced->color == Constants::GetColorStringIndex(colorname)) + { + source->controller()->getManaPool()->add(Constants::GetColorStringIndex(colorname),1); + } + } + return 1; + } + AEngagedManaAbility * clone() const + { + return NEW AEngagedManaAbility(*this); + } +}; + //Upkeep Cost class AUpkeep: public ActivatedAbility, public NestedAbility { @@ -4518,10 +5037,11 @@ public: bool myturn; bool opponentturn; bool once; + bool checkexile; Player * abilityOwner; APhaseAction(GameObserver* observer, int _id, MTGCardInstance * card, MTGCardInstance * target, string sAbility, int restrictions = 0, int _phase = - MTG_PHASE_UPKEEP,bool forcedestroy = false,bool next = true,bool myturn = true,bool opponentturn = true,bool once = false); + MTG_PHASE_UPKEEP,bool forcedestroy = false,bool next = true,bool myturn = true,bool opponentturn = true,bool once = false, bool checkexile = false); void Update(float dt); int resolve(); const string getMenuText(); @@ -4536,7 +5056,7 @@ public: string sAbility; APhaseAction * ability; APhaseActionGeneric(GameObserver* observer, int _id, MTGCardInstance * card, MTGCardInstance * target, string sAbility, int restrictions = 0, int _phase = - MTG_PHASE_UPKEEP,bool forcedestroy = false,bool next = true,bool myturn = false,bool opponentturn = false,bool once = false); + MTG_PHASE_UPKEEP,bool forcedestroy = false,bool next = true,bool myturn = false,bool opponentturn = false,bool once = false,bool checkexile = false); int resolve(); const string getMenuText(); APhaseActionGeneric * clone() const; @@ -5497,9 +6017,9 @@ class AADepleter: public ActivatedAbilityTP { public: string nbcardsStr; - + bool toexile; AADepleter(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target,string nbcardsStr, ManaCost * _cost = NULL, - int who = TargetChooser::UNSET); + int who = TargetChooser::UNSET, bool toexile = false); int resolve(); const string getMenuText(); AADepleter * clone() const; @@ -5529,6 +6049,17 @@ public: AAShuffle * clone() const; }; +//Mulligan +class AAMulligan: public ActivatedAbilityTP +{ +public: + AAMulligan(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target, ManaCost * _cost = NULL, int who = + TargetChooser::UNSET); + int resolve(); + const string getMenuText(); + AAMulligan * clone() const; +}; + //Remove Mana From ManaPool class AARemoveMana: public ActivatedAbilityTP { @@ -5580,16 +6111,29 @@ public: { nbOpponents = source->blockers.size(); if (nbOpponents <= MaxOpponent) return 0; - source->power += PowerModifier * (nbOpponents - MaxOpponent); - source->addToToughness(ToughnessModifier * (nbOpponents - MaxOpponent)); + if(source->isSwitchedPT) + { + source->switchPT(false); + source->addptbonus(PowerModifier * (nbOpponents - MaxOpponent),ToughnessModifier * (nbOpponents - MaxOpponent)); + source->switchPT(true); + } + else + source->addptbonus(PowerModifier * (nbOpponents - MaxOpponent),ToughnessModifier * (nbOpponents - MaxOpponent)); } else if (WEventPhaseChange* pe = dynamic_cast(event)) { if (MTG_PHASE_AFTER_EOT == pe->to->id && nbOpponents > MaxOpponent) { - source->power -= PowerModifier * (nbOpponents - MaxOpponent); - source->addToToughness(-ToughnessModifier * (nbOpponents - MaxOpponent)); - nbOpponents = 0; + if(source->isSwitchedPT) + { + source->switchPT(false); + source->removeptbonus(PowerModifier * (nbOpponents - MaxOpponent),ToughnessModifier * (nbOpponents - MaxOpponent)); + source->switchPT(true); + } + else + source->removeptbonus(PowerModifier * (nbOpponents - MaxOpponent),ToughnessModifier * (nbOpponents - MaxOpponent)); + + nbOpponents = 0; } } return 1; @@ -5630,6 +6174,37 @@ public: } }; +//Reduce to .. Ali from Cairo... +class AReduceToAbility: public MTGAbility +{ +public: + string life_s; + + AReduceToAbility(GameObserver* observer, int _id, MTGCardInstance * _source, string _life_s) : + MTGAbility(observer, _id, _source) + { + life_s = _life_s; + } + int receiveEvent(WEvent * event) + { + if(WEventDamage * isDamaged = dynamic_cast (event)) + { + if (isDamaged->damage->target->type_as_damageable == Damageable::DAMAGEABLE_PLAYER) + { + Player * p = (Player *) isDamaged->damage->target; + WParsedInt lifetoset(life_s, NULL, source); + if(p && p == source->controller() && p->life <= lifetoset.getValue()) + p->life = lifetoset.getValue(); + } + } + return 1; + } + AReduceToAbility * clone() const + { + return NEW AReduceToAbility(*this); + } +}; + //flanking ability class AFlankerAbility: public MTGAbility { @@ -5721,7 +6296,8 @@ public: string nameThis; MTGCardInstance * theNamedCard; bool noEvent; - AACastCard(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target,bool restricted,bool copied,bool _asNormal,string nameCard,string abilityName,bool _noEvent); + bool putinplay; + AACastCard(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target,bool restricted,bool copied,bool _asNormal,string nameCard,string abilityName,bool _noEvent, bool putinplay); int testDestroy(){return 0;}; void Update(float dt); @@ -5908,13 +6484,13 @@ class GenericPaidAbility: public ActivatedAbility public: MTGAbility * baseAbility; ManaCost * optionalCost; - string newName; string restrictions; string baseCost; string baseAbilityStr; + bool asAlternate; - GenericPaidAbility(GameObserver* observer, int id, MTGCardInstance * source, Targetable * target,string _newName,string _castRestriction,string _mayCost, string toAdd, ManaCost * cost = NULL); + GenericPaidAbility(GameObserver* observer, int id, MTGCardInstance * source, Targetable * target,string _newName,string _castRestriction,string _mayCost, string toAdd, bool asAlternate = false, ManaCost * cost = NULL); int resolve(); const string getMenuText(); GenericPaidAbility * clone() const; diff --git a/projects/mtg/include/CardGui.h b/projects/mtg/include/CardGui.h index 1957a5505..4ef10700b 100644 --- a/projects/mtg/include/CardGui.h +++ b/projects/mtg/include/CardGui.h @@ -33,7 +33,7 @@ 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); + static void RenderBig(MTGCard * card, const Pos& pos, bool thumb = false, bool noborder = false); static void RenderCountersBig(MTGCard * card, const Pos& pos, int drawMode = DrawMode::kNormal); static void AlternateRender(MTGCard * card, const Pos& pos); @@ -55,8 +55,8 @@ public: virtual void Render(); virtual void Update(float dt); - void DrawCard(const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false); - static void DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false); + void DrawCard(const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false, bool noborder = false); + static void DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false, bool noborder = 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 f02cd7d16..8f6041baf 100644 --- a/projects/mtg/include/CardPrimitive.h +++ b/projects/mtg/include/CardPrimitive.h @@ -58,6 +58,8 @@ public: uint8_t colors; typedef std::bitset BasicAbilitiesSet; BasicAbilitiesSet basicAbilities; + BasicAbilitiesSet origbasicAbilities; + BasicAbilitiesSet LKIbasicAbilities; map magicTexts; string magicText; diff --git a/projects/mtg/include/Counters.h b/projects/mtg/include/Counters.h index 92ea68e7f..26478fa8d 100644 --- a/projects/mtg/include/Counters.h +++ b/projects/mtg/include/Counters.h @@ -33,8 +33,9 @@ public: MTGCardInstance * target; Counters(MTGCardInstance * _target); ~Counters(); - int addCounter(const char * _name, int _power = 0, int _toughness = 0); + int addCounter(const char * _name, int _power = 0, int _toughness = 0, bool _noevent = false); int addCounter(int _power, int _toughness); + int addCounter(int _power, int _toughness, bool _noevent); int removeCounter(const char * _name, int _power = 0, int _toughness = 0); int removeCounter(int _power, int _toughness); Counter * hasCounter(const char * _name, int _power = 0, int _toughness = 0); diff --git a/projects/mtg/include/DeckMenuItem.h b/projects/mtg/include/DeckMenuItem.h index 53ee35d5e..4375a7d99 100644 --- a/projects/mtg/include/DeckMenuItem.h +++ b/projects/mtg/include/DeckMenuItem.h @@ -21,18 +21,18 @@ private: string mText; float mX; float mY; - float mTitleResetWidth; + float mTitleResetWidth; string mDescription; static float mYOffset; float mScrollerOffset; DeckMetaData *mMetaData; - string mImageFilename; + string mImageFilename; void checkUserClick(); public: - DeckMenuItem(DeckMenu* _parent, int id, int fontId, string text, float x, float y, bool hasFocus = false, bool autoTranslate = false, DeckMetaData *meta = NULL); + DeckMenuItem(DeckMenu* _parent, int id, int fontId, string text, float x, float y, bool hasFocus = false, bool autoTranslate = false, DeckMetaData *meta = NULL); ~DeckMenuItem(); virtual void Relocate(float x, float y); @@ -44,39 +44,39 @@ public: virtual bool ButtonPressed(); virtual ostream& toString(ostream& out) const; - virtual bool getTopLeft(float& top, float& left) + virtual bool getTopLeft(float& top, float& left) { top = mY + mYOffset; left = mX; return true; } - // Accessors - - string getImageFilename() const { return mImageFilename; }; - float getY() const { return mY; }; - float getX() const { return mX; }; - string getDescription() const { return mDescription; }; - string getText() const { return mText; }; - bool hasFocus() const { return mHasFocus; }; - bool hasMetaData() const { return mMetaData == NULL ? false : true;}; + // Accessors + + string getImageFilename() const { return mImageFilename; }; + float getY() const { return mY; }; + float getX() const { return mX; }; + string getDescription() const { return mDescription; }; + string getText() const { return mText; }; + bool hasFocus() const { return mHasFocus; }; + bool hasMetaData() const { return mMetaData == NULL ? false : true;}; - float getWidth() const; - string getDeckName() const; + float getWidth() const; + string getDeckName() const; - string getDeckStatsSummary() const - { - if (mMetaData) - return mMetaData->getStatsSummary(); - return ""; - } + string getDeckStatsSummary() const + { + if (mMetaData) + return mMetaData->getStatsSummary(); + return ""; + } - DeckMetaData *getMetaData() const - { - return mMetaData; - } + DeckMetaData *getMetaData() const + { + return mMetaData; + } - // Setters + // Setters void setDescription( const string& description ) { mDescription = description; } }; diff --git a/projects/mtg/include/DuelLayers.h b/projects/mtg/include/DuelLayers.h index b4ef7a5a4..f6ac2da05 100644 --- a/projects/mtg/include/DuelLayers.h +++ b/projects/mtg/include/DuelLayers.h @@ -29,7 +29,7 @@ protected: GuiAvatars * avatars; GameObserver* observer; MTGGamePhase* phaseHandler; - int mPlayerViewIndex; + int mPlayerViewIndex; CardSelectorBase* mCardSelector; public: @@ -48,11 +48,11 @@ public: void Remove(); int receiveEvent(WEvent * e); float RightBoundary(); - int getPlayerViewIndex(){ return mPlayerViewIndex; }; - Player* getRenderedPlayer(); - Player* getRenderedPlayerOpponent(); - CardSelectorBase* getCardSelector() { return mCardSelector; }; - GameObserver* getObserver(){ return observer; }; + int getPlayerViewIndex(){ return mPlayerViewIndex; }; + Player* getRenderedPlayer(); + Player* getRenderedPlayerOpponent(); + CardSelectorBase* getCardSelector() { return mCardSelector; }; + GameObserver* getObserver(){ return observer; }; }; #include "ActionLayer.h" diff --git a/projects/mtg/include/ExtraCost.h b/projects/mtg/include/ExtraCost.h index bf935ec8b..caa8bf35a 100644 --- a/projects/mtg/include/ExtraCost.h +++ b/projects/mtg/include/ExtraCost.h @@ -169,7 +169,7 @@ public: class MillExileCost : public MillCost { public: - MillExileCost(TargetChooser *_tc = NULL); + MillExileCost(TargetChooser *_tc = NULL); virtual int doPay(); }; @@ -254,6 +254,17 @@ public: virtual Ninja * clone() const; }; +//offering cost +class Offering : public ExtraCost +{ +public: + Offering(TargetChooser *_tc = NULL); + virtual int canPay(); + virtual int isPaymentSet(); + virtual int doPay(); + virtual Offering * clone() const; +}; + class CounterCost : public ExtraCost { public: diff --git a/projects/mtg/include/GameApp.h b/projects/mtg/include/GameApp.h index eeb1c8141..d672e45bf 100644 --- a/projects/mtg/include/GameApp.h +++ b/projects/mtg/include/GameApp.h @@ -73,6 +73,7 @@ public: static hgeParticleSystem * Particles[6]; static bool HasMusic; static string systemError; + static char mynbcardsStr[512]; static JMusic* music; static string currentMusicFile; static void playMusic(string filename = "", bool loop = true); diff --git a/projects/mtg/include/GameObserver.h b/projects/mtg/include/GameObserver.h index 5b3bfcbbe..72bbf687c 100644 --- a/projects/mtg/include/GameObserver.h +++ b/projects/mtg/include/GameObserver.h @@ -151,6 +151,7 @@ class GameObserver{ bool undo(); bool isLoading(){ return mLoading; }; void Mulligan(Player* player = NULL); + void serumMulligan(Player* player = NULL); Player* getPlayer(size_t index) { return players[index];}; bool isStarted() { return (mLayers!=NULL);}; RandomGenerator* getRandomGenerator() { return &randomGenerator; }; @@ -189,23 +190,23 @@ class GameObserver{ class NetworkGameObserver : public GameObserver { protected: - JNetwork* mpNetworkSession; - bool mSynchronized; - bool mForwardAction; - virtual void logAction(const string& s); + JNetwork* mpNetworkSession; + bool mSynchronized; + bool mForwardAction; + virtual void logAction(const string& s); public: - // no serverIp means a server is being instantiated, otherwise a client - NetworkGameObserver(JNetwork* pNetwork, WResourceManager* output = 0, JGE* input = 0); - virtual ~NetworkGameObserver(); - virtual void loadPlayer(int playerId, Player* player); - virtual void Update(float dt); - void synchronize(); - static void loadPlayer(void*pThis, stringstream& in, stringstream& out); - static void sendAction(void*pThis, stringstream& in, stringstream& out); - static void synchronize(void*pThis, stringstream& in, stringstream& out); - static void checkSynchro(void*pxThis, stringstream& in, stringstream& out); + // no serverIp means a server is being instantiated, otherwise a client + NetworkGameObserver(JNetwork* pNetwork, WResourceManager* output = 0, JGE* input = 0); + virtual ~NetworkGameObserver(); + virtual void loadPlayer(int playerId, Player* player); + virtual void Update(float dt); + void synchronize(); + static void loadPlayer(void*pThis, stringstream& in, stringstream& out); + static void sendAction(void*pThis, stringstream& in, stringstream& out); + static void synchronize(void*pThis, stringstream& in, stringstream& out); + static void checkSynchro(void*pxThis, stringstream& in, stringstream& out); static void ignoreResponse(void*, stringstream&, stringstream&){}; - static void disconnect(void*pxThis, stringstream& in, stringstream& out); + static void disconnect(void*pxThis, stringstream& in, stringstream& out); }; #endif diff --git a/projects/mtg/include/GameState.h b/projects/mtg/include/GameState.h index 93ef9ff75..aa21d870a 100644 --- a/projects/mtg/include/GameState.h +++ b/projects/mtg/include/GameState.h @@ -1,7 +1,7 @@ #ifndef _GAME_STATE_H_ #define _GAME_STATE_H_ -#define FADING_SPEED 350.0f +#define FADING_SPEED 350.0f class JGE; diff --git a/projects/mtg/include/GameStateMenu.h b/projects/mtg/include/GameStateMenu.h index d8fb9106a..6b4b3f205 100644 --- a/projects/mtg/include/GameStateMenu.h +++ b/projects/mtg/include/GameStateMenu.h @@ -24,7 +24,6 @@ private: float mCreditsYPos; int currentState; int mVolume; - char nbcardsStr[400]; vector langs; vector primitives; @@ -46,7 +45,6 @@ private: bool langChoices; void runTest(); //!! void listPrimitives(); - void genNbCardsStr(); //computes the contents of nbCardsStr void ensureMGuiController(); //creates the MGuiController if it doesn't exist string loadRandomWallpaper(); //loads a list of string of textures that can be randolmy shown on the loading screen @@ -66,6 +64,7 @@ public: int nextSetFolder(const string & root, const string & file); // Retrieves the next directory to have matching file void createUsersFirstDeck(int setId); + static void genNbCardsStr(); //computes the contents of nbCardsStr virtual ostream& toString(ostream& out) const; enum diff --git a/projects/mtg/include/GuiAvatars.h b/projects/mtg/include/GuiAvatars.h index 2baf6822c..36622051b 100644 --- a/projects/mtg/include/GuiAvatars.h +++ b/projects/mtg/include/GuiAvatars.h @@ -7,6 +7,7 @@ struct GuiAvatar; class GuiGraveyard; class GuiLibrary; class GuiOpponentHand; +class GuiExile; class GuiAvatars: public GuiLayer { protected: @@ -14,6 +15,7 @@ protected: GuiGraveyard* selfGraveyard, *opponentGraveyard; GuiLibrary* selfLibrary, *opponentLibrary; GuiOpponentHand *opponentHand; + GuiExile* selfExile, *opponentExile; GuiAvatar* active; public: diff --git a/projects/mtg/include/GuiPhaseBar.h b/projects/mtg/include/GuiPhaseBar.h index 78cec2677..4b78f7d7c 100644 --- a/projects/mtg/include/GuiPhaseBar.h +++ b/projects/mtg/include/GuiPhaseBar.h @@ -22,7 +22,7 @@ private: InOutQuadEasing zoomFactorEasing; DuelLayers* mpDuelLayers; - void DrawGlyph(JQuad *inQuad, int phaseId, float x, float y, float scale); + void DrawGlyph(JQuad *inQuad, int phaseId, float x, float y, float scale, float z); public: GuiPhaseBar(DuelLayers* duelLayers); ~GuiPhaseBar(); diff --git a/projects/mtg/include/GuiStatic.h b/projects/mtg/include/GuiStatic.h index 9fb352a7a..513d7848b 100644 --- a/projects/mtg/include/GuiStatic.h +++ b/projects/mtg/include/GuiStatic.h @@ -88,4 +88,14 @@ public: virtual ostream& toString(ostream& out) const; }; +class GuiExile: public GuiGameZone +{ +public: + Player * player; + GuiExile(float _x, float _y, bool hasFocus, Player * player, GuiAvatars* parent); + int receiveEventPlus(WEvent*); + int receiveEventMinus(WEvent*); + virtual ostream& toString(ostream& out) const; +}; + #endif // _GUISTATIC_H_ diff --git a/projects/mtg/include/InteractiveButton.h b/projects/mtg/include/InteractiveButton.h index d15e768bc..cf6412ab1 100644 --- a/projects/mtg/include/InteractiveButton.h +++ b/projects/mtg/include/InteractiveButton.h @@ -16,8 +16,8 @@ using std::string; -#define SCALE_SELECTED 1.2f -#define SCALE_NORMAL 1.0f +#define SCALE_SELECTED 1.2f +#define SCALE_NORMAL 1.0f const int kDismissButtonId = 10000; const int kToggleDeckActionId = 10001; diff --git a/projects/mtg/include/MTGAbility.h b/projects/mtg/include/MTGAbility.h index b9ecfa8cf..01565899f 100644 --- a/projects/mtg/include/MTGAbility.h +++ b/projects/mtg/include/MTGAbility.h @@ -211,8 +211,11 @@ public: MORPH_COST = 28, SUSPEND_COST = 29, COUNTERS = 30, - PUT_INTO_PLAY_WITH_KICKER = 31, - STANDARD_FIZZLER = 32, + PUT_INTO_PLAY_WITH_KICKER = 31, + STANDARD_FIZZLER = 32, + PAYZERO_COST = 33, + OVERLOAD_COST = 34, + BESTOW_COST = 35, }; }; @@ -460,7 +463,7 @@ public: int parseRestriction(string s); int parseCastRestrictions(MTGCardInstance * card, Player * player, string restrictions); Counter * parseCounter(string s, MTGCardInstance * target, Spell * spell = NULL); - int parsePowerToughness(string s, int *power, int *toughness); + int parsePowerToughness(string s, int *power, int *toughness); int getAbilities(vector * v, Spell * spell, MTGCardInstance * card = NULL, int id = 0, MTGGameZone * dest = NULL); MTGAbility* parseMagicLine(string s, int id, Spell * spell, MTGCardInstance *card, bool activated = false, bool forceUEOT = false, MTGGameZone * dest = NULL); int abilityEfficiency(MTGAbility * a, Player * p, int mode = MODE_ABILITY, TargetChooser * tc = NULL,Targetable * target = NULL); diff --git a/projects/mtg/include/MTGCardInstance.h b/projects/mtg/include/MTGCardInstance.h index 82053bcf1..f5b5cdc5e 100644 --- a/projects/mtg/include/MTGCardInstance.h +++ b/projects/mtg/include/MTGCardInstance.h @@ -55,7 +55,7 @@ public: Pos* view; int X; int castX; - int alternateCostPaid[ManaCost::MANA_PAID_WITH_SUSPEND + 1]; + int alternateCostPaid[ManaCost::MANA_PAID_WITH_BESTOW + 1]; int paymenttype; int castMethod; /* Tells if the card reached its current zone by being cast or not (brought into the zone by an effect). non 0 == cast, 0 == not cast */ int frozen; @@ -72,7 +72,11 @@ public: int regenerateTokens; int isToken; int origpower; + int basepower;//to keep origpower intact + int pbonus; int origtoughness; + int basetoughness;//to keep origtoughness intact + int tbonus; int isMultiColored; int isLeveler; bool enchanted; @@ -182,6 +186,7 @@ public: int addToToughness(int value); int setToughness(int value); + int isSettingBase; vectorprotections; int addProtection(TargetChooser * tc); @@ -215,6 +220,42 @@ public: void tap(); void attemptUntap(); + //cda and other func + void stripPTbonus(); + void minusPTbonus(int p = 0, int t = 0); + void plusPTbonus(int p = 0, int t = 0); + void applyPTbonus(); + void addcounter(int p = 0, int t = 0); + void removecounter(int p = 0, int t = 0); + void addptbonus(int p = 0, int t = 0); + void removeptbonus(int p = 0, int t = 0); + void addbaseP(int p = 0); + void addbaseT(int t = 0); + void revertbaseP(); + void revertbaseT(); + int getCurrentPower(); + int getCurrentToughness(); + int LKIpower; + int LKItoughness; + void cdaPT(int p = 0, int t = 0); + bool isCDA; + void switchPT(bool apply = false); + int swapP; + int swapT; + bool isSwitchedPT; + bool isACopier; + bool bypassTC; + bool discarded; + int copiedID; + int modifiedbAbi; + bool StackIsEmptyandSorcerySpeed(); + bool isTargetted(); + int cardistargetted; + bool isTargetter(); + int cardistargetter; + int myconvertedcost; + ManaCost * computeNewCost(MTGCardInstance * card,ManaCost * oldCost); + void eventattacked(); void eventattackedAlone(); void eventattackednotblocked(); diff --git a/projects/mtg/include/MTGDefinitions.h b/projects/mtg/include/MTGDefinitions.h index 08667058e..23586eaad 100644 --- a/projects/mtg/include/MTGDefinitions.h +++ b/projects/mtg/include/MTGDefinitions.h @@ -219,7 +219,26 @@ class Constants LURE = 101, NOLEGEND = 102, CANPLAYFROMGRAVEYARD = 103, - NB_BASIC_ABILITIES = 104, + TOKENIZER = 104, + MYGRAVEEXILER = 105, + OPPGRAVEEXILER = 106, + LIBRARYDEATH = 107, + SHUFFLELIBRARYDEATH = 108, + OFFERING = 109, + EVADEBIGGER = 110, + SPELLMASTERY = 111, + NOLIFEGAIN = 112, + NOLIFEGAINOPPONENT = 113, + AURAWARD = 114, + MADNESS = 115, + PROTECTIONFROMCOLOREDSPELLS = 116, + MYGCREATUREEXILER = 117, + OPPGCREATUREEXILER = 118, + PAYZERO = 119, + TRINISPHERE = 120, + CANPLAYFROMEXILE = 121, + LIBRARYEATER = 122, + NB_BASIC_ABILITIES = 123, RARITY_S = 'S', //Special Rarity @@ -257,21 +276,21 @@ class Constants GRADE_UNSUPPORTED = 4, GRADE_DANGEROUS = 5, - ASKIP_NONE=0, - ASKIP_SAFE=1, - ASKIP_FULL=2, - - WHO_P=0, - WHO_O=1, - WHO_R=2, - - KICKER_ALWAYS=0, - KICKER_CHOICE=1, - + ASKIP_NONE=0, + ASKIP_SAFE=1, + ASKIP_FULL=2, + + WHO_P=0, + WHO_O=1, + WHO_R=2, + + KICKER_ALWAYS=0, + KICKER_CHOICE=1, + }; enum - { + { NOT_CAST = 0, CAST_NORMALLY = 1, CAST_WITH_KICKER = 2, diff --git a/projects/mtg/include/MTGGameZones.h b/projects/mtg/include/MTGGameZones.h index 97687d006..7662311d0 100644 --- a/projects/mtg/include/MTGGameZones.h +++ b/projects/mtg/include/MTGGameZones.h @@ -103,6 +103,8 @@ class MTGGameZone { //returns true if one of the cards in the zone has the ability bool hasAbility(int ability); + //returns true if one of the cards in the zone has the alias + bool hasAlias(int alias); //returns true if one of the cards in the zone has the type bool hasType(const char * value); diff --git a/projects/mtg/include/MTGRules.h b/projects/mtg/include/MTGRules.h index 5a5fbf2cb..f111efaf3 100644 --- a/projects/mtg/include/MTGRules.h +++ b/projects/mtg/include/MTGRules.h @@ -76,7 +76,9 @@ public: MTGPutInPlayRule(GameObserver* observer, int _id); const string getMenuText() { - return "cast card normally"; + if(game && game->gameType() == GAME_TYPE_MOMIR) + return "Play Land"; + return "Cast Card Normally"; } virtual MTGPutInPlayRule * clone() const; }; @@ -90,7 +92,7 @@ public: MTGKickerRule(GameObserver* observer, int _id); const string getMenuText() { - return "pay kicker"; + return "Pay Kicker"; } virtual MTGKickerRule * clone() const; }; @@ -99,7 +101,7 @@ class MTGAlternativeCostRule: public PermanentAbility { protected: int isReactingToClick(MTGCardInstance * card, ManaCost * mana, ManaCost *alternateManaCost); - int reactToClick(MTGCardInstance * card, ManaCost * alternateManaCost, int paymentType = ManaCost::MANA_PAID); + int reactToClick(MTGCardInstance * card, ManaCost * alternateManaCost, int paymentType = ManaCost::MANA_PAID, bool overload = false); string alternativeName; public: int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL); @@ -110,7 +112,7 @@ public: { if(alternativeName.size()) return alternativeName.c_str(); - return "pay alternative cost"; + return "Pay Alternative Cost"; } virtual MTGAlternativeCostRule * clone() const; }; @@ -124,7 +126,7 @@ public: MTGBuyBackRule(GameObserver* observer, int _id); const string getMenuText() { - return "cast and buy back"; + return "Cast and Buyback"; } virtual MTGBuyBackRule * clone() const; }; @@ -139,7 +141,7 @@ public: MTGFlashBackRule(GameObserver* observer, int _id); const string getMenuText() { - return "flash back"; + return "Flashback"; } virtual MTGFlashBackRule * clone() const; }; @@ -153,7 +155,7 @@ public: MTGRetraceRule(GameObserver* observer, int _id); const string getMenuText() { - return "retrace"; + return "Retrace"; } virtual MTGRetraceRule * clone() const; }; @@ -168,26 +170,42 @@ public: MTGMorphCostRule(GameObserver* observer, int _id); const string getMenuText() { - return "play morphed"; + return "Play Morphed"; } virtual MTGMorphCostRule * clone() const; }; -class MTGPlayFromGraveyardRule: public MTGAlternativeCostRule +class MTGPayZeroRule: public MTGAlternativeCostRule +{ +public: + int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL); + int reactToClick(MTGCardInstance * card); + string CustomName; + virtual ostream& toString(ostream& out) const; + MTGPayZeroRule(GameObserver* observer, int _id); + const string getMenuText() + { + if(CustomName.size()) + return CustomName.c_str(); + return "Pay Zero To Cast"; + } + virtual MTGPayZeroRule * clone() const; +}; + +class MTGOverloadRule: public MTGAlternativeCostRule { public: int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL); int reactToClick(MTGCardInstance * card); virtual ostream& toString(ostream& out) const; - MTGPlayFromGraveyardRule(GameObserver* observer, int _id); + MTGOverloadRule(GameObserver* observer, int _id); const string getMenuText() { - return "cast card from graveyard"; + return "Overload"; } - virtual MTGPlayFromGraveyardRule * clone() const; + virtual MTGOverloadRule * clone() const; }; - class MTGSuspendRule: public MTGAlternativeCostRule { public: @@ -293,15 +311,15 @@ public: class MTGDredgeRule: public PermanentAbility, public ReplacementEffect { public: - vectorsoulbonders; + //vectorsoulbonders; TargetChooser * tcb; MTGAbility * dredgeAbility; MTGAbility * targetAbility; MTGAbility * targetAbilityAdder; MTGAbility * targetAbility1; MTGAbility * mod; - MTGAbility * activateDredge; - vectorpairing; + //MTGAbility * activateDredge; + //vectorpairing; MTGDredgeRule(GameObserver* observer, int _id); WEvent * replace(WEvent *e); virtual ostream& toString(ostream& out) const; @@ -418,28 +436,28 @@ private: vector pool[20]; int initialized; public: - MTGAllCards * collection; - MTGCardInstance * genEquip(int id); + MTGAllCards * collection; + MTGCardInstance * genEquip(int id); MTGStoneHewerRule(GameObserver* observer, int _id, MTGAllCards * _collection); - int receiveEvent(WEvent * event); - const string getMenuText() - { - return "Stone Hewer"; - } - virtual ostream& toString(ostream& out) const; - virtual MTGStoneHewerRule * clone() const; + int receiveEvent(WEvent * event); + const string getMenuText() + { + return "Stone Hewer"; + } + virtual ostream& toString(ostream& out) const; + virtual MTGStoneHewerRule * clone() const; }; //Hermit Druid avatar mode class MTGHermitRule: public PermanentAbility { public: MTGHermitRule(GameObserver* observer, int _id); - int receiveEvent(WEvent * event); - const string getMenuText() - { - return "Hermit"; - } - virtual MTGHermitRule * clone() const; + int receiveEvent(WEvent * event); + const string getMenuText() + { + return "Hermit"; + } + virtual MTGHermitRule * clone() const; }; // /* LifeLink */ diff --git a/projects/mtg/include/ManaCost.h b/projects/mtg/include/ManaCost.h index 9faea5806..85bfbfb0f 100644 --- a/projects/mtg/include/ManaCost.h +++ b/projects/mtg/include/ManaCost.h @@ -47,33 +47,36 @@ public: MANA_PAID_WITH_FLASHBACK = 5, MANA_PAID_WITH_RETRACE = 6, MANA_PAID_WITH_MORPH = 7, - MANA_PAID_WITH_SUSPEND = 8 + MANA_PAID_WITH_SUSPEND = 8, + MANA_PAID_WITH_OVERLOAD = 9, + MANA_PAID_WITH_BESTOW = 10, + MANA_PAID_WITH_OTHERCOST = 11 }; ExtraCosts * extraCosts; - ManaCost * getAlternative(){ return alternative; }; - void setAlternative(ManaCost * aMana){ SAFE_DELETE(alternative); alternative = aMana;}; + ManaCost * getAlternative(){ return alternative; }; + void setAlternative(ManaCost * aMana){ SAFE_DELETE(alternative); alternative = aMana;}; - ManaCost * getKicker(){ return kicker; }; - void setKicker(ManaCost * aMana){ SAFE_DELETE(kicker); kicker = aMana;}; + ManaCost * getKicker(){ return kicker; }; + void setKicker(ManaCost * aMana){ SAFE_DELETE(kicker); kicker = aMana;}; - ManaCost * getBuyback(){ return BuyBack; }; - void setBuyback(ManaCost * aMana){ SAFE_DELETE(BuyBack); BuyBack = aMana;}; + ManaCost * getBuyback(){ return BuyBack; }; + void setBuyback(ManaCost * aMana){ SAFE_DELETE(BuyBack); BuyBack = aMana;}; - ManaCost * getFlashback(){ return FlashBack; }; - void setFlashback(ManaCost * aMana){ SAFE_DELETE(FlashBack); FlashBack = aMana;}; + ManaCost * getFlashback(){ return FlashBack; }; + void setFlashback(ManaCost * aMana){ SAFE_DELETE(FlashBack); FlashBack = aMana;}; - ManaCost * getRetrace(){ return Retrace; }; - void setRetrace(ManaCost * aMana){ SAFE_DELETE(Retrace); Retrace = aMana;}; + ManaCost * getRetrace(){ return Retrace; }; + void setRetrace(ManaCost * aMana){ SAFE_DELETE(Retrace); Retrace = aMana;}; - ManaCost * getMorph(){ return morph; }; - void setMorph(ManaCost * aMana){ SAFE_DELETE(morph); morph = aMana;}; + ManaCost * getMorph(){ return morph; }; + void setMorph(ManaCost * aMana){ SAFE_DELETE(morph); morph = aMana;}; - ManaCost * getSuspend(){ return suspend; }; - void setSuspend(ManaCost * aMana){ SAFE_DELETE(suspend); suspend = aMana;}; + ManaCost * getSuspend(){ return suspend; }; + void setSuspend(ManaCost * aMana){ SAFE_DELETE(suspend); suspend = aMana;}; - ManaCost * getManaUsedToCast(){ return manaUsedToCast; }; - void setManaUsedToCast(ManaCost * aMana){ SAFE_DELETE(manaUsedToCast); manaUsedToCast = aMana;}; + ManaCost * getManaUsedToCast(){ return manaUsedToCast; }; + void setManaUsedToCast(ManaCost * aMana){ SAFE_DELETE(manaUsedToCast); manaUsedToCast = aMana;}; string alternativeName; bool isMulti; diff --git a/projects/mtg/include/MenuItem.h b/projects/mtg/include/MenuItem.h index 6a0df9eb4..8a308c8eb 100644 --- a/projects/mtg/include/MenuItem.h +++ b/projects/mtg/include/MenuItem.h @@ -7,8 +7,8 @@ #include using namespace std; -#define SCALE_SELECTED 1.2f -#define SCALE_NORMAL 1.0f +#define SCALE_SELECTED 1.2f +#define SCALE_NORMAL 1.0f class hgeParticleSystem; diff --git a/projects/mtg/include/ModRules.h b/projects/mtg/include/ModRules.h index fac6db85e..18c64a26c 100644 --- a/projects/mtg/include/ModRules.h +++ b/projects/mtg/include/ModRules.h @@ -109,11 +109,11 @@ public: int mFontSize; bool mFont; PIXEL_TYPE mFontColor; - /*Icons attributes*/ + /*Icons attributes*/ int mSizeIcon; - int mIconPosX; - int mIconPosY; - string mFileName; + int mIconPosX; + int mIconPosY; + string mFileName; ModRulesRenderCardGuiItem(string name, int posX, int posY, string formattedData, string filter, bool font, int fontSize, PIXEL_TYPE fontColor, int SizeIcon,int IconPosX,int IconPosY,string FileName); }; diff --git a/projects/mtg/include/ObjectAnalytics.h b/projects/mtg/include/ObjectAnalytics.h index 43306f801..92cd8cbd9 100644 --- a/projects/mtg/include/ObjectAnalytics.h +++ b/projects/mtg/include/ObjectAnalytics.h @@ -1,7 +1,7 @@ #ifndef OBJECTANALYTICS_H #define OBJECTANALYTICS_H -#include +#include #ifdef _DEBUG #define TRACK_OBJECT_USAGE diff --git a/projects/mtg/include/PlayGuiObject.h b/projects/mtg/include/PlayGuiObject.h index c09d1a4c8..2f4dbcf67 100644 --- a/projects/mtg/include/PlayGuiObject.h +++ b/projects/mtg/include/PlayGuiObject.h @@ -10,6 +10,7 @@ #define GUI_GRAVEYARD 3 #define GUI_LIBRARY 4 #define GUI_OPPONENTHAND 5 +#define GUI_EXILE 6 #include #include "WEvent.h" diff --git a/projects/mtg/include/Player.h b/projects/mtg/include/Player.h index 099b24604..316be5cbb 100644 --- a/projects/mtg/include/Player.h +++ b/projects/mtg/include/Player.h @@ -42,6 +42,10 @@ public: int skippingTurn; int extraTurn; int drawCounter; + int epic; + int initLife; + int raidcount; + int handmodifier; vector prowledTypes; vectorcurses; Player(GameObserver *observer, string deckFile, string deckFileSmall, MTGDeck * deck = NULL); @@ -68,6 +72,8 @@ public: MTGInPlay * inPlay(); ManaPool * getManaPool(); void takeMulligan(); + void serumMulligan(); + bool DeadLifeState(bool check = false); ManaCost * doesntEmpty; ManaCost * poolDoesntEmpty; void cleanupPhase(); @@ -105,7 +111,7 @@ public: std::string GetCurrentDeckStatsFile(); virtual bool parseLine(const string& s); friend ostream& operator<<(ostream&, const Player&); - friend istream& operator>>(istream&, Player&); + friend istream& operator>>(istream&, Player&); bool operator<(Player& aPlayer); bool isDead(); }; diff --git a/projects/mtg/include/PrecompiledHeader.h b/projects/mtg/include/PrecompiledHeader.h index 3b7cc0ffa..97df7a34b 100644 --- a/projects/mtg/include/PrecompiledHeader.h +++ b/projects/mtg/include/PrecompiledHeader.h @@ -21,8 +21,9 @@ #include "GameOptions.h" -#ifndef WP8 +#if !defined(WP8) && !defined(QT_CONFIG) #include +#include #endif #if defined (WP8) || defined (IOS) || defined (ANDROID) || defined (QT_CONFIG) || defined (SDL_CONFIG) diff --git a/projects/mtg/include/Rules.h b/projects/mtg/include/Rules.h index b38dc6e54..fa8cdbd77 100644 --- a/projects/mtg/include/Rules.h +++ b/projects/mtg/include/Rules.h @@ -57,17 +57,17 @@ public: }; string bg; - string filename; + string filename; GameType gamemode; bool hidden; - string displayName; - int unlockOption; + string displayName; + int unlockOption; string mUnlockOptionString; - static vector RulesList; + static vector RulesList; Rules(string bg = ""); int load(string _filename); - static int loadAllRules(); + static int loadAllRules(); static void unloadAllRules(); static Rules * getRulesByFilename(string _filename); void initPlayers(GameObserver *observer); diff --git a/projects/mtg/include/SimpleButton.h b/projects/mtg/include/SimpleButton.h index 960b5b7c3..39c890746 100644 --- a/projects/mtg/include/SimpleButton.h +++ b/projects/mtg/include/SimpleButton.h @@ -15,11 +15,11 @@ using std::string; -#define SCALE_SELECTED 1.2f -#define SCALE_NORMAL 1.0f -#define SCALE_SHRINK 0.75f -#define SCALE_SELECTED_LARGE 1.7F -#define SCALE_LARGE_NORMAL 1.5F +#define SCALE_SELECTED 1.2f +#define SCALE_NORMAL 1.0f +#define SCALE_SHRINK 0.75f +#define SCALE_SELECTED_LARGE 1.7f +#define SCALE_LARGE_NORMAL 1.5f class SimpleButton: public JGuiObject { diff --git a/projects/mtg/include/SimpleMenuItem.h b/projects/mtg/include/SimpleMenuItem.h index d535cf317..7f74e7874 100644 --- a/projects/mtg/include/SimpleMenuItem.h +++ b/projects/mtg/include/SimpleMenuItem.h @@ -9,8 +9,8 @@ using std::string; -#define SCALE_SELECTED 1.2f -#define SCALE_NORMAL 1.0f +#define SCALE_SELECTED 1.2f +#define SCALE_NORMAL 1.0f class SimpleMenuItem: public SimpleButton { diff --git a/projects/mtg/include/ThisDescriptor.h b/projects/mtg/include/ThisDescriptor.h index 12b5412b9..625f6c941 100644 --- a/projects/mtg/include/ThisDescriptor.h +++ b/projects/mtg/include/ThisDescriptor.h @@ -114,7 +114,7 @@ class ThisAttacked:public ThisDescriptor{ public: virtual int match(MTGCardInstance * card); - ThisAttacked(int attack); + ThisAttacked(int attack); ThisAttacked * clone() const; }; @@ -122,7 +122,7 @@ class ThisBlocked:public ThisDescriptor{ public: virtual int match(MTGCardInstance * card); - ThisBlocked(int block); + ThisBlocked(int block); ThisBlocked * clone() const; }; @@ -130,7 +130,7 @@ class ThisNotBlocked:public ThisDescriptor{ public: virtual int match(MTGCardInstance * card); - ThisNotBlocked(int unblocked); + ThisNotBlocked(int unblocked); ThisNotBlocked * clone() const; }; @@ -138,7 +138,7 @@ class ThisDamaged:public ThisDescriptor{ public: virtual int match(MTGCardInstance * card); - ThisDamaged(int wasDealtDamage); + ThisDamaged(int wasDealtDamage); ThisDamaged * clone() const; }; @@ -146,7 +146,7 @@ class ThisDualWield:public ThisDescriptor{ public: virtual int match(MTGCardInstance * card); - ThisDualWield(int dualWield); + ThisDualWield(int dualWield); ThisDualWield * clone() const; }; diff --git a/projects/mtg/include/WEvent.h b/projects/mtg/include/WEvent.h index 0430190ad..761662255 100644 --- a/projects/mtg/include/WEvent.h +++ b/projects/mtg/include/WEvent.h @@ -151,33 +151,33 @@ struct WEventCreatureAttacker : public WEventCardUpdate { //event when card attacks. struct WEventCardAttacked : public WEventCardUpdate { WEventCardAttacked(MTGCardInstance * card); - virtual Targetable * getTarget(int target); + virtual Targetable * getTarget(int target); }; //event when card attacks alone. struct WEventCardAttackedAlone : public WEventCardUpdate { WEventCardAttackedAlone(MTGCardInstance * card); - virtual Targetable * getTarget(int target); + virtual Targetable * getTarget(int target); }; //event when card attacks but is not blocked. struct WEventCardAttackedNotBlocked : public WEventCardUpdate { WEventCardAttackedNotBlocked(MTGCardInstance * card); - virtual Targetable * getTarget(int target); + virtual Targetable * getTarget(int target); }; //event when card attacks but is blocked. struct WEventCardAttackedBlocked : public WEventCardUpdate { WEventCardAttackedBlocked(MTGCardInstance * card,MTGCardInstance * opponent); MTGCardInstance * opponent; - virtual Targetable * getTarget(int target); + virtual Targetable * getTarget(int target); }; //event when card blocked. struct WEventCardBlocked : public WEventCardUpdate { WEventCardBlocked(MTGCardInstance * card,MTGCardInstance * opponent); MTGCardInstance * opponent; - virtual Targetable * getTarget(int target); + virtual Targetable * getTarget(int target); }; //event when card is sacrificed. @@ -190,13 +190,13 @@ struct WEventCardSacrifice : public WEventCardUpdate { //event when card is discarded. struct WEventCardDiscard : public WEventCardUpdate { WEventCardDiscard(MTGCardInstance * card); - virtual Targetable * getTarget(int target); + virtual Targetable * getTarget(int target); }; //event when card is cycled. struct WEventCardCycle : public WEventCardUpdate { WEventCardCycle(MTGCardInstance * card); - virtual Targetable * getTarget(int target); + virtual Targetable * getTarget(int target); }; //Event when a card's "defenser" status changes @@ -219,9 +219,9 @@ struct WEventBlockersChosen : public WEvent { }; struct WEventcardDraw : public WEvent { - WEventcardDraw(Player * player,int nb_cards); - Player * player; - int nb_cards; + WEventcardDraw(Player * player,int nb_cards); + Player * player; + int nb_cards; using WEvent::getTarget; virtual Targetable * getTarget(Player * player); }; @@ -273,6 +273,24 @@ struct WEventEmptyManaPool : public WEvent { WEventEmptyManaPool(ManaPool * source); }; +//event when card-equipment unattached +struct WEventCardUnattached : public WEventCardUpdate { + WEventCardUnattached(MTGCardInstance * card); + virtual Targetable * getTarget(int target); +}; + +//event when card-equipment attached/equipped +struct WEventCardEquipped : public WEventCardUpdate { + WEventCardEquipped(MTGCardInstance * card); + virtual Targetable * getTarget(int target); +}; + +//event when card moves from player/opponent battlefield to player/opponent battlefield +struct WEventCardControllerChange : public WEventCardUpdate { + WEventCardControllerChange(MTGCardInstance * card); + virtual Targetable * getTarget(int target); +}; + std::ostream& operator<<(std::ostream&, const WEvent&); #endif diff --git a/projects/mtg/include/WFilter.h b/projects/mtg/include/WFilter.h index 16d30c59d..0a246925b 100644 --- a/projects/mtg/include/WFilter.h +++ b/projects/mtg/include/WFilter.h @@ -234,7 +234,7 @@ public: WCFilterSet(string arg); bool isMatch(MTGCard *c) { - return (setid == MTGSets::ALL_SETS || c->setId == setid); + return (setid == MTGSets::ALL_SETS || c->setId == setid) && (c->getRarity() != Constants::RARITY_T); //removes viewing of card tokens. tokens will not display on spoiler and should not affect gameplay :) } ; string getCode(); diff --git a/projects/mtg/include/WFont.h b/projects/mtg/include/WFont.h index 84485b1ea..4645b360e 100644 --- a/projects/mtg/include/WFont.h +++ b/projects/mtg/include/WFont.h @@ -173,7 +173,7 @@ protected: int *mGBCode; int mCurr; - PIXEL_TYPE* mCharBuffer; + PIXEL_TYPE* mCharBuffer; virtual int PreCacheChar(const u8 *ch); }; diff --git a/projects/mtg/include/WResourceManager.h b/projects/mtg/include/WResourceManager.h index 9f650f52f..4abe05ed9 100644 --- a/projects/mtg/include/WResourceManager.h +++ b/projects/mtg/include/WResourceManager.h @@ -21,7 +21,7 @@ enum ENUM_WRES_INFO enum ENUM_RETRIEVE_STYLE { - RETRIEVE_EXISTING, //Only returns a resource if it already exists. Does not lock or unlock. + RETRIEVE_EXISTING, //Only returns a resource if it already exists. Does not lock or unlock. RETRIEVE_NORMAL, //Returns or creates a resource. Does not change lock status. RETRIEVE_LOCK, //As above, locks cached resource. Not for quads. RETRIEVE_UNLOCK, //As above, unlocks cached resource. Not for quads. @@ -33,7 +33,7 @@ enum ENUM_RETRIEVE_STYLE enum ENUM_CACHE_SUBTYPE { - CACHE_NORMAL = (1<<0), //Use default values. Not really a flag. + CACHE_NORMAL = (1<<0), //Use default values. Not really a flag. //CACHE_EXISTING = (1<<1), //Retrieve it only if it already exists //Because these bits only modify how a cached resource's Attempt() is called, @@ -51,8 +51,8 @@ enum ENUM_CACHE_ERROR CACHE_ERROR_NONE = 0, CACHE_ERROR_NOT_CACHED = CACHE_ERROR_NONE, CACHE_ERROR_404, - CACHE_ERROR_BAD, //Something went wrong with item->attempt() - CACHE_ERROR_BAD_ALLOC, //Couldn't allocate item + CACHE_ERROR_BAD, //Something went wrong with item->attempt() + CACHE_ERROR_BAD_ALLOC, //Couldn't allocate item CACHE_ERROR_LOST, CACHE_ERROR_NOT_MANAGED, }; @@ -69,16 +69,16 @@ public: static void Terminate(); virtual ~WResourceManager() - { - } + { + } virtual bool IsThreaded() = 0; - void PlaySample(const string& fileName) { - JSample*sample = RetrieveSample(fileName); - if(sample) { - JSoundSystem::GetInstance()->PlaySample(sample); - } - }; + void PlaySample(const string& fileName) { + JSample*sample = RetrieveSample(fileName); + if(sample) { + JSoundSystem::GetInstance()->PlaySample(sample); + } + }; virtual JQuadPtr RetrieveCard(MTGCard * card, int style = RETRIEVE_NORMAL,int submode = CACHE_NORMAL) = 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; @@ -90,7 +90,7 @@ public: virtual void Release(JTexture * tex) = 0; virtual void Release(JSample * sample) = 0; - //Refreshes all files in cache, for when mode/profile changes. + //Refreshes all files in cache, for when mode/profile changes. virtual void Refresh() = 0; //Manual clear of the cache @@ -132,8 +132,8 @@ protected: ** Singleton object only accessibly via Instance(), constructor is private */ WResourceManager() - { - } + { + } static WResourceManager* sInstance; }; diff --git a/projects/mtg/include/WResourceManagerImpl.h b/projects/mtg/include/WResourceManagerImpl.h index 471afc3ec..e9d9c8f4f 100644 --- a/projects/mtg/include/WResourceManagerImpl.h +++ b/projects/mtg/include/WResourceManagerImpl.h @@ -202,8 +202,8 @@ public: #endif private: - bool bThemedCards; //Does the theme have a "sets" directory for overwriting cards? - void FlattenTimes(); //To prevent bad cache timing on int overflow + bool bThemedCards; //Does the theme have a "sets" directory for overwriting cards? + void FlattenTimes(); //To prevent bad cache timing on int overflow //For cached stuff WCache textureWCache; diff --git a/projects/mtg/include/WResource_Fwd.h b/projects/mtg/include/WResource_Fwd.h index c03b0b752..096f4df97 100644 --- a/projects/mtg/include/WResource_Fwd.h +++ b/projects/mtg/include/WResource_Fwd.h @@ -4,6 +4,15 @@ #if (__cplusplus > 199711L) #include typedef std::shared_ptr JQuadPtr; +#elif defined(QT_CONFIG) +#include +class JQuadPtr : public QSharedPointer +{ +public: + JQuadPtr() : QSharedPointer(){}; + JQuadPtr(JQuad*ptr) : QSharedPointer(ptr){}; + JQuad* get() const {return data();}; +}; #else #include typedef boost::shared_ptr JQuadPtr; diff --git a/projects/mtg/include/Wagic_Version.h b/projects/mtg/include/Wagic_Version.h index 4978f7c5d..82d9d8d4b 100644 --- a/projects/mtg/include/Wagic_Version.h +++ b/projects/mtg/include/Wagic_Version.h @@ -26,7 +26,9 @@ Author: Michael Nguyen #define WAGIC_RESOURCE_VERSION VERSION_FILE(WAGIC_VERSION_MAJOR, WAGIC_VERSION_MEDIUM, WAGIC_VERSION_MINOR) #define WAGIC_VERSION_STRING VERSION_STRINGIFY(WAGIC_VERSION) #define WAGIC_CORE_VERSION_STRING "core_" VERSION_STRINGIFY(WAGIC_RESOURCE_VERSION) -#define WAGIC_RESOURCE_NAME WAGIC_CORE_VERSION_STRING ".zip" +#define WAGIC_RESOURCE_NAME "Wagic-core.zip" +#define WAGIC_RELEASE_NAME "latest-master" +#define WAGIC_RESOURCE_URL "https://github.com/WagicProject/wagic/releases/download/" WAGIC_RELEASE_NAME "/" WAGIC_RESOURCE_NAME #endif diff --git a/projects/mtg/include/utils.h b/projects/mtg/include/utils.h index 25a4c392d..612874c59 100644 --- a/projects/mtg/include/utils.h +++ b/projects/mtg/include/utils.h @@ -79,7 +79,7 @@ public: ostream& saveUsedRandValues(ostream& out) const; ostream& saveLoadedRandValues(ostream& out); int random(); - void setSeed(unsigned int seed) { srand(seed); }; + void setSeed(unsigned int seed) { srand(seed); }; template void random_shuffle(Iter first, Iter last) { ptrdiff_t i, n; @@ -121,6 +121,7 @@ bool fileExists(const char * filename); bool FileExists(const string & filename); std::string buildFilePath(const vector & folders, const string & filename); std::string ensureFolder(const string & folderName); +std::string cReplaceString(string subject, const string& search, const string& replace); /* template istream& operator>>(istream& in, T& p) { diff --git a/projects/mtg/minizip/crypt.h b/projects/mtg/minizip/crypt.h deleted file mode 100644 index f14a628b4..000000000 --- a/projects/mtg/minizip/crypt.h +++ /dev/null @@ -1,132 +0,0 @@ -/* crypt.h -- base code for crypt/uncrypt ZIPfile - - - Version 1.01e, February 12th, 2005 - - Copyright (C) 1998-2005 Gilles Vollant - - This code is a modified version of crypting code in Infozip distribution - - The encryption/decryption parts of this source code (as opposed to the - non-echoing password parts) were originally written in Europe. The - whole source package can be freely distributed, including from the USA. - (Prior to January 2000, re-export from the US was a violation of US law.) - - This encryption code is a direct transcription of the algorithm from - Roger Schlafly, described by Phil Katz in the file appnote.txt. This - file (appnote.txt) is distributed with the PKZIP program (even in the - version without encryption capabilities). - - If you don't need crypting in your application, just define symbols - NOCRYPT and NOUNCRYPT. - - This code support the "Traditional PKWARE Encryption". - - The new AES encryption added on Zip format by Winzip (see the page - http://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong - Encryption is not supported. -*/ - -#define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8)) - -/*********************************************************************** - * Return the next byte in the pseudo-random sequence - */ -static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab) -{ - unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an - * unpredictable manner on 16-bit systems; not a problem - * with any known compiler so far, though */ - - temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2; - return (int)(((temp * (temp ^ 1)) >> 8) & 0xff); -} - -/*********************************************************************** - * Update the encryption keys with the next byte of plain text - */ -static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c) -{ - (*(pkeys+0)) = CRC32((*(pkeys+0)), c); - (*(pkeys+1)) += (*(pkeys+0)) & 0xff; - (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1; - { - register int keyshift = (int)((*(pkeys+1)) >> 24); - (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift); - } - return c; -} - - -/*********************************************************************** - * Initialize the encryption keys and the random header according to - * the given password. - */ -static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab) -{ - *(pkeys+0) = 305419896L; - *(pkeys+1) = 591751049L; - *(pkeys+2) = 878082192L; - while (*passwd != '\0') { - update_keys(pkeys,pcrc_32_tab,(int)*passwd); - passwd++; - } -} - -#define zdecode(pkeys,pcrc_32_tab,c) \ - (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab))) - -#define zencode(pkeys,pcrc_32_tab,c,t) \ - (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c)) - -#ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED - -#define RAND_HEAD_LEN 12 - /* "last resort" source for second part of crypt seed pattern */ -# ifndef ZCR_SEED2 -# define ZCR_SEED2 3141592654UL /* use PI as default pattern */ -# endif - -static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting) - const char *passwd; /* password string */ - unsigned char *buf; /* where to write header */ - int bufSize; - unsigned long* pkeys; - const unsigned long* pcrc_32_tab; - unsigned long crcForCrypting; -{ - int n; /* index in random header */ - int t; /* temporary */ - int c; /* random byte */ - unsigned char header[RAND_HEAD_LEN-2]; /* random header */ - static unsigned calls = 0; /* ensure different random header each time */ - - if (bufSize> 7) & 0xff; - header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t); - } - /* Encrypt random header (last two bytes is high word of crc) */ - init_keys(passwd, pkeys, pcrc_32_tab); - for (n = 0; n < RAND_HEAD_LEN-2; n++) - { - buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t); - } - buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t); - buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t); - return n; -} - -#endif diff --git a/projects/mtg/minizip/ioapi.c b/projects/mtg/minizip/ioapi.c deleted file mode 100644 index 7f20c182f..000000000 --- a/projects/mtg/minizip/ioapi.c +++ /dev/null @@ -1,177 +0,0 @@ -/* ioapi.c -- IO base function header for compress/uncompress .zip - files using zlib + zip or unzip API - - Version 1.01e, February 12th, 2005 - - Copyright (C) 1998-2005 Gilles Vollant -*/ - -#include -#include -#include - -#include "zlib.h" -#include "ioapi.h" - - - -/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */ - -#ifndef SEEK_CUR -#define SEEK_CUR 1 -#endif - -#ifndef SEEK_END -#define SEEK_END 2 -#endif - -#ifndef SEEK_SET -#define SEEK_SET 0 -#endif - -voidpf ZCALLBACK fopen_file_func OF(( - voidpf opaque, - const char* filename, - int mode)); - -uLong ZCALLBACK fread_file_func OF(( - voidpf opaque, - voidpf stream, - void* buf, - uLong size)); - -uLong ZCALLBACK fwrite_file_func OF(( - voidpf opaque, - voidpf stream, - const void* buf, - uLong size)); - -long ZCALLBACK ftell_file_func OF(( - voidpf opaque, - voidpf stream)); - -long ZCALLBACK fseek_file_func OF(( - voidpf opaque, - voidpf stream, - uLong offset, - int origin)); - -int ZCALLBACK fclose_file_func OF(( - voidpf opaque, - voidpf stream)); - -int ZCALLBACK ferror_file_func OF(( - voidpf opaque, - voidpf stream)); - - -voidpf ZCALLBACK fopen_file_func (opaque, filename, mode) - voidpf opaque; - const char* filename; - int mode; -{ - FILE* file = NULL; - const char* mode_fopen = NULL; - if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ) - mode_fopen = "rb"; - else - if (mode & ZLIB_FILEFUNC_MODE_EXISTING) - mode_fopen = "r+b"; - else - if (mode & ZLIB_FILEFUNC_MODE_CREATE) - mode_fopen = "wb"; - - if ((filename!=NULL) && (mode_fopen != NULL)) - file = fopen(filename, mode_fopen); - return file; -} - - -uLong ZCALLBACK fread_file_func (opaque, stream, buf, size) - voidpf opaque; - voidpf stream; - void* buf; - uLong size; -{ - uLong ret; - ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream); - return ret; -} - - -uLong ZCALLBACK fwrite_file_func (opaque, stream, buf, size) - voidpf opaque; - voidpf stream; - const void* buf; - uLong size; -{ - uLong ret; - ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream); - return ret; -} - -long ZCALLBACK ftell_file_func (opaque, stream) - voidpf opaque; - voidpf stream; -{ - long ret; - ret = ftell((FILE *)stream); - return ret; -} - -long ZCALLBACK fseek_file_func (opaque, stream, offset, origin) - voidpf opaque; - voidpf stream; - uLong offset; - int origin; -{ - int fseek_origin=0; - long ret; - switch (origin) - { - case ZLIB_FILEFUNC_SEEK_CUR : - fseek_origin = SEEK_CUR; - break; - case ZLIB_FILEFUNC_SEEK_END : - fseek_origin = SEEK_END; - break; - case ZLIB_FILEFUNC_SEEK_SET : - fseek_origin = SEEK_SET; - break; - default: return -1; - } - ret = 0; - fseek((FILE *)stream, offset, fseek_origin); - return ret; -} - -int ZCALLBACK fclose_file_func (opaque, stream) - voidpf opaque; - voidpf stream; -{ - int ret; - ret = fclose((FILE *)stream); - return ret; -} - -int ZCALLBACK ferror_file_func (opaque, stream) - voidpf opaque; - voidpf stream; -{ - int ret; - ret = ferror((FILE *)stream); - return ret; -} - -void fill_fopen_filefunc (pzlib_filefunc_def) - zlib_filefunc_def* pzlib_filefunc_def; -{ - pzlib_filefunc_def->zopen_file = fopen_file_func; - pzlib_filefunc_def->zread_file = fread_file_func; - pzlib_filefunc_def->zwrite_file = fwrite_file_func; - pzlib_filefunc_def->ztell_file = ftell_file_func; - pzlib_filefunc_def->zseek_file = fseek_file_func; - pzlib_filefunc_def->zclose_file = fclose_file_func; - pzlib_filefunc_def->zerror_file = ferror_file_func; - pzlib_filefunc_def->opaque = NULL; -} diff --git a/projects/mtg/minizip/ioapi.h b/projects/mtg/minizip/ioapi.h deleted file mode 100644 index e73a3b2bd..000000000 --- a/projects/mtg/minizip/ioapi.h +++ /dev/null @@ -1,75 +0,0 @@ -/* ioapi.h -- IO base function header for compress/uncompress .zip - files using zlib + zip or unzip API - - Version 1.01e, February 12th, 2005 - - Copyright (C) 1998-2005 Gilles Vollant -*/ - -#ifndef _ZLIBIOAPI_H -#define _ZLIBIOAPI_H - - -#define ZLIB_FILEFUNC_SEEK_CUR (1) -#define ZLIB_FILEFUNC_SEEK_END (2) -#define ZLIB_FILEFUNC_SEEK_SET (0) - -#define ZLIB_FILEFUNC_MODE_READ (1) -#define ZLIB_FILEFUNC_MODE_WRITE (2) -#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3) - -#define ZLIB_FILEFUNC_MODE_EXISTING (4) -#define ZLIB_FILEFUNC_MODE_CREATE (8) - - -#ifndef ZCALLBACK - -#if (defined(WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK) -#define ZCALLBACK CALLBACK -#else -#define ZCALLBACK -#endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); -typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); -typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); -typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream)); -typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin)); -typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream)); -typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream)); - -typedef struct zlib_filefunc_def_s -{ - open_file_func zopen_file; - read_file_func zread_file; - write_file_func zwrite_file; - tell_file_func ztell_file; - seek_file_func zseek_file; - close_file_func zclose_file; - testerror_file_func zerror_file; - voidpf opaque; -} zlib_filefunc_def; - - - -void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); - -#define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size)) -#define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size)) -#define ZTELL(filefunc,filestream) ((*((filefunc).ztell_file))((filefunc).opaque,filestream)) -#define ZSEEK(filefunc,filestream,pos,mode) ((*((filefunc).zseek_file))((filefunc).opaque,filestream,pos,mode)) -#define ZCLOSE(filefunc,filestream) ((*((filefunc).zclose_file))((filefunc).opaque,filestream)) -#define ZERROR(filefunc,filestream) ((*((filefunc).zerror_file))((filefunc).opaque,filestream)) - - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/projects/mtg/minizip/mztools.c b/projects/mtg/minizip/mztools.c deleted file mode 100644 index bc5c7982d..000000000 --- a/projects/mtg/minizip/mztools.c +++ /dev/null @@ -1,281 +0,0 @@ -/* - Additional tools for Minizip - Code: Xavier Roche '2004 - License: Same as ZLIB (www.gzip.org) -*/ - -/* Code */ -#include -#include -#include -#include "zlib.h" -#include "unzip.h" - -#define READ_8(adr) ((unsigned char)*(adr)) -#define READ_16(adr) ( READ_8(adr) | (READ_8(adr+1) << 8) ) -#define READ_32(adr) ( READ_16(adr) | (READ_16((adr)+2) << 16) ) - -#define WRITE_8(buff, n) do { \ - *((unsigned char*)(buff)) = (unsigned char) ((n) & 0xff); \ -} while(0) -#define WRITE_16(buff, n) do { \ - WRITE_8((unsigned char*)(buff), n); \ - WRITE_8(((unsigned char*)(buff)) + 1, (n) >> 8); \ -} while(0) -#define WRITE_32(buff, n) do { \ - WRITE_16((unsigned char*)(buff), (n) & 0xffff); \ - WRITE_16((unsigned char*)(buff) + 2, (n) >> 16); \ -} while(0) - -extern int ZEXPORT unzRepair(file, fileOut, fileOutTmp, nRecovered, bytesRecovered) -const char* file; -const char* fileOut; -const char* fileOutTmp; -uLong* nRecovered; -uLong* bytesRecovered; -{ - int err = Z_OK; - FILE* fpZip = fopen(file, "rb"); - FILE* fpOut = fopen(fileOut, "wb"); - FILE* fpOutCD = fopen(fileOutTmp, "wb"); - if (fpZip != NULL && fpOut != NULL) { - int entries = 0; - uLong totalBytes = 0; - char header[30]; - char filename[256]; - char extra[1024]; - int offset = 0; - int offsetCD = 0; - while ( fread(header, 1, 30, fpZip) == 30 ) { - int currentOffset = offset; - - /* File entry */ - if (READ_32(header) == 0x04034b50) { - unsigned int version = READ_16(header + 4); - unsigned int gpflag = READ_16(header + 6); - unsigned int method = READ_16(header + 8); - unsigned int filetime = READ_16(header + 10); - unsigned int filedate = READ_16(header + 12); - unsigned int crc = READ_32(header + 14); /* crc */ - unsigned int cpsize = READ_32(header + 18); /* compressed size */ - unsigned int uncpsize = READ_32(header + 22); /* uncompressed sz */ - unsigned int fnsize = READ_16(header + 26); /* file name length */ - unsigned int extsize = READ_16(header + 28); /* extra field length */ - filename[0] = extra[0] = '\0'; - - /* Header */ - if (fwrite(header, 1, 30, fpOut) == 30) { - offset += 30; - } else { - err = Z_ERRNO; - break; - } - - /* Filename */ - if (fnsize > 0) { - if (fread(filename, 1, fnsize, fpZip) == fnsize) { - if (fwrite(filename, 1, fnsize, fpOut) == fnsize) { - offset += fnsize; - } else { - err = Z_ERRNO; - break; - } - } else { - err = Z_ERRNO; - break; - } - } else { - err = Z_STREAM_ERROR; - break; - } - - /* Extra field */ - if (extsize > 0) { - if (fread(extra, 1, extsize, fpZip) == extsize) { - if (fwrite(extra, 1, extsize, fpOut) == extsize) { - offset += extsize; - } else { - err = Z_ERRNO; - break; - } - } else { - err = Z_ERRNO; - break; - } - } - - /* Data */ - { - int dataSize = cpsize; - if (dataSize == 0) { - dataSize = uncpsize; - } - if (dataSize > 0) { - char* data = malloc(dataSize); - if (data != NULL) { - if ((int)fread(data, 1, dataSize, fpZip) == dataSize) { - if ((int)fwrite(data, 1, dataSize, fpOut) == dataSize) { - offset += dataSize; - totalBytes += dataSize; - } else { - err = Z_ERRNO; - } - } else { - err = Z_ERRNO; - } - free(data); - if (err != Z_OK) { - break; - } - } else { - err = Z_MEM_ERROR; - break; - } - } - } - - /* Central directory entry */ - { - char header[46]; - char* comment = ""; - int comsize = (int) strlen(comment); - WRITE_32(header, 0x02014b50); - WRITE_16(header + 4, version); - WRITE_16(header + 6, version); - WRITE_16(header + 8, gpflag); - WRITE_16(header + 10, method); - WRITE_16(header + 12, filetime); - WRITE_16(header + 14, filedate); - WRITE_32(header + 16, crc); - WRITE_32(header + 20, cpsize); - WRITE_32(header + 24, uncpsize); - WRITE_16(header + 28, fnsize); - WRITE_16(header + 30, extsize); - WRITE_16(header + 32, comsize); - WRITE_16(header + 34, 0); /* disk # */ - WRITE_16(header + 36, 0); /* int attrb */ - WRITE_32(header + 38, 0); /* ext attrb */ - WRITE_32(header + 42, currentOffset); - /* Header */ - if (fwrite(header, 1, 46, fpOutCD) == 46) { - offsetCD += 46; - - /* Filename */ - if (fnsize > 0) { - if (fwrite(filename, 1, fnsize, fpOutCD) == fnsize) { - offsetCD += fnsize; - } else { - err = Z_ERRNO; - break; - } - } else { - err = Z_STREAM_ERROR; - break; - } - - /* Extra field */ - if (extsize > 0) { - if (fwrite(extra, 1, extsize, fpOutCD) == extsize) { - offsetCD += extsize; - } else { - err = Z_ERRNO; - break; - } - } - - /* Comment field */ - if (comsize > 0) { - if ((int)fwrite(comment, 1, comsize, fpOutCD) == comsize) { - offsetCD += comsize; - } else { - err = Z_ERRNO; - break; - } - } - - - } else { - err = Z_ERRNO; - break; - } - } - - /* Success */ - entries++; - - } else { - break; - } - } - - /* Final central directory */ - { - int entriesZip = entries; - char header[22]; - char* comment = ""; // "ZIP File recovered by zlib/minizip/mztools"; - int comsize = (int) strlen(comment); - if (entriesZip > 0xffff) { - entriesZip = 0xffff; - } - WRITE_32(header, 0x06054b50); - WRITE_16(header + 4, 0); /* disk # */ - WRITE_16(header + 6, 0); /* disk # */ - WRITE_16(header + 8, entriesZip); /* hack */ - WRITE_16(header + 10, entriesZip); /* hack */ - WRITE_32(header + 12, offsetCD); /* size of CD */ - WRITE_32(header + 16, offset); /* offset to CD */ - WRITE_16(header + 20, comsize); /* comment */ - - /* Header */ - if (fwrite(header, 1, 22, fpOutCD) == 22) { - - /* Comment field */ - if (comsize > 0) { - if ((int)fwrite(comment, 1, comsize, fpOutCD) != comsize) { - err = Z_ERRNO; - } - } - - } else { - err = Z_ERRNO; - } - } - - /* Final merge (file + central directory) */ - fclose(fpOutCD); - if (err == Z_OK) { - fpOutCD = fopen(fileOutTmp, "rb"); - if (fpOutCD != NULL) { - int nRead; - char buffer[8192]; - while ( (nRead = (int)fread(buffer, 1, sizeof(buffer), fpOutCD)) > 0) { - if ((int)fwrite(buffer, 1, nRead, fpOut) != nRead) { - err = Z_ERRNO; - break; - } - } - fclose(fpOutCD); - } - } - - /* Close */ - fclose(fpZip); - fclose(fpOut); - - /* Wipe temporary file */ - (void)remove(fileOutTmp); - - /* Number of recovered entries */ - if (err == Z_OK) { - if (nRecovered != NULL) { - *nRecovered = entries; - } - if (bytesRecovered != NULL) { - *bytesRecovered = totalBytes; - } - } - } else { - err = Z_STREAM_ERROR; - } - return err; -} diff --git a/projects/mtg/minizip/mztools.h b/projects/mtg/minizip/mztools.h deleted file mode 100644 index 82d1597ad..000000000 --- a/projects/mtg/minizip/mztools.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - Additional tools for Minizip - Code: Xavier Roche '2004 - License: Same as ZLIB (www.gzip.org) -*/ - -#ifndef _zip_tools_H -#define _zip_tools_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef _ZLIB_H -#include "zlib.h" -#endif - -#include "unzip.h" - -/* Repair a ZIP file (missing central directory) - file: file to recover - fileOut: output file after recovery - fileOutTmp: temporary file name used for recovery -*/ -extern int ZEXPORT unzRepair(const char* file, - const char* fileOut, - const char* fileOutTmp, - uLong* nRecovered, - uLong* bytesRecovered); - -#endif diff --git a/projects/mtg/minizip/unzip.c b/projects/mtg/minizip/unzip.c deleted file mode 100644 index 3a7062980..000000000 --- a/projects/mtg/minizip/unzip.c +++ /dev/null @@ -1,1598 +0,0 @@ -/* unzip.c -- IO for uncompress .zip files using zlib - Version 1.01e, February 12th, 2005 - - Copyright (C) 1998-2005 Gilles Vollant - - Read unzip.h for more info -*/ - -/* Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of -compatibility with older software. The following is from the original crypt.c. Code -woven in by Terry Thorsen 1/2003. -*/ -/* - Copyright (c) 1990-2000 Info-ZIP. All rights reserved. - - See the accompanying file LICENSE, version 2000-Apr-09 or later - (the contents of which are also included in zip.h) for terms of use. - If, for some reason, all these files are missing, the Info-ZIP license - also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html -*/ -/* - crypt.c (full version) by Info-ZIP. Last revised: [see crypt.h] - - The encryption/decryption parts of this source code (as opposed to the - non-echoing password parts) were originally written in Europe. The - whole source package can be freely distributed, including from the USA. - (Prior to January 2000, re-export from the US was a violation of US law.) - */ - -/* - This encryption code is a direct transcription of the algorithm from - Roger Schlafly, described by Phil Katz in the file appnote.txt. This - file (appnote.txt) is distributed with the PKZIP program (even in the - version without encryption capabilities). - */ - - -#include -#include -#include -#include "zlib.h" -#include "unzip.h" - -#ifdef STDC -# include -# include -# include -#endif -#ifdef NO_ERRNO_H - extern int errno; -#else -# include -#endif - - -#ifndef local -# define local static -#endif -/* compile with -Dlocal if your debugger can't find static symbols */ - - -#ifndef CASESENSITIVITYDEFAULT_NO -# if !defined(unix) && !defined(CASESENSITIVITYDEFAULT_YES) -# define CASESENSITIVITYDEFAULT_NO -# endif -#endif - - -#ifndef UNZ_BUFSIZE -#define UNZ_BUFSIZE (16384) -#endif - -#ifndef UNZ_MAXFILENAMEINZIP -#define UNZ_MAXFILENAMEINZIP (256) -#endif - -#ifndef ALLOC -# define ALLOC(size) (malloc(size)) -#endif -#ifndef TRYFREE -# define TRYFREE(p) {if (p) free(p);} -#endif - -#define SIZECENTRALDIRITEM (0x2e) -#define SIZEZIPLOCALHEADER (0x1e) - - - - -const char unz_copyright[] = - " unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"; - -/* unz_file_info_interntal contain internal info about a file in zipfile*/ -typedef struct unz_file_info_internal_s -{ - uLong offset_curfile;/* relative offset of local header 4 bytes */ -} unz_file_info_internal; - - -/* file_in_zip_read_info_s contain internal information about a file in zipfile, - when reading and decompress it */ -typedef struct -{ - char *read_buffer; /* internal buffer for compressed data */ - z_stream stream; /* zLib stream structure for inflate */ - - uLong pos_in_zipfile; /* position in byte on the zipfile, for fseek*/ - uLong stream_initialised; /* flag set if stream structure is initialised*/ - - uLong offset_local_extrafield;/* offset of the local extra field */ - uInt size_local_extrafield;/* size of the local extra field */ - uLong pos_local_extrafield; /* position in the local extra field in read*/ - - uLong crc32; /* crc32 of all data uncompressed */ - uLong crc32_wait; /* crc32 we must obtain after decompress all */ - uLong rest_read_compressed; /* number of byte to be decompressed */ - uLong rest_read_uncompressed;/*number of byte to be obtained after decomp*/ - zlib_filefunc_def z_filefunc; - voidpf filestream; /* io structore of the zipfile */ - uLong compression_method; /* compression method (0==store) */ - uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ - int raw; -} file_in_zip_read_info_s; - - -/* unz_s contain internal information about the zipfile -*/ -typedef struct -{ - zlib_filefunc_def z_filefunc; - voidpf filestream; /* io structore of the zipfile */ - unz_global_info gi; /* public global information */ - uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ - uLong num_file; /* number of the current file in the zipfile*/ - uLong pos_in_central_dir; /* pos of the current file in the central dir*/ - uLong current_file_ok; /* flag about the usability of the current file*/ - uLong central_pos; /* position of the beginning of the central dir*/ - - uLong size_central_dir; /* size of the central directory */ - uLong offset_central_dir; /* offset of start of central directory with - respect to the starting disk number */ - - unz_file_info cur_file_info; /* public info about the current file in zip*/ - unz_file_info_internal cur_file_info_internal; /* private info about it*/ - file_in_zip_read_info_s* pfile_in_zip_read; /* structure about the current - file if we are decompressing it */ - int encrypted; -# ifndef NOUNCRYPT - unsigned long keys[3]; /* keys defining the pseudo-random sequence */ - const unsigned long* pcrc_32_tab; -# endif -} unz_s; - - -#ifndef NOUNCRYPT -#include "crypt.h" -#endif - -/* =========================================================================== - Read a byte from a gz_stream; update next_in and avail_in. Return EOF - for end of file. - IN assertion: the stream s has been sucessfully opened for reading. -*/ - - -local int unzlocal_getByte OF(( - const zlib_filefunc_def* pzlib_filefunc_def, - voidpf filestream, - int *pi)); - -local int unzlocal_getByte(pzlib_filefunc_def,filestream,pi) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; - int *pi; -{ - unsigned char c; - int err = (int)ZREAD(*pzlib_filefunc_def,filestream,&c,1); - if (err==1) - { - *pi = (int)c; - return UNZ_OK; - } - else - { - if (ZERROR(*pzlib_filefunc_def,filestream)) - return UNZ_ERRNO; - else - return UNZ_EOF; - } -} - - -/* =========================================================================== - Reads a long in LSB order from the given gz_stream. Sets -*/ -local int unzlocal_getShort OF(( - const zlib_filefunc_def* pzlib_filefunc_def, - voidpf filestream, - uLong *pX)); - -local int unzlocal_getShort (pzlib_filefunc_def,filestream,pX) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; - uLong *pX; -{ - uLong x ; - int i; - int err; - - err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); - x = (uLong)i; - - if (err==UNZ_OK) - err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); - x += ((uLong)i)<<8; - - if (err==UNZ_OK) - *pX = x; - else - *pX = 0; - return err; -} - -local int unzlocal_getLong OF(( - const zlib_filefunc_def* pzlib_filefunc_def, - voidpf filestream, - uLong *pX)); - -local int unzlocal_getLong (pzlib_filefunc_def,filestream,pX) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; - uLong *pX; -{ - uLong x ; - int i; - int err; - - err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); - x = (uLong)i; - - if (err==UNZ_OK) - err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); - x += ((uLong)i)<<8; - - if (err==UNZ_OK) - err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); - x += ((uLong)i)<<16; - - if (err==UNZ_OK) - err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); - x += ((uLong)i)<<24; - - if (err==UNZ_OK) - *pX = x; - else - *pX = 0; - return err; -} - - -/* My own strcmpi / strcasecmp */ -local int strcmpcasenosensitive_internal (fileName1,fileName2) - const char* fileName1; - const char* fileName2; -{ - for (;;) - { - char c1=*(fileName1++); - char c2=*(fileName2++); - if ((c1>='a') && (c1<='z')) - c1 -= 0x20; - if ((c2>='a') && (c2<='z')) - c2 -= 0x20; - if (c1=='\0') - return ((c2=='\0') ? 0 : -1); - if (c2=='\0') - return 1; - if (c1c2) - return 1; - } -} - - -#ifdef CASESENSITIVITYDEFAULT_NO -#define CASESENSITIVITYDEFAULTVALUE 2 -#else -#define CASESENSITIVITYDEFAULTVALUE 1 -#endif - -#ifndef STRCMPCASENOSENTIVEFUNCTION -#define STRCMPCASENOSENTIVEFUNCTION strcmpcasenosensitive_internal -#endif - -/* - Compare two filename (fileName1,fileName2). - If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp) - If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi - or strcasecmp) - If iCaseSenisivity = 0, case sensitivity is defaut of your operating system - (like 1 on Unix, 2 on Windows) - -*/ -extern int ZEXPORT unzStringFileNameCompare (fileName1,fileName2,iCaseSensitivity) - const char* fileName1; - const char* fileName2; - int iCaseSensitivity; -{ - if (iCaseSensitivity==0) - iCaseSensitivity=CASESENSITIVITYDEFAULTVALUE; - - if (iCaseSensitivity==1) - return strcmp(fileName1,fileName2); - - return STRCMPCASENOSENTIVEFUNCTION(fileName1,fileName2); -} - -#ifndef BUFREADCOMMENT -#define BUFREADCOMMENT (0x400) -#endif - -/* - Locate the Central directory of a zipfile (at the end, just before - the global comment) -*/ -local uLong unzlocal_SearchCentralDir OF(( - const zlib_filefunc_def* pzlib_filefunc_def, - voidpf filestream)); - -local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; -{ - unsigned char* buf; - uLong uSizeFile; - uLong uBackRead; - uLong uMaxBack=0xffff; /* maximum size of global comment */ - uLong uPosFound=0; - - if (ZSEEK(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) - return 0; - - - uSizeFile = ZTELL(*pzlib_filefunc_def,filestream); - - if (uMaxBack>uSizeFile) - uMaxBack = uSizeFile; - - buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); - if (buf==NULL) - return 0; - - uBackRead = 4; - while (uBackReaduMaxBack) - uBackRead = uMaxBack; - else - uBackRead+=BUFREADCOMMENT; - uReadPos = uSizeFile-uBackRead ; - - uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? - (BUFREADCOMMENT+4) : (uSizeFile-uReadPos); - if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) - break; - - if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) - break; - - for (i=(int)uReadSize-3; (i--)>0;) - if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && - ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) - { - uPosFound = uReadPos+i; - break; - } - - if (uPosFound!=0) - break; - } - TRYFREE(buf); - return uPosFound; -} - -/* - Open a Zip file. path contain the full pathname (by example, - on a Windows NT computer "c:\\test\\zlib114.zip" or on an Unix computer - "zlib/zlib114.zip". - If the zipfile cannot be opened (file doesn't exist or in not valid), the - return value is NULL. - Else, the return value is a unzFile Handle, usable with other function - of this unzip package. -*/ -extern unzFile ZEXPORT unzOpen2 (path, pzlib_filefunc_def) - const char *path; - zlib_filefunc_def* pzlib_filefunc_def; -{ - unz_s us; - unz_s *s; - uLong central_pos,uL; - - uLong number_disk; /* number of the current dist, used for - spaning ZIP, unsupported, always 0*/ - uLong number_disk_with_CD; /* number the the disk with central dir, used - for spaning ZIP, unsupported, always 0*/ - uLong number_entry_CD; /* total number of entries in - the central dir - (same than number_entry on nospan) */ - - int err=UNZ_OK; - - if (unz_copyright[0]!=' ') - return NULL; - - if (pzlib_filefunc_def==NULL) - fill_fopen_filefunc(&us.z_filefunc); - else - us.z_filefunc = *pzlib_filefunc_def; - - us.filestream= (*(us.z_filefunc.zopen_file))(us.z_filefunc.opaque, - path, - ZLIB_FILEFUNC_MODE_READ | - ZLIB_FILEFUNC_MODE_EXISTING); - if (us.filestream==NULL) - return NULL; - - central_pos = unzlocal_SearchCentralDir(&us.z_filefunc,us.filestream); - if (central_pos==0) - err=UNZ_ERRNO; - - if (ZSEEK(us.z_filefunc, us.filestream, - central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) - err=UNZ_ERRNO; - - /* the signature, already checked */ - if (unzlocal_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK) - err=UNZ_ERRNO; - - /* number of this disk */ - if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK) - err=UNZ_ERRNO; - - /* number of the disk with the start of the central directory */ - if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK) - err=UNZ_ERRNO; - - /* total number of entries in the central dir on this disk */ - if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.number_entry)!=UNZ_OK) - err=UNZ_ERRNO; - - /* total number of entries in the central dir */ - if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_entry_CD)!=UNZ_OK) - err=UNZ_ERRNO; - - if ((number_entry_CD!=us.gi.number_entry) || - (number_disk_with_CD!=0) || - (number_disk!=0)) - err=UNZ_BADZIPFILE; - - /* size of the central directory */ - if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.size_central_dir)!=UNZ_OK) - err=UNZ_ERRNO; - - /* offset of start of central directory with respect to the - starting disk number */ - if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.offset_central_dir)!=UNZ_OK) - err=UNZ_ERRNO; - - /* zipfile comment length */ - if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.size_comment)!=UNZ_OK) - err=UNZ_ERRNO; - - if ((central_pospfile_in_zip_read!=NULL) - unzCloseCurrentFile(file); - - ZCLOSE(s->z_filefunc, s->filestream); - TRYFREE(s); - return UNZ_OK; -} - - -/* - Write info about the ZipFile in the *pglobal_info structure. - No preparation of the structure is needed - return UNZ_OK if there is no problem. */ -extern int ZEXPORT unzGetGlobalInfo (file,pglobal_info) - unzFile file; - unz_global_info *pglobal_info; -{ - unz_s* s; - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; - *pglobal_info=s->gi; - return UNZ_OK; -} - - -/* - Translate date/time from Dos format to tm_unz (readable more easilty) -*/ -local void unzlocal_DosDateToTmuDate (ulDosDate, ptm) - uLong ulDosDate; - tm_unz* ptm; -{ - uLong uDate; - uDate = (uLong)(ulDosDate>>16); - ptm->tm_mday = (uInt)(uDate&0x1f) ; - ptm->tm_mon = (uInt)((((uDate)&0x1E0)/0x20)-1) ; - ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ; - - ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800); - ptm->tm_min = (uInt) ((ulDosDate&0x7E0)/0x20) ; - ptm->tm_sec = (uInt) (2*(ulDosDate&0x1f)) ; -} - -/* - Get Info about the current file in the zipfile, with internal only info -*/ -local int unzlocal_GetCurrentFileInfoInternal OF((unzFile file, - unz_file_info *pfile_info, - unz_file_info_internal - *pfile_info_internal, - char *szFileName, - uLong fileNameBufferSize, - void *extraField, - uLong extraFieldBufferSize, - char *szComment, - uLong commentBufferSize)); - -local int unzlocal_GetCurrentFileInfoInternal (file, - pfile_info, - pfile_info_internal, - szFileName, fileNameBufferSize, - extraField, extraFieldBufferSize, - szComment, commentBufferSize) - unzFile file; - unz_file_info *pfile_info; - unz_file_info_internal *pfile_info_internal; - char *szFileName; - uLong fileNameBufferSize; - void *extraField; - uLong extraFieldBufferSize; - char *szComment; - uLong commentBufferSize; -{ - unz_s* s; - unz_file_info file_info; - unz_file_info_internal file_info_internal; - int err=UNZ_OK; - uLong uMagic; - long lSeek=0; - - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; - if (ZSEEK(s->z_filefunc, s->filestream, - s->pos_in_central_dir+s->byte_before_the_zipfile, - ZLIB_FILEFUNC_SEEK_SET)!=0) - err=UNZ_ERRNO; - - - /* we check the magic */ - if (err==UNZ_OK) - if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) - err=UNZ_ERRNO; - else if (uMagic!=0x02014b50) - err=UNZ_BADZIPFILE; - - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version_needed) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.flag) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.compression_method) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.dosDate) != UNZ_OK) - err=UNZ_ERRNO; - - unzlocal_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date); - - if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.crc) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_filename) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_extra) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_comment) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.internal_fa) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.external_fa) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK) - err=UNZ_ERRNO; - - lSeek+=file_info.size_filename; - if ((err==UNZ_OK) && (szFileName!=NULL)) - { - uLong uSizeRead ; - if (file_info.size_filename0) && (fileNameBufferSize>0)) - if (ZREAD(s->z_filefunc, s->filestream,szFileName,uSizeRead)!=uSizeRead) - err=UNZ_ERRNO; - lSeek -= uSizeRead; - } - - - if ((err==UNZ_OK) && (extraField!=NULL)) - { - uLong uSizeRead ; - if (file_info.size_file_extraz_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) - lSeek=0; - else - err=UNZ_ERRNO; - if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0)) - if (ZREAD(s->z_filefunc, s->filestream,extraField,uSizeRead)!=uSizeRead) - err=UNZ_ERRNO; - lSeek += file_info.size_file_extra - uSizeRead; - } - else - lSeek+=file_info.size_file_extra; - - - if ((err==UNZ_OK) && (szComment!=NULL)) - { - uLong uSizeRead ; - if (file_info.size_file_commentz_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) - lSeek=0; - else - err=UNZ_ERRNO; - if ((file_info.size_file_comment>0) && (commentBufferSize>0)) - if (ZREAD(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead) - err=UNZ_ERRNO; - lSeek+=file_info.size_file_comment - uSizeRead; - } - else - lSeek+=file_info.size_file_comment; - - if ((err==UNZ_OK) && (pfile_info!=NULL)) - *pfile_info=file_info; - - if ((err==UNZ_OK) && (pfile_info_internal!=NULL)) - *pfile_info_internal=file_info_internal; - - return err; -} - - - -/* - Write info about the ZipFile in the *pglobal_info structure. - No preparation of the structure is needed - return UNZ_OK if there is no problem. -*/ -extern int ZEXPORT unzGetCurrentFileInfo (file, - pfile_info, - szFileName, fileNameBufferSize, - extraField, extraFieldBufferSize, - szComment, commentBufferSize) - unzFile file; - unz_file_info *pfile_info; - char *szFileName; - uLong fileNameBufferSize; - void *extraField; - uLong extraFieldBufferSize; - char *szComment; - uLong commentBufferSize; -{ - return unzlocal_GetCurrentFileInfoInternal(file,pfile_info,NULL, - szFileName,fileNameBufferSize, - extraField,extraFieldBufferSize, - szComment,commentBufferSize); -} - -/* - Set the current file of the zipfile to the first file. - return UNZ_OK if there is no problem -*/ -extern int ZEXPORT unzGoToFirstFile (file) - unzFile file; -{ - int err=UNZ_OK; - unz_s* s; - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; - s->pos_in_central_dir=s->offset_central_dir; - s->num_file=0; - err=unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, - &s->cur_file_info_internal, - NULL,0,NULL,0,NULL,0); - s->current_file_ok = (err == UNZ_OK); - return err; -} - -/* - Set the current file of the zipfile to the next file. - return UNZ_OK if there is no problem - return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. -*/ -extern int ZEXPORT unzGoToNextFile (file) - unzFile file; -{ - unz_s* s; - int err; - - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; - if (!s->current_file_ok) - return UNZ_END_OF_LIST_OF_FILE; - if (s->gi.number_entry != 0xffff) /* 2^16 files overflow hack */ - if (s->num_file+1==s->gi.number_entry) - return UNZ_END_OF_LIST_OF_FILE; - - s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename + - s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ; - s->num_file++; - err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, - &s->cur_file_info_internal, - NULL,0,NULL,0,NULL,0); - s->current_file_ok = (err == UNZ_OK); - return err; -} - - -/* - Try locate the file szFileName in the zipfile. - For the iCaseSensitivity signification, see unzipStringFileNameCompare - - return value : - UNZ_OK if the file is found. It becomes the current file. - UNZ_END_OF_LIST_OF_FILE if the file is not found -*/ -extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity) - unzFile file; - const char *szFileName; - int iCaseSensitivity; -{ - unz_s* s; - int err; - - /* We remember the 'current' position in the file so that we can jump - * back there if we fail. - */ - unz_file_info cur_file_infoSaved; - unz_file_info_internal cur_file_info_internalSaved; - uLong num_fileSaved; - uLong pos_in_central_dirSaved; - - - if (file==NULL) - return UNZ_PARAMERROR; - - if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP) - return UNZ_PARAMERROR; - - s=(unz_s*)file; - if (!s->current_file_ok) - return UNZ_END_OF_LIST_OF_FILE; - - /* Save the current state */ - num_fileSaved = s->num_file; - pos_in_central_dirSaved = s->pos_in_central_dir; - cur_file_infoSaved = s->cur_file_info; - cur_file_info_internalSaved = s->cur_file_info_internal; - - err = unzGoToFirstFile(file); - - while (err == UNZ_OK) - { - char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1]; - err = unzGetCurrentFileInfo(file,NULL, - szCurrentFileName,sizeof(szCurrentFileName)-1, - NULL,0,NULL,0); - if (err == UNZ_OK) - { - if (unzStringFileNameCompare(szCurrentFileName, - szFileName,iCaseSensitivity)==0) - return UNZ_OK; - err = unzGoToNextFile(file); - } - } - - /* We failed, so restore the state of the 'current file' to where we - * were. - */ - s->num_file = num_fileSaved ; - s->pos_in_central_dir = pos_in_central_dirSaved ; - s->cur_file_info = cur_file_infoSaved; - s->cur_file_info_internal = cur_file_info_internalSaved; - return err; -} - - -/* -/////////////////////////////////////////// -// Contributed by Ryan Haksi (mailto://cryogen@infoserve.net) -// I need random access -// -// Further optimization could be realized by adding an ability -// to cache the directory in memory. The goal being a single -// comprehensive file read to put the file I need in a memory. -*/ - -/* -typedef struct unz_file_pos_s -{ - uLong pos_in_zip_directory; // offset in file - uLong num_of_file; // # of file -} unz_file_pos; -*/ - -extern int ZEXPORT unzGetFilePos(file, file_pos) - unzFile file; - unz_file_pos* file_pos; -{ - unz_s* s; - - if (file==NULL || file_pos==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; - if (!s->current_file_ok) - return UNZ_END_OF_LIST_OF_FILE; - - file_pos->pos_in_zip_directory = s->pos_in_central_dir; - file_pos->num_of_file = s->num_file; - - return UNZ_OK; -} - -extern int ZEXPORT unzGoToFilePos(file, file_pos) - unzFile file; - unz_file_pos* file_pos; -{ - unz_s* s; - int err; - - if (file==NULL || file_pos==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; - - /* jump to the right spot */ - s->pos_in_central_dir = file_pos->pos_in_zip_directory; - s->num_file = file_pos->num_of_file; - - /* set the current file */ - err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, - &s->cur_file_info_internal, - NULL,0,NULL,0,NULL,0); - /* return results */ - s->current_file_ok = (err == UNZ_OK); - return err; -} - -/* -// Unzip Helper Functions - should be here? -/////////////////////////////////////////// -*/ - -/* - Read the local header of the current zipfile - Check the coherency of the local header and info in the end of central - directory about this file - store in *piSizeVar the size of extra info in local header - (filename and size of extra field data) -*/ -local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar, - poffset_local_extrafield, - psize_local_extrafield) - unz_s* s; - uInt* piSizeVar; - uLong *poffset_local_extrafield; - uInt *psize_local_extrafield; -{ - uLong uMagic,uData,uFlags; - uLong size_filename; - uLong size_extra_field; - int err=UNZ_OK; - - *piSizeVar = 0; - *poffset_local_extrafield = 0; - *psize_local_extrafield = 0; - - if (ZSEEK(s->z_filefunc, s->filestream,s->cur_file_info_internal.offset_curfile + - s->byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0) - return UNZ_ERRNO; - - - if (err==UNZ_OK) - if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) - err=UNZ_ERRNO; - else if (uMagic!=0x04034b50) - err=UNZ_BADZIPFILE; - - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) - err=UNZ_ERRNO; -/* - else if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion)) - err=UNZ_BADZIPFILE; -*/ - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uFlags) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) - err=UNZ_ERRNO; - else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method)) - err=UNZ_BADZIPFILE; - - if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) && - (s->cur_file_info.compression_method!=Z_DEFLATED)) - err=UNZ_BADZIPFILE; - - if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* date/time */ - err=UNZ_ERRNO; - - if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* crc */ - err=UNZ_ERRNO; - else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) && - ((uFlags & 8)==0)) - err=UNZ_BADZIPFILE; - - if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size compr */ - err=UNZ_ERRNO; - else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) && - ((uFlags & 8)==0)) - err=UNZ_BADZIPFILE; - - if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size uncompr */ - err=UNZ_ERRNO; - else if ((err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) && - ((uFlags & 8)==0)) - err=UNZ_BADZIPFILE; - - - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_filename) != UNZ_OK) - err=UNZ_ERRNO; - else if ((err==UNZ_OK) && (size_filename!=s->cur_file_info.size_filename)) - err=UNZ_BADZIPFILE; - - *piSizeVar += (uInt)size_filename; - - if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_extra_field) != UNZ_OK) - err=UNZ_ERRNO; - *poffset_local_extrafield= s->cur_file_info_internal.offset_curfile + - SIZEZIPLOCALHEADER + size_filename; - *psize_local_extrafield = (uInt)size_extra_field; - - *piSizeVar += (uInt)size_extra_field; - - return err; -} - -/* - Open for reading data the current file in the zipfile. - If there is no error and the file is opened, the return value is UNZ_OK. -*/ -extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password) - unzFile file; - int* method; - int* level; - int raw; - const char* password; -{ - int err=UNZ_OK; - uInt iSizeVar; - unz_s* s; - file_in_zip_read_info_s* pfile_in_zip_read_info; - uLong offset_local_extrafield; /* offset of the local extra field */ - uInt size_local_extrafield; /* size of the local extra field */ -# ifndef NOUNCRYPT - char source[12]; -# else - if (password != NULL) - return UNZ_PARAMERROR; -# endif - - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; - if (!s->current_file_ok) - return UNZ_PARAMERROR; - - if (s->pfile_in_zip_read != NULL) - unzCloseCurrentFile(file); - - if (unzlocal_CheckCurrentFileCoherencyHeader(s,&iSizeVar, - &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK) - return UNZ_BADZIPFILE; - - pfile_in_zip_read_info = (file_in_zip_read_info_s*) - ALLOC(sizeof(file_in_zip_read_info_s)); - if (pfile_in_zip_read_info==NULL) - return UNZ_INTERNALERROR; - - pfile_in_zip_read_info->read_buffer=(char*)ALLOC(UNZ_BUFSIZE); - pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield; - pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield; - pfile_in_zip_read_info->pos_local_extrafield=0; - pfile_in_zip_read_info->raw=raw; - - if (pfile_in_zip_read_info->read_buffer==NULL) - { - TRYFREE(pfile_in_zip_read_info); - return UNZ_INTERNALERROR; - } - - pfile_in_zip_read_info->stream_initialised=0; - - if (method!=NULL) - *method = (int)s->cur_file_info.compression_method; - - if (level!=NULL) - { - *level = 6; - switch (s->cur_file_info.flag & 0x06) - { - case 6 : *level = 1; break; - case 4 : *level = 2; break; - case 2 : *level = 9; break; - } - } - - if ((s->cur_file_info.compression_method!=0) && - (s->cur_file_info.compression_method!=Z_DEFLATED)) - err=UNZ_BADZIPFILE; - - pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc; - pfile_in_zip_read_info->crc32=0; - pfile_in_zip_read_info->compression_method = - s->cur_file_info.compression_method; - pfile_in_zip_read_info->filestream=s->filestream; - pfile_in_zip_read_info->z_filefunc=s->z_filefunc; - pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile; - - pfile_in_zip_read_info->stream.total_out = 0; - - if ((s->cur_file_info.compression_method==Z_DEFLATED) && - (!raw)) - { - pfile_in_zip_read_info->stream.zalloc = (alloc_func)0; - pfile_in_zip_read_info->stream.zfree = (free_func)0; - pfile_in_zip_read_info->stream.opaque = (voidpf)0; - pfile_in_zip_read_info->stream.next_in = (voidpf)0; - pfile_in_zip_read_info->stream.avail_in = 0; - - err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS); - if (err == Z_OK) - pfile_in_zip_read_info->stream_initialised=1; - else - { - TRYFREE(pfile_in_zip_read_info); - return err; - } - /* windowBits is passed < 0 to tell that there is no zlib header. - * Note that in this case inflate *requires* an extra "dummy" byte - * after the compressed stream in order to complete decompression and - * return Z_STREAM_END. - * In unzip, i don't wait absolutely Z_STREAM_END because I known the - * size of both compressed and uncompressed data - */ - } - pfile_in_zip_read_info->rest_read_compressed = - s->cur_file_info.compressed_size ; - pfile_in_zip_read_info->rest_read_uncompressed = - s->cur_file_info.uncompressed_size ; - - - pfile_in_zip_read_info->pos_in_zipfile = - s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER + - iSizeVar; - - pfile_in_zip_read_info->stream.avail_in = (uInt)0; - - s->pfile_in_zip_read = pfile_in_zip_read_info; - -# ifndef NOUNCRYPT - if (password != NULL) - { - int i; - s->pcrc_32_tab = get_crc_table(); - init_keys(password,s->keys,s->pcrc_32_tab); - if (ZSEEK(s->z_filefunc, s->filestream, - s->pfile_in_zip_read->pos_in_zipfile + - s->pfile_in_zip_read->byte_before_the_zipfile, - SEEK_SET)!=0) - return UNZ_INTERNALERROR; - if(ZREAD(s->z_filefunc, s->filestream,source, 12)<12) - return UNZ_INTERNALERROR; - - for (i = 0; i<12; i++) - zdecode(s->keys,s->pcrc_32_tab,source[i]); - - s->pfile_in_zip_read->pos_in_zipfile+=12; - s->encrypted=1; - } -# endif - - - return UNZ_OK; -} - -extern int ZEXPORT unzOpenCurrentFile (file) - unzFile file; -{ - return unzOpenCurrentFile3(file, NULL, NULL, 0, NULL); -} - -extern int ZEXPORT unzOpenCurrentFilePassword (file, password) - unzFile file; - const char* password; -{ - return unzOpenCurrentFile3(file, NULL, NULL, 0, password); -} - -extern int ZEXPORT unzOpenCurrentFile2 (file,method,level,raw) - unzFile file; - int* method; - int* level; - int raw; -{ - return unzOpenCurrentFile3(file, method, level, raw, NULL); -} - -/* - Read bytes from the current file. - buf contain buffer where data must be copied - len the size of buf. - - return the number of byte copied if somes bytes are copied - return 0 if the end of file was reached - return <0 with error code if there is an error - (UNZ_ERRNO for IO error, or zLib error for uncompress error) -*/ -extern int ZEXPORT unzReadCurrentFile (file, buf, len) - unzFile file; - voidp buf; - unsigned len; -{ - int err=UNZ_OK; - uInt iRead = 0; - unz_s* s; - file_in_zip_read_info_s* pfile_in_zip_read_info; - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; - pfile_in_zip_read_info=s->pfile_in_zip_read; - - if (pfile_in_zip_read_info==NULL) - return UNZ_PARAMERROR; - - - if ((pfile_in_zip_read_info->read_buffer == NULL)) - return UNZ_END_OF_LIST_OF_FILE; - if (len==0) - return 0; - - pfile_in_zip_read_info->stream.next_out = (Bytef*)buf; - - pfile_in_zip_read_info->stream.avail_out = (uInt)len; - - if ((len>pfile_in_zip_read_info->rest_read_uncompressed) && - (!(pfile_in_zip_read_info->raw))) - pfile_in_zip_read_info->stream.avail_out = - (uInt)pfile_in_zip_read_info->rest_read_uncompressed; - - if ((len>pfile_in_zip_read_info->rest_read_compressed+ - pfile_in_zip_read_info->stream.avail_in) && - (pfile_in_zip_read_info->raw)) - pfile_in_zip_read_info->stream.avail_out = - (uInt)pfile_in_zip_read_info->rest_read_compressed+ - pfile_in_zip_read_info->stream.avail_in; - - while (pfile_in_zip_read_info->stream.avail_out>0) - { - if ((pfile_in_zip_read_info->stream.avail_in==0) && - (pfile_in_zip_read_info->rest_read_compressed>0)) - { - uInt uReadThis = UNZ_BUFSIZE; - if (pfile_in_zip_read_info->rest_read_compressedrest_read_compressed; - if (uReadThis == 0) - return UNZ_EOF; - if (ZSEEK(pfile_in_zip_read_info->z_filefunc, - pfile_in_zip_read_info->filestream, - pfile_in_zip_read_info->pos_in_zipfile + - pfile_in_zip_read_info->byte_before_the_zipfile, - ZLIB_FILEFUNC_SEEK_SET)!=0) - return UNZ_ERRNO; - if (ZREAD(pfile_in_zip_read_info->z_filefunc, - pfile_in_zip_read_info->filestream, - pfile_in_zip_read_info->read_buffer, - uReadThis)!=uReadThis) - return UNZ_ERRNO; - - -# ifndef NOUNCRYPT - if(s->encrypted) - { - uInt i; - for(i=0;iread_buffer[i] = - zdecode(s->keys,s->pcrc_32_tab, - pfile_in_zip_read_info->read_buffer[i]); - } -# endif - - - pfile_in_zip_read_info->pos_in_zipfile += uReadThis; - - pfile_in_zip_read_info->rest_read_compressed-=uReadThis; - - pfile_in_zip_read_info->stream.next_in = - (Bytef*)pfile_in_zip_read_info->read_buffer; - pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis; - } - - if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw)) - { - uInt uDoCopy,i ; - - if ((pfile_in_zip_read_info->stream.avail_in == 0) && - (pfile_in_zip_read_info->rest_read_compressed == 0)) - return (iRead==0) ? UNZ_EOF : iRead; - - if (pfile_in_zip_read_info->stream.avail_out < - pfile_in_zip_read_info->stream.avail_in) - uDoCopy = pfile_in_zip_read_info->stream.avail_out ; - else - uDoCopy = pfile_in_zip_read_info->stream.avail_in ; - - for (i=0;istream.next_out+i) = - *(pfile_in_zip_read_info->stream.next_in+i); - - pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32, - pfile_in_zip_read_info->stream.next_out, - uDoCopy); - pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy; - pfile_in_zip_read_info->stream.avail_in -= uDoCopy; - pfile_in_zip_read_info->stream.avail_out -= uDoCopy; - pfile_in_zip_read_info->stream.next_out += uDoCopy; - pfile_in_zip_read_info->stream.next_in += uDoCopy; - pfile_in_zip_read_info->stream.total_out += uDoCopy; - iRead += uDoCopy; - } - else - { - uLong uTotalOutBefore,uTotalOutAfter; - const Bytef *bufBefore; - uLong uOutThis; - int flush=Z_SYNC_FLUSH; - - uTotalOutBefore = pfile_in_zip_read_info->stream.total_out; - bufBefore = pfile_in_zip_read_info->stream.next_out; - - /* - if ((pfile_in_zip_read_info->rest_read_uncompressed == - pfile_in_zip_read_info->stream.avail_out) && - (pfile_in_zip_read_info->rest_read_compressed == 0)) - flush = Z_FINISH; - */ - err=inflate(&pfile_in_zip_read_info->stream,flush); - - if ((err>=0) && (pfile_in_zip_read_info->stream.msg!=NULL)) - err = Z_DATA_ERROR; - - uTotalOutAfter = pfile_in_zip_read_info->stream.total_out; - uOutThis = uTotalOutAfter-uTotalOutBefore; - - pfile_in_zip_read_info->crc32 = - crc32(pfile_in_zip_read_info->crc32,bufBefore, - (uInt)(uOutThis)); - - pfile_in_zip_read_info->rest_read_uncompressed -= - uOutThis; - - iRead += (uInt)(uTotalOutAfter - uTotalOutBefore); - - if (err==Z_STREAM_END) - return (iRead==0) ? UNZ_EOF : iRead; - if (err!=Z_OK) - break; - } - } - - if (err==Z_OK) - return iRead; - return err; -} - - -/* - Give the current position in uncompressed data -*/ -extern z_off_t ZEXPORT unztell (file) - unzFile file; -{ - unz_s* s; - file_in_zip_read_info_s* pfile_in_zip_read_info; - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; - pfile_in_zip_read_info=s->pfile_in_zip_read; - - if (pfile_in_zip_read_info==NULL) - return UNZ_PARAMERROR; - - return (z_off_t)pfile_in_zip_read_info->stream.total_out; -} - - -/* - return 1 if the end of file was reached, 0 elsewhere -*/ -extern int ZEXPORT unzeof (file) - unzFile file; -{ - unz_s* s; - file_in_zip_read_info_s* pfile_in_zip_read_info; - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; - pfile_in_zip_read_info=s->pfile_in_zip_read; - - if (pfile_in_zip_read_info==NULL) - return UNZ_PARAMERROR; - - if (pfile_in_zip_read_info->rest_read_uncompressed == 0) - return 1; - else - return 0; -} - - - -/* - Read extra field from the current file (opened by unzOpenCurrentFile) - This is the local-header version of the extra field (sometimes, there is - more info in the local-header version than in the central-header) - - if buf==NULL, it return the size of the local extra field that can be read - - if buf!=NULL, len is the size of the buffer, the extra header is copied in - buf. - the return value is the number of bytes copied in buf, or (if <0) - the error code -*/ -extern int ZEXPORT unzGetLocalExtrafield (file,buf,len) - unzFile file; - voidp buf; - unsigned len; -{ - unz_s* s; - file_in_zip_read_info_s* pfile_in_zip_read_info; - uInt read_now; - uLong size_to_read; - - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; - pfile_in_zip_read_info=s->pfile_in_zip_read; - - if (pfile_in_zip_read_info==NULL) - return UNZ_PARAMERROR; - - size_to_read = (pfile_in_zip_read_info->size_local_extrafield - - pfile_in_zip_read_info->pos_local_extrafield); - - if (buf==NULL) - return (int)size_to_read; - - if (len>size_to_read) - read_now = (uInt)size_to_read; - else - read_now = (uInt)len ; - - if (read_now==0) - return 0; - - if (ZSEEK(pfile_in_zip_read_info->z_filefunc, - pfile_in_zip_read_info->filestream, - pfile_in_zip_read_info->offset_local_extrafield + - pfile_in_zip_read_info->pos_local_extrafield, - ZLIB_FILEFUNC_SEEK_SET)!=0) - return UNZ_ERRNO; - - if (ZREAD(pfile_in_zip_read_info->z_filefunc, - pfile_in_zip_read_info->filestream, - buf,read_now)!=read_now) - return UNZ_ERRNO; - - return (int)read_now; -} - -/* - Close the file in zip opened with unzipOpenCurrentFile - Return UNZ_CRCERROR if all the file was read but the CRC is not good -*/ -extern int ZEXPORT unzCloseCurrentFile (file) - unzFile file; -{ - int err=UNZ_OK; - - unz_s* s; - file_in_zip_read_info_s* pfile_in_zip_read_info; - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; - pfile_in_zip_read_info=s->pfile_in_zip_read; - - if (pfile_in_zip_read_info==NULL) - return UNZ_PARAMERROR; - - - if ((pfile_in_zip_read_info->rest_read_uncompressed == 0) && - (!pfile_in_zip_read_info->raw)) - { - if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait) - err=UNZ_CRCERROR; - } - - - TRYFREE(pfile_in_zip_read_info->read_buffer); - pfile_in_zip_read_info->read_buffer = NULL; - if (pfile_in_zip_read_info->stream_initialised) - inflateEnd(&pfile_in_zip_read_info->stream); - - pfile_in_zip_read_info->stream_initialised = 0; - TRYFREE(pfile_in_zip_read_info); - - s->pfile_in_zip_read=NULL; - - return err; -} - - -/* - Get the global comment string of the ZipFile, in the szComment buffer. - uSizeBuf is the size of the szComment buffer. - return the number of byte copied or an error code <0 -*/ -extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf) - unzFile file; - char *szComment; - uLong uSizeBuf; -{ - int err=UNZ_OK; - unz_s* s; - uLong uReadThis ; - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; - - uReadThis = uSizeBuf; - if (uReadThis>s->gi.size_comment) - uReadThis = s->gi.size_comment; - - if (ZSEEK(s->z_filefunc,s->filestream,s->central_pos+22,ZLIB_FILEFUNC_SEEK_SET)!=0) - return UNZ_ERRNO; - - if (uReadThis>0) - { - *szComment='\0'; - if (ZREAD(s->z_filefunc,s->filestream,szComment,uReadThis)!=uReadThis) - return UNZ_ERRNO; - } - - if ((szComment != NULL) && (uSizeBuf > s->gi.size_comment)) - *(szComment+s->gi.size_comment)='\0'; - return (int)uReadThis; -} - -/* Additions by RX '2004 */ -extern uLong ZEXPORT unzGetOffset (file) - unzFile file; -{ - unz_s* s; - - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; - if (!s->current_file_ok) - return 0; - if (s->gi.number_entry != 0 && s->gi.number_entry != 0xffff) - if (s->num_file==s->gi.number_entry) - return 0; - return s->pos_in_central_dir; -} - -extern int ZEXPORT unzSetOffset (file, pos) - unzFile file; - uLong pos; -{ - unz_s* s; - int err; - - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; - - s->pos_in_central_dir = pos; - s->num_file = s->gi.number_entry; /* hack */ - err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, - &s->cur_file_info_internal, - NULL,0,NULL,0,NULL,0); - s->current_file_ok = (err == UNZ_OK); - return err; -} diff --git a/projects/mtg/minizip/unzip.h b/projects/mtg/minizip/unzip.h deleted file mode 100644 index c3206a058..000000000 --- a/projects/mtg/minizip/unzip.h +++ /dev/null @@ -1,354 +0,0 @@ -/* unzip.h -- IO for uncompress .zip files using zlib - Version 1.01e, February 12th, 2005 - - Copyright (C) 1998-2005 Gilles Vollant - - This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g - WinZip, InfoZip tools and compatible. - - Multi volume ZipFile (span) are not supported. - Encryption compatible with pkzip 2.04g only supported - Old compressions used by old PKZip 1.x are not supported - - - I WAIT FEEDBACK at mail info@winimage.com - Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution - - Condition of use and distribution are the same than zlib : - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - -*/ - -/* for more info about .ZIP format, see - http://www.info-zip.org/pub/infozip/doc/appnote-981119-iz.zip - http://www.info-zip.org/pub/infozip/doc/ - PkWare has also a specification at : - ftp://ftp.pkware.com/probdesc.zip -*/ - -#ifndef _unz_H -#define _unz_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef _ZLIB_H -#include "zlib.h" -#endif - -#ifndef _ZLIBIOAPI_H -#include "ioapi.h" -#endif - -#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP) -/* like the STRICT of WIN32, we define a pointer that cannot be converted - from (void*) without cast */ -typedef struct TagunzFile__ { int unused; } unzFile__; -typedef unzFile__ *unzFile; -#else -typedef voidp unzFile; -#endif - - -#define UNZ_OK (0) -#define UNZ_END_OF_LIST_OF_FILE (-100) -#define UNZ_ERRNO (Z_ERRNO) -#define UNZ_EOF (0) -#define UNZ_PARAMERROR (-102) -#define UNZ_BADZIPFILE (-103) -#define UNZ_INTERNALERROR (-104) -#define UNZ_CRCERROR (-105) - -/* tm_unz contain date/time info */ -typedef struct tm_unz_s -{ - uInt tm_sec; /* seconds after the minute - [0,59] */ - uInt tm_min; /* minutes after the hour - [0,59] */ - uInt tm_hour; /* hours since midnight - [0,23] */ - uInt tm_mday; /* day of the month - [1,31] */ - uInt tm_mon; /* months since January - [0,11] */ - uInt tm_year; /* years - [1980..2044] */ -} tm_unz; - -/* unz_global_info structure contain global data about the ZIPfile - These data comes from the end of central dir */ -typedef struct unz_global_info_s -{ - uLong number_entry; /* total number of entries in - the central dir on this disk */ - uLong size_comment; /* size of the global comment of the zipfile */ -} unz_global_info; - - -/* unz_file_info contain information about a file in the zipfile */ -typedef struct unz_file_info_s -{ - uLong version; /* version made by 2 bytes */ - uLong version_needed; /* version needed to extract 2 bytes */ - uLong flag; /* general purpose bit flag 2 bytes */ - uLong compression_method; /* compression method 2 bytes */ - uLong dosDate; /* last mod file date in Dos fmt 4 bytes */ - uLong crc; /* crc-32 4 bytes */ - uLong compressed_size; /* compressed size 4 bytes */ - uLong uncompressed_size; /* uncompressed size 4 bytes */ - uLong size_filename; /* filename length 2 bytes */ - uLong size_file_extra; /* extra field length 2 bytes */ - uLong size_file_comment; /* file comment length 2 bytes */ - - uLong disk_num_start; /* disk number start 2 bytes */ - uLong internal_fa; /* internal file attributes 2 bytes */ - uLong external_fa; /* external file attributes 4 bytes */ - - tm_unz tmu_date; -} unz_file_info; - -extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1, - const char* fileName2, - int iCaseSensitivity)); -/* - Compare two filename (fileName1,fileName2). - If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp) - If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi - or strcasecmp) - If iCaseSenisivity = 0, case sensitivity is defaut of your operating system - (like 1 on Unix, 2 on Windows) -*/ - - -extern unzFile ZEXPORT unzOpen OF((const char *path)); -/* - Open a Zip file. path contain the full pathname (by example, - on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer - "zlib/zlib113.zip". - If the zipfile cannot be opened (file don't exist or in not valid), the - return value is NULL. - Else, the return value is a unzFile Handle, usable with other function - of this unzip package. -*/ - -extern unzFile ZEXPORT unzOpen2 OF((const char *path, - zlib_filefunc_def* pzlib_filefunc_def)); -/* - Open a Zip file, like unzOpen, but provide a set of file low level API - for read/write the zip file (see ioapi.h) -*/ - -extern int ZEXPORT unzClose OF((unzFile file)); -/* - Close a ZipFile opened with unzipOpen. - If there is files inside the .Zip opened with unzOpenCurrentFile (see later), - these files MUST be closed with unzipCloseCurrentFile before call unzipClose. - return UNZ_OK if there is no problem. */ - -extern int ZEXPORT unzGetGlobalInfo OF((unzFile file, - unz_global_info *pglobal_info)); -/* - Write info about the ZipFile in the *pglobal_info structure. - No preparation of the structure is needed - return UNZ_OK if there is no problem. */ - - -extern int ZEXPORT unzGetGlobalComment OF((unzFile file, - char *szComment, - uLong uSizeBuf)); -/* - Get the global comment string of the ZipFile, in the szComment buffer. - uSizeBuf is the size of the szComment buffer. - return the number of byte copied or an error code <0 -*/ - - -/***************************************************************************/ -/* Unzip package allow you browse the directory of the zipfile */ - -extern int ZEXPORT unzGoToFirstFile OF((unzFile file)); -/* - Set the current file of the zipfile to the first file. - return UNZ_OK if there is no problem -*/ - -extern int ZEXPORT unzGoToNextFile OF((unzFile file)); -/* - Set the current file of the zipfile to the next file. - return UNZ_OK if there is no problem - return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. -*/ - -extern int ZEXPORT unzLocateFile OF((unzFile file, - const char *szFileName, - int iCaseSensitivity)); -/* - Try locate the file szFileName in the zipfile. - For the iCaseSensitivity signification, see unzStringFileNameCompare - - return value : - UNZ_OK if the file is found. It becomes the current file. - UNZ_END_OF_LIST_OF_FILE if the file is not found -*/ - - -/* ****************************************** */ -/* Ryan supplied functions */ -/* unz_file_info contain information about a file in the zipfile */ -typedef struct unz_file_pos_s -{ - uLong pos_in_zip_directory; /* offset in zip file directory */ - uLong num_of_file; /* # of file */ -} unz_file_pos; - -extern int ZEXPORT unzGetFilePos( - unzFile file, - unz_file_pos* file_pos); - -extern int ZEXPORT unzGoToFilePos( - unzFile file, - unz_file_pos* file_pos); - -/* ****************************************** */ - -extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file, - unz_file_info *pfile_info, - char *szFileName, - uLong fileNameBufferSize, - void *extraField, - uLong extraFieldBufferSize, - char *szComment, - uLong commentBufferSize)); -/* - Get Info about the current file - if pfile_info!=NULL, the *pfile_info structure will contain somes info about - the current file - if szFileName!=NULL, the filemane string will be copied in szFileName - (fileNameBufferSize is the size of the buffer) - if extraField!=NULL, the extra field information will be copied in extraField - (extraFieldBufferSize is the size of the buffer). - This is the Central-header version of the extra field - if szComment!=NULL, the comment string of the file will be copied in szComment - (commentBufferSize is the size of the buffer) -*/ - -/***************************************************************************/ -/* for reading the content of the current zipfile, you can open it, read data - from it, and close it (you can close it before reading all the file) - */ - -extern int ZEXPORT unzOpenCurrentFile OF((unzFile file)); -/* - Open for reading data the current file in the zipfile. - If there is no error, the return value is UNZ_OK. -*/ - -extern int ZEXPORT unzOpenCurrentFilePassword OF((unzFile file, - const char* password)); -/* - Open for reading data the current file in the zipfile. - password is a crypting password - If there is no error, the return value is UNZ_OK. -*/ - -extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file, - int* method, - int* level, - int raw)); -/* - Same than unzOpenCurrentFile, but open for read raw the file (not uncompress) - if raw==1 - *method will receive method of compression, *level will receive level of - compression - note : you can set level parameter as NULL (if you did not want known level, - but you CANNOT set method parameter as NULL -*/ - -extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file, - int* method, - int* level, - int raw, - const char* password)); -/* - Same than unzOpenCurrentFile, but open for read raw the file (not uncompress) - if raw==1 - *method will receive method of compression, *level will receive level of - compression - note : you can set level parameter as NULL (if you did not want known level, - but you CANNOT set method parameter as NULL -*/ - - -extern int ZEXPORT unzCloseCurrentFile OF((unzFile file)); -/* - Close the file in zip opened with unzOpenCurrentFile - Return UNZ_CRCERROR if all the file was read but the CRC is not good -*/ - -extern int ZEXPORT unzReadCurrentFile OF((unzFile file, - voidp buf, - unsigned len)); -/* - Read bytes from the current file (opened by unzOpenCurrentFile) - buf contain buffer where data must be copied - len the size of buf. - - return the number of byte copied if somes bytes are copied - return 0 if the end of file was reached - return <0 with error code if there is an error - (UNZ_ERRNO for IO error, or zLib error for uncompress error) -*/ - -extern z_off_t ZEXPORT unztell OF((unzFile file)); -/* - Give the current position in uncompressed data -*/ - -extern int ZEXPORT unzeof OF((unzFile file)); -/* - return 1 if the end of file was reached, 0 elsewhere -*/ - -extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file, - voidp buf, - unsigned len)); -/* - Read extra field from the current file (opened by unzOpenCurrentFile) - This is the local-header version of the extra field (sometimes, there is - more info in the local-header version than in the central-header) - - if buf==NULL, it return the size of the local extra field - - if buf!=NULL, len is the size of the buffer, the extra header is copied in - buf. - the return value is the number of bytes copied in buf, or (if <0) - the error code -*/ - -/***************************************************************************/ - -/* Get the current file offset */ -extern uLong ZEXPORT unzGetOffset (unzFile file); - -/* Set the current file offset */ -extern int ZEXPORT unzSetOffset (unzFile file, uLong pos); - - - -#ifdef __cplusplus -} -#endif - -#endif /* _unz_H */ diff --git a/projects/mtg/minizip/zip.c b/projects/mtg/minizip/zip.c deleted file mode 100644 index 400e2ba37..000000000 --- a/projects/mtg/minizip/zip.c +++ /dev/null @@ -1,1219 +0,0 @@ -/* zip.c -- IO on .zip files using zlib - Version 1.01e, February 12th, 2005 - - 27 Dec 2004 Rolf Kalbermatter - Modification to zipOpen2 to support globalComment retrieval. - - Copyright (C) 1998-2005 Gilles Vollant - - Read zip.h for more info -*/ - - -#include -#include -#include -#include -#include "zlib.h" -#include "zip.h" - -#ifdef STDC -# include -# include -# include -#endif -#ifdef NO_ERRNO_H - extern int errno; -#else -# include -#endif - - -#ifndef local -# define local static -#endif -/* compile with -Dlocal if your debugger can't find static symbols */ - -#ifndef VERSIONMADEBY -# define VERSIONMADEBY (0x0) /* platform depedent */ -#endif - -#ifndef Z_BUFSIZE -#define Z_BUFSIZE (16384) -#endif - -#ifndef Z_MAXFILENAMEINZIP -#define Z_MAXFILENAMEINZIP (256) -#endif - -#ifndef ALLOC -# define ALLOC(size) (malloc(size)) -#endif -#ifndef TRYFREE -# define TRYFREE(p) {if (p) free(p);} -#endif - -/* -#define SIZECENTRALDIRITEM (0x2e) -#define SIZEZIPLOCALHEADER (0x1e) -*/ - -/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */ - -#ifndef SEEK_CUR -#define SEEK_CUR 1 -#endif - -#ifndef SEEK_END -#define SEEK_END 2 -#endif - -#ifndef SEEK_SET -#define SEEK_SET 0 -#endif - -#ifndef DEF_MEM_LEVEL -#if MAX_MEM_LEVEL >= 8 -# define DEF_MEM_LEVEL 8 -#else -# define DEF_MEM_LEVEL MAX_MEM_LEVEL -#endif -#endif -const char zip_copyright[] = - " zip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"; - - -#define SIZEDATA_INDATABLOCK (4096-(4*4)) - -#define LOCALHEADERMAGIC (0x04034b50) -#define CENTRALHEADERMAGIC (0x02014b50) -#define ENDHEADERMAGIC (0x06054b50) - -#define FLAG_LOCALHEADER_OFFSET (0x06) -#define CRC_LOCALHEADER_OFFSET (0x0e) - -#define SIZECENTRALHEADER (0x2e) /* 46 */ - -typedef struct linkedlist_datablock_internal_s -{ - struct linkedlist_datablock_internal_s* next_datablock; - uLong avail_in_this_block; - uLong filled_in_this_block; - uLong unused; /* for future use and alignement */ - unsigned char data[SIZEDATA_INDATABLOCK]; -} linkedlist_datablock_internal; - -typedef struct linkedlist_data_s -{ - linkedlist_datablock_internal* first_block; - linkedlist_datablock_internal* last_block; -} linkedlist_data; - - -typedef struct -{ - z_stream stream; /* zLib stream structure for inflate */ - int stream_initialised; /* 1 is stream is initialised */ - uInt pos_in_buffered_data; /* last written byte in buffered_data */ - - uLong pos_local_header; /* offset of the local header of the file - currenty writing */ - char* central_header; /* central header data for the current file */ - uLong size_centralheader; /* size of the central header for cur file */ - uLong flag; /* flag of the file currently writing */ - - int method; /* compression method of file currenty wr.*/ - int raw; /* 1 for directly writing raw data */ - Byte buffered_data[Z_BUFSIZE];/* buffer contain compressed data to be writ*/ - uLong dosDate; - uLong crc32; - int encrypt; -#ifndef NOCRYPT - unsigned long keys[3]; /* keys defining the pseudo-random sequence */ - const unsigned long* pcrc_32_tab; - int crypt_header_size; -#endif -} curfile_info; - -typedef struct -{ - zlib_filefunc_def z_filefunc; - voidpf filestream; /* io structore of the zipfile */ - linkedlist_data central_dir;/* datablock with central dir in construction*/ - int in_opened_file_inzip; /* 1 if a file in the zip is currently writ.*/ - curfile_info ci; /* info on the file curretly writing */ - - uLong begin_pos; /* position of the beginning of the zipfile */ - uLong add_position_when_writting_offset; - uLong number_entry; -#ifndef NO_ADDFILEINEXISTINGZIP - char *globalcomment; -#endif -} zip_internal; - - - -#ifndef NOCRYPT -#define INCLUDECRYPTINGCODE_IFCRYPTALLOWED -#include "crypt.h" -#endif - -local linkedlist_datablock_internal* allocate_new_datablock() -{ - linkedlist_datablock_internal* ldi; - ldi = (linkedlist_datablock_internal*) - ALLOC(sizeof(linkedlist_datablock_internal)); - if (ldi!=NULL) - { - ldi->next_datablock = NULL ; - ldi->filled_in_this_block = 0 ; - ldi->avail_in_this_block = SIZEDATA_INDATABLOCK ; - } - return ldi; -} - -local void free_datablock(ldi) - linkedlist_datablock_internal* ldi; -{ - while (ldi!=NULL) - { - linkedlist_datablock_internal* ldinext = ldi->next_datablock; - TRYFREE(ldi); - ldi = ldinext; - } -} - -local void init_linkedlist(ll) - linkedlist_data* ll; -{ - ll->first_block = ll->last_block = NULL; -} - -local void free_linkedlist(ll) - linkedlist_data* ll; -{ - free_datablock(ll->first_block); - ll->first_block = ll->last_block = NULL; -} - - -local int add_data_in_datablock(ll,buf,len) - linkedlist_data* ll; - const void* buf; - uLong len; -{ - linkedlist_datablock_internal* ldi; - const unsigned char* from_copy; - - if (ll==NULL) - return ZIP_INTERNALERROR; - - if (ll->last_block == NULL) - { - ll->first_block = ll->last_block = allocate_new_datablock(); - if (ll->first_block == NULL) - return ZIP_INTERNALERROR; - } - - ldi = ll->last_block; - from_copy = (unsigned char*)buf; - - while (len>0) - { - uInt copy_this; - uInt i; - unsigned char* to_copy; - - if (ldi->avail_in_this_block==0) - { - ldi->next_datablock = allocate_new_datablock(); - if (ldi->next_datablock == NULL) - return ZIP_INTERNALERROR; - ldi = ldi->next_datablock ; - ll->last_block = ldi; - } - - if (ldi->avail_in_this_block < len) - copy_this = (uInt)ldi->avail_in_this_block; - else - copy_this = (uInt)len; - - to_copy = &(ldi->data[ldi->filled_in_this_block]); - - for (i=0;ifilled_in_this_block += copy_this; - ldi->avail_in_this_block -= copy_this; - from_copy += copy_this ; - len -= copy_this; - } - return ZIP_OK; -} - - - -/****************************************************************************/ - -#ifndef NO_ADDFILEINEXISTINGZIP -/* =========================================================================== - Inputs a long in LSB order to the given file - nbByte == 1, 2 or 4 (byte, short or long) -*/ - -local int ziplocal_putValue OF((const zlib_filefunc_def* pzlib_filefunc_def, - voidpf filestream, uLong x, int nbByte)); -local int ziplocal_putValue (pzlib_filefunc_def, filestream, x, nbByte) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; - uLong x; - int nbByte; -{ - unsigned char buf[4]; - int n; - for (n = 0; n < nbByte; n++) - { - buf[n] = (unsigned char)(x & 0xff); - x >>= 8; - } - if (x != 0) - { /* data overflow - hack for ZIP64 (X Roche) */ - for (n = 0; n < nbByte; n++) - { - buf[n] = 0xff; - } - } - - if (ZWRITE(*pzlib_filefunc_def,filestream,buf,nbByte)!=(uLong)nbByte) - return ZIP_ERRNO; - else - return ZIP_OK; -} - -local void ziplocal_putValue_inmemory OF((void* dest, uLong x, int nbByte)); -local void ziplocal_putValue_inmemory (dest, x, nbByte) - void* dest; - uLong x; - int nbByte; -{ - unsigned char* buf=(unsigned char*)dest; - int n; - for (n = 0; n < nbByte; n++) { - buf[n] = (unsigned char)(x & 0xff); - x >>= 8; - } - - if (x != 0) - { /* data overflow - hack for ZIP64 */ - for (n = 0; n < nbByte; n++) - { - buf[n] = 0xff; - } - } -} - -/****************************************************************************/ - - -local uLong ziplocal_TmzDateToDosDate(ptm,dosDate) - const tm_zip* ptm; - uLong dosDate; -{ - uLong year = (uLong)ptm->tm_year; - if (year>1980) - year-=1980; - else if (year>80) - year-=80; - return - (uLong) (((ptm->tm_mday) + (32 * (ptm->tm_mon+1)) + (512 * year)) << 16) | - ((ptm->tm_sec/2) + (32* ptm->tm_min) + (2048 * (uLong)ptm->tm_hour)); -} - - -/****************************************************************************/ - -local int ziplocal_getByte OF(( - const zlib_filefunc_def* pzlib_filefunc_def, - voidpf filestream, - int *pi)); - -local int ziplocal_getByte(pzlib_filefunc_def,filestream,pi) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; - int *pi; -{ - unsigned char c; - int err = (int)ZREAD(*pzlib_filefunc_def,filestream,&c,1); - if (err==1) - { - *pi = (int)c; - return ZIP_OK; - } - else - { - if (ZERROR(*pzlib_filefunc_def,filestream)) - return ZIP_ERRNO; - else - return ZIP_EOF; - } -} - - -/* =========================================================================== - Reads a long in LSB order from the given gz_stream. Sets -*/ -local int ziplocal_getShort OF(( - const zlib_filefunc_def* pzlib_filefunc_def, - voidpf filestream, - uLong *pX)); - -local int ziplocal_getShort (pzlib_filefunc_def,filestream,pX) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; - uLong *pX; -{ - uLong x ; - int i; - int err; - - err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); - x = (uLong)i; - - if (err==ZIP_OK) - err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); - x += ((uLong)i)<<8; - - if (err==ZIP_OK) - *pX = x; - else - *pX = 0; - return err; -} - -local int ziplocal_getLong OF(( - const zlib_filefunc_def* pzlib_filefunc_def, - voidpf filestream, - uLong *pX)); - -local int ziplocal_getLong (pzlib_filefunc_def,filestream,pX) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; - uLong *pX; -{ - uLong x ; - int i; - int err; - - err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); - x = (uLong)i; - - if (err==ZIP_OK) - err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); - x += ((uLong)i)<<8; - - if (err==ZIP_OK) - err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); - x += ((uLong)i)<<16; - - if (err==ZIP_OK) - err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i); - x += ((uLong)i)<<24; - - if (err==ZIP_OK) - *pX = x; - else - *pX = 0; - return err; -} - -#ifndef BUFREADCOMMENT -#define BUFREADCOMMENT (0x400) -#endif -/* - Locate the Central directory of a zipfile (at the end, just before - the global comment) -*/ -local uLong ziplocal_SearchCentralDir OF(( - const zlib_filefunc_def* pzlib_filefunc_def, - voidpf filestream)); - -local uLong ziplocal_SearchCentralDir(pzlib_filefunc_def,filestream) - const zlib_filefunc_def* pzlib_filefunc_def; - voidpf filestream; -{ - unsigned char* buf; - uLong uSizeFile; - uLong uBackRead; - uLong uMaxBack=0xffff; /* maximum size of global comment */ - uLong uPosFound=0; - - if (ZSEEK(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) - return 0; - - - uSizeFile = ZTELL(*pzlib_filefunc_def,filestream); - - if (uMaxBack>uSizeFile) - uMaxBack = uSizeFile; - - buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); - if (buf==NULL) - return 0; - - uBackRead = 4; - while (uBackReaduMaxBack) - uBackRead = uMaxBack; - else - uBackRead+=BUFREADCOMMENT; - uReadPos = uSizeFile-uBackRead ; - - uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? - (BUFREADCOMMENT+4) : (uSizeFile-uReadPos); - if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) - break; - - if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) - break; - - for (i=(int)uReadSize-3; (i--)>0;) - if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && - ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) - { - uPosFound = uReadPos+i; - break; - } - - if (uPosFound!=0) - break; - } - TRYFREE(buf); - return uPosFound; -} -#endif /* !NO_ADDFILEINEXISTINGZIP*/ - -/************************************************************/ -extern zipFile ZEXPORT zipOpen2 (pathname, append, globalcomment, pzlib_filefunc_def) - const char *pathname; - int append; - zipcharpc* globalcomment; - zlib_filefunc_def* pzlib_filefunc_def; -{ - zip_internal ziinit; - zip_internal* zi; - int err=ZIP_OK; - - - if (pzlib_filefunc_def==NULL) - fill_fopen_filefunc(&ziinit.z_filefunc); - else - ziinit.z_filefunc = *pzlib_filefunc_def; - - ziinit.filestream = (*(ziinit.z_filefunc.zopen_file)) - (ziinit.z_filefunc.opaque, - pathname, - (append == APPEND_STATUS_CREATE) ? - (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_CREATE) : - (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_EXISTING)); - - if (ziinit.filestream == NULL) - return NULL; - ziinit.begin_pos = ZTELL(ziinit.z_filefunc,ziinit.filestream); - ziinit.in_opened_file_inzip = 0; - ziinit.ci.stream_initialised = 0; - ziinit.number_entry = 0; - ziinit.add_position_when_writting_offset = 0; - init_linkedlist(&(ziinit.central_dir)); - - - zi = (zip_internal*)ALLOC(sizeof(zip_internal)); - if (zi==NULL) - { - ZCLOSE(ziinit.z_filefunc,ziinit.filestream); - return NULL; - } - - /* now we add file in a zipfile */ -# ifndef NO_ADDFILEINEXISTINGZIP - ziinit.globalcomment = NULL; - if (append == APPEND_STATUS_ADDINZIP) - { - uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ - - uLong size_central_dir; /* size of the central directory */ - uLong offset_central_dir; /* offset of start of central directory */ - uLong central_pos,uL; - - uLong number_disk; /* number of the current dist, used for - spaning ZIP, unsupported, always 0*/ - uLong number_disk_with_CD; /* number the the disk with central dir, used - for spaning ZIP, unsupported, always 0*/ - uLong number_entry; - uLong number_entry_CD; /* total number of entries in - the central dir - (same than number_entry on nospan) */ - uLong size_comment; - - central_pos = ziplocal_SearchCentralDir(&ziinit.z_filefunc,ziinit.filestream); - if (central_pos==0) - err=ZIP_ERRNO; - - if (ZSEEK(ziinit.z_filefunc, ziinit.filestream, - central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) - err=ZIP_ERRNO; - - /* the signature, already checked */ - if (ziplocal_getLong(&ziinit.z_filefunc, ziinit.filestream,&uL)!=ZIP_OK) - err=ZIP_ERRNO; - - /* number of this disk */ - if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_disk)!=ZIP_OK) - err=ZIP_ERRNO; - - /* number of the disk with the start of the central directory */ - if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_disk_with_CD)!=ZIP_OK) - err=ZIP_ERRNO; - - /* total number of entries in the central dir on this disk */ - if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_entry)!=ZIP_OK) - err=ZIP_ERRNO; - - /* total number of entries in the central dir */ - if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_entry_CD)!=ZIP_OK) - err=ZIP_ERRNO; - - if ((number_entry_CD!=number_entry) || - (number_disk_with_CD!=0) || - (number_disk!=0)) - err=ZIP_BADZIPFILE; - - /* size of the central directory */ - if (ziplocal_getLong(&ziinit.z_filefunc, ziinit.filestream,&size_central_dir)!=ZIP_OK) - err=ZIP_ERRNO; - - /* offset of start of central directory with respect to the - starting disk number */ - if (ziplocal_getLong(&ziinit.z_filefunc, ziinit.filestream,&offset_central_dir)!=ZIP_OK) - err=ZIP_ERRNO; - - /* zipfile global comment length */ - if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&size_comment)!=ZIP_OK) - err=ZIP_ERRNO; - - if ((central_pos0) - { - ziinit.globalcomment = ALLOC(size_comment+1); - if (ziinit.globalcomment) - { - size_comment = ZREAD(ziinit.z_filefunc, ziinit.filestream,ziinit.globalcomment,size_comment); - ziinit.globalcomment[size_comment]=0; - } - } - - byte_before_the_zipfile = central_pos - - (offset_central_dir+size_central_dir); - ziinit.add_position_when_writting_offset = byte_before_the_zipfile; - - { - uLong size_central_dir_to_read = size_central_dir; - size_t buf_size = SIZEDATA_INDATABLOCK; - void* buf_read = (void*)ALLOC(buf_size); - if (ZSEEK(ziinit.z_filefunc, ziinit.filestream, - offset_central_dir + byte_before_the_zipfile, - ZLIB_FILEFUNC_SEEK_SET) != 0) - err=ZIP_ERRNO; - - while ((size_central_dir_to_read>0) && (err==ZIP_OK)) - { - uLong read_this = SIZEDATA_INDATABLOCK; - if (read_this > size_central_dir_to_read) - read_this = size_central_dir_to_read; - if (ZREAD(ziinit.z_filefunc, ziinit.filestream,buf_read,read_this) != read_this) - err=ZIP_ERRNO; - - if (err==ZIP_OK) - err = add_data_in_datablock(&ziinit.central_dir,buf_read, - (uLong)read_this); - size_central_dir_to_read-=read_this; - } - TRYFREE(buf_read); - } - ziinit.begin_pos = byte_before_the_zipfile; - ziinit.number_entry = number_entry_CD; - - if (ZSEEK(ziinit.z_filefunc, ziinit.filestream, - offset_central_dir+byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0) - err=ZIP_ERRNO; - } - - if (globalcomment) - { - *globalcomment = ziinit.globalcomment; - } -# endif /* !NO_ADDFILEINEXISTINGZIP*/ - - if (err != ZIP_OK) - { -# ifndef NO_ADDFILEINEXISTINGZIP - TRYFREE(ziinit.globalcomment); -# endif /* !NO_ADDFILEINEXISTINGZIP*/ - TRYFREE(zi); - return NULL; - } - else - { - *zi = ziinit; - return (zipFile)zi; - } -} - -extern zipFile ZEXPORT zipOpen (pathname, append) - const char *pathname; - int append; -{ - return zipOpen2(pathname,append,NULL,NULL); -} - -extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level, raw, - windowBits, memLevel, strategy, - password, crcForCrypting) - zipFile file; - const char* filename; - const zip_fileinfo* zipfi; - const void* extrafield_local; - uInt size_extrafield_local; - const void* extrafield_global; - uInt size_extrafield_global; - const char* comment; - int method; - int level; - int raw; - int windowBits; - int memLevel; - int strategy; - const char* password; - uLong crcForCrypting; -{ - zip_internal* zi; - uInt size_filename; - uInt size_comment; - uInt i; - int err = ZIP_OK; - -# ifdef NOCRYPT - if (password != NULL) - return ZIP_PARAMERROR; -# endif - - if (file == NULL) - return ZIP_PARAMERROR; - if ((method!=0) && (method!=Z_DEFLATED)) - return ZIP_PARAMERROR; - - zi = (zip_internal*)file; - - if (zi->in_opened_file_inzip == 1) - { - err = zipCloseFileInZip (file); - if (err != ZIP_OK) - return err; - } - - - if (filename==NULL) - filename="-"; - - if (comment==NULL) - size_comment = 0; - else - size_comment = (uInt)strlen(comment); - - size_filename = (uInt)strlen(filename); - - if (zipfi == NULL) - zi->ci.dosDate = 0; - else - { - if (zipfi->dosDate != 0) - zi->ci.dosDate = zipfi->dosDate; - else zi->ci.dosDate = ziplocal_TmzDateToDosDate(&zipfi->tmz_date,zipfi->dosDate); - } - - zi->ci.flag = 0; - if ((level==8) || (level==9)) - zi->ci.flag |= 2; - if ((level==2)) - zi->ci.flag |= 4; - if ((level==1)) - zi->ci.flag |= 6; - if (password != NULL) - zi->ci.flag |= 1; - - zi->ci.crc32 = 0; - zi->ci.method = method; - zi->ci.encrypt = 0; - zi->ci.stream_initialised = 0; - zi->ci.pos_in_buffered_data = 0; - zi->ci.raw = raw; - zi->ci.pos_local_header = ZTELL(zi->z_filefunc,zi->filestream) ; - zi->ci.size_centralheader = SIZECENTRALHEADER + size_filename + - size_extrafield_global + size_comment; - zi->ci.central_header = (char*)ALLOC((uInt)zi->ci.size_centralheader); - - ziplocal_putValue_inmemory(zi->ci.central_header,(uLong)CENTRALHEADERMAGIC,4); - /* version info */ - ziplocal_putValue_inmemory(zi->ci.central_header+4,(uLong)VERSIONMADEBY,2); - ziplocal_putValue_inmemory(zi->ci.central_header+6,(uLong)20,2); - ziplocal_putValue_inmemory(zi->ci.central_header+8,(uLong)zi->ci.flag,2); - ziplocal_putValue_inmemory(zi->ci.central_header+10,(uLong)zi->ci.method,2); - ziplocal_putValue_inmemory(zi->ci.central_header+12,(uLong)zi->ci.dosDate,4); - ziplocal_putValue_inmemory(zi->ci.central_header+16,(uLong)0,4); /*crc*/ - ziplocal_putValue_inmemory(zi->ci.central_header+20,(uLong)0,4); /*compr size*/ - ziplocal_putValue_inmemory(zi->ci.central_header+24,(uLong)0,4); /*uncompr size*/ - ziplocal_putValue_inmemory(zi->ci.central_header+28,(uLong)size_filename,2); - ziplocal_putValue_inmemory(zi->ci.central_header+30,(uLong)size_extrafield_global,2); - ziplocal_putValue_inmemory(zi->ci.central_header+32,(uLong)size_comment,2); - ziplocal_putValue_inmemory(zi->ci.central_header+34,(uLong)0,2); /*disk nm start*/ - - if (zipfi==NULL) - ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)0,2); - else - ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)zipfi->internal_fa,2); - - if (zipfi==NULL) - ziplocal_putValue_inmemory(zi->ci.central_header+38,(uLong)0,4); - else - ziplocal_putValue_inmemory(zi->ci.central_header+38,(uLong)zipfi->external_fa,4); - - ziplocal_putValue_inmemory(zi->ci.central_header+42,(uLong)zi->ci.pos_local_header- zi->add_position_when_writting_offset,4); - - for (i=0;ici.central_header+SIZECENTRALHEADER+i) = *(filename+i); - - for (i=0;ici.central_header+SIZECENTRALHEADER+size_filename+i) = - *(((const char*)extrafield_global)+i); - - for (i=0;ici.central_header+SIZECENTRALHEADER+size_filename+ - size_extrafield_global+i) = *(comment+i); - if (zi->ci.central_header == NULL) - return ZIP_INTERNALERROR; - - /* write the local header */ - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)LOCALHEADERMAGIC,4); - - if (err==ZIP_OK) - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)20,2);/* version needed to extract */ - if (err==ZIP_OK) - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.flag,2); - - if (err==ZIP_OK) - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.method,2); - - if (err==ZIP_OK) - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.dosDate,4); - - if (err==ZIP_OK) - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* crc 32, unknown */ - if (err==ZIP_OK) - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* compressed size, unknown */ - if (err==ZIP_OK) - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* uncompressed size, unknown */ - - if (err==ZIP_OK) - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_filename,2); - - if (err==ZIP_OK) - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_extrafield_local,2); - - if ((err==ZIP_OK) && (size_filename>0)) - if (ZWRITE(zi->z_filefunc,zi->filestream,filename,size_filename)!=size_filename) - err = ZIP_ERRNO; - - if ((err==ZIP_OK) && (size_extrafield_local>0)) - if (ZWRITE(zi->z_filefunc,zi->filestream,extrafield_local,size_extrafield_local) - !=size_extrafield_local) - err = ZIP_ERRNO; - - zi->ci.stream.avail_in = (uInt)0; - zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; - zi->ci.stream.next_out = zi->ci.buffered_data; - zi->ci.stream.total_in = 0; - zi->ci.stream.total_out = 0; - - if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) - { - zi->ci.stream.zalloc = (alloc_func)0; - zi->ci.stream.zfree = (free_func)0; - zi->ci.stream.opaque = (voidpf)0; - - if (windowBits>0) - windowBits = -windowBits; - - err = deflateInit2(&zi->ci.stream, level, - Z_DEFLATED, windowBits, memLevel, strategy); - - if (err==Z_OK) - zi->ci.stream_initialised = 1; - } -# ifndef NOCRYPT - zi->ci.crypt_header_size = 0; - if ((err==Z_OK) && (password != NULL)) - { - unsigned char bufHead[RAND_HEAD_LEN]; - unsigned int sizeHead; - zi->ci.encrypt = 1; - zi->ci.pcrc_32_tab = get_crc_table(); - /*init_keys(password,zi->ci.keys,zi->ci.pcrc_32_tab);*/ - - sizeHead=crypthead(password,bufHead,RAND_HEAD_LEN,zi->ci.keys,zi->ci.pcrc_32_tab,crcForCrypting); - zi->ci.crypt_header_size = sizeHead; - - if (ZWRITE(zi->z_filefunc,zi->filestream,bufHead,sizeHead) != sizeHead) - err = ZIP_ERRNO; - } -# endif - - if (err==Z_OK) - zi->in_opened_file_inzip = 1; - return err; -} - -extern int ZEXPORT zipOpenNewFileInZip2(file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level, raw) - zipFile file; - const char* filename; - const zip_fileinfo* zipfi; - const void* extrafield_local; - uInt size_extrafield_local; - const void* extrafield_global; - uInt size_extrafield_global; - const char* comment; - int method; - int level; - int raw; -{ - return zipOpenNewFileInZip3 (file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level, raw, - -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, - NULL, 0); -} - -extern int ZEXPORT zipOpenNewFileInZip (file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level) - zipFile file; - const char* filename; - const zip_fileinfo* zipfi; - const void* extrafield_local; - uInt size_extrafield_local; - const void* extrafield_global; - uInt size_extrafield_global; - const char* comment; - int method; - int level; -{ - return zipOpenNewFileInZip2 (file, filename, zipfi, - extrafield_local, size_extrafield_local, - extrafield_global, size_extrafield_global, - comment, method, level, 0); -} - -local int zipFlushWriteBuffer(zi) - zip_internal* zi; -{ - int err=ZIP_OK; - - if (zi->ci.encrypt != 0) - { -#ifndef NOCRYPT - uInt i; - int t; - for (i=0;ici.pos_in_buffered_data;i++) - zi->ci.buffered_data[i] = zencode(zi->ci.keys, zi->ci.pcrc_32_tab, - zi->ci.buffered_data[i],t); -#endif - } - if (ZWRITE(zi->z_filefunc,zi->filestream,zi->ci.buffered_data,zi->ci.pos_in_buffered_data) - !=zi->ci.pos_in_buffered_data) - err = ZIP_ERRNO; - zi->ci.pos_in_buffered_data = 0; - return err; -} - -extern int ZEXPORT zipWriteInFileInZip (file, buf, len) - zipFile file; - const void* buf; - unsigned len; -{ - zip_internal* zi; - int err=ZIP_OK; - - if (file == NULL) - return ZIP_PARAMERROR; - zi = (zip_internal*)file; - - if (zi->in_opened_file_inzip == 0) - return ZIP_PARAMERROR; - - zi->ci.stream.next_in = (void*)buf; - zi->ci.stream.avail_in = len; - zi->ci.crc32 = crc32(zi->ci.crc32,buf,len); - - while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0)) - { - if (zi->ci.stream.avail_out == 0) - { - if (zipFlushWriteBuffer(zi) == ZIP_ERRNO) - err = ZIP_ERRNO; - zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; - zi->ci.stream.next_out = zi->ci.buffered_data; - } - - - if(err != ZIP_OK) - break; - - if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) - { - uLong uTotalOutBefore = zi->ci.stream.total_out; - err=deflate(&zi->ci.stream, Z_NO_FLUSH); - zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; - - } - else - { - uInt copy_this,i; - if (zi->ci.stream.avail_in < zi->ci.stream.avail_out) - copy_this = zi->ci.stream.avail_in; - else - copy_this = zi->ci.stream.avail_out; - for (i=0;ici.stream.next_out)+i) = - *(((const char*)zi->ci.stream.next_in)+i); - { - zi->ci.stream.avail_in -= copy_this; - zi->ci.stream.avail_out-= copy_this; - zi->ci.stream.next_in+= copy_this; - zi->ci.stream.next_out+= copy_this; - zi->ci.stream.total_in+= copy_this; - zi->ci.stream.total_out+= copy_this; - zi->ci.pos_in_buffered_data += copy_this; - } - } - } - - return err; -} - -extern int ZEXPORT zipCloseFileInZipRaw (file, uncompressed_size, crc32) - zipFile file; - uLong uncompressed_size; - uLong crc32; -{ - zip_internal* zi; - uLong compressed_size; - int err=ZIP_OK; - - if (file == NULL) - return ZIP_PARAMERROR; - zi = (zip_internal*)file; - - if (zi->in_opened_file_inzip == 0) - return ZIP_PARAMERROR; - zi->ci.stream.avail_in = 0; - - if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) - while (err==ZIP_OK) - { - uLong uTotalOutBefore; - if (zi->ci.stream.avail_out == 0) - { - if (zipFlushWriteBuffer(zi) == ZIP_ERRNO) - err = ZIP_ERRNO; - zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; - zi->ci.stream.next_out = zi->ci.buffered_data; - } - uTotalOutBefore = zi->ci.stream.total_out; - err=deflate(&zi->ci.stream, Z_FINISH); - zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; - } - - if (err==Z_STREAM_END) - err=ZIP_OK; /* this is normal */ - - if ((zi->ci.pos_in_buffered_data>0) && (err==ZIP_OK)) - if (zipFlushWriteBuffer(zi)==ZIP_ERRNO) - err = ZIP_ERRNO; - - if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) - { - err=deflateEnd(&zi->ci.stream); - zi->ci.stream_initialised = 0; - } - - if (!zi->ci.raw) - { - crc32 = (uLong)zi->ci.crc32; - uncompressed_size = (uLong)zi->ci.stream.total_in; - } - compressed_size = (uLong)zi->ci.stream.total_out; -# ifndef NOCRYPT - compressed_size += zi->ci.crypt_header_size; -# endif - - ziplocal_putValue_inmemory(zi->ci.central_header+16,crc32,4); /*crc*/ - ziplocal_putValue_inmemory(zi->ci.central_header+20, - compressed_size,4); /*compr size*/ - if (zi->ci.stream.data_type == Z_ASCII) - ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)Z_ASCII,2); - ziplocal_putValue_inmemory(zi->ci.central_header+24, - uncompressed_size,4); /*uncompr size*/ - - if (err==ZIP_OK) - err = add_data_in_datablock(&zi->central_dir,zi->ci.central_header, - (uLong)zi->ci.size_centralheader); - free(zi->ci.central_header); - - if (err==ZIP_OK) - { - long cur_pos_inzip = ZTELL(zi->z_filefunc,zi->filestream); - if (ZSEEK(zi->z_filefunc,zi->filestream, - zi->ci.pos_local_header + 14,ZLIB_FILEFUNC_SEEK_SET)!=0) - err = ZIP_ERRNO; - - if (err==ZIP_OK) - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,crc32,4); /* crc 32, unknown */ - - if (err==ZIP_OK) /* compressed size, unknown */ - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,compressed_size,4); - - if (err==ZIP_OK) /* uncompressed size, unknown */ - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,uncompressed_size,4); - - if (ZSEEK(zi->z_filefunc,zi->filestream, - cur_pos_inzip,ZLIB_FILEFUNC_SEEK_SET)!=0) - err = ZIP_ERRNO; - } - - zi->number_entry ++; - zi->in_opened_file_inzip = 0; - - return err; -} - -extern int ZEXPORT zipCloseFileInZip (file) - zipFile file; -{ - return zipCloseFileInZipRaw (file,0,0); -} - -extern int ZEXPORT zipClose (file, global_comment) - zipFile file; - const char* global_comment; -{ - zip_internal* zi; - int err = 0; - uLong size_centraldir = 0; - uLong centraldir_pos_inzip; - uInt size_global_comment; - if (file == NULL) - return ZIP_PARAMERROR; - zi = (zip_internal*)file; - - if (zi->in_opened_file_inzip == 1) - { - err = zipCloseFileInZip (file); - } - -#ifndef NO_ADDFILEINEXISTINGZIP - if (global_comment==NULL) - global_comment = zi->globalcomment; -#endif - if (global_comment==NULL) - size_global_comment = 0; - else - size_global_comment = (uInt)strlen(global_comment); - - centraldir_pos_inzip = ZTELL(zi->z_filefunc,zi->filestream); - if (err==ZIP_OK) - { - linkedlist_datablock_internal* ldi = zi->central_dir.first_block ; - while (ldi!=NULL) - { - if ((err==ZIP_OK) && (ldi->filled_in_this_block>0)) - if (ZWRITE(zi->z_filefunc,zi->filestream, - ldi->data,ldi->filled_in_this_block) - !=ldi->filled_in_this_block ) - err = ZIP_ERRNO; - - size_centraldir += ldi->filled_in_this_block; - ldi = ldi->next_datablock; - } - } - free_datablock(zi->central_dir.first_block); - - if (err==ZIP_OK) /* Magic End */ - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)ENDHEADERMAGIC,4); - - if (err==ZIP_OK) /* number of this disk */ - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2); - - if (err==ZIP_OK) /* number of the disk with the start of the central directory */ - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2); - - if (err==ZIP_OK) /* total number of entries in the central dir on this disk */ - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2); - - if (err==ZIP_OK) /* total number of entries in the central dir */ - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2); - - if (err==ZIP_OK) /* size of the central directory */ - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_centraldir,4); - - if (err==ZIP_OK) /* offset of start of central directory with respect to the - starting disk number */ - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream, - (uLong)(centraldir_pos_inzip - zi->add_position_when_writting_offset),4); - - if (err==ZIP_OK) /* zipfile comment length */ - err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_global_comment,2); - - if ((err==ZIP_OK) && (size_global_comment>0)) - if (ZWRITE(zi->z_filefunc,zi->filestream, - global_comment,size_global_comment) != size_global_comment) - err = ZIP_ERRNO; - - if (ZCLOSE(zi->z_filefunc,zi->filestream) != 0) - if (err == ZIP_OK) - err = ZIP_ERRNO; - -#ifndef NO_ADDFILEINEXISTINGZIP - TRYFREE(zi->globalcomment); -#endif - TRYFREE(zi); - - return err; -} diff --git a/projects/mtg/minizip/zip.h b/projects/mtg/minizip/zip.h deleted file mode 100644 index cd38b670f..000000000 --- a/projects/mtg/minizip/zip.h +++ /dev/null @@ -1,235 +0,0 @@ -/* zip.h -- IO for compress .zip files using zlib - Version 1.01e, February 12th, 2005 - - Copyright (C) 1998-2005 Gilles Vollant - - This unzip package allow creates .ZIP file, compatible with PKZip 2.04g - WinZip, InfoZip tools and compatible. - Multi volume ZipFile (span) are not supported. - Encryption compatible with pkzip 2.04g only supported - Old compressions used by old PKZip 1.x are not supported - - For uncompress .zip file, look at unzip.h - - - I WAIT FEEDBACK at mail info@winimage.com - Visit also http://www.winimage.com/zLibDll/unzip.html for evolution - - Condition of use and distribution are the same than zlib : - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - -*/ - -/* for more info about .ZIP format, see - http://www.info-zip.org/pub/infozip/doc/appnote-981119-iz.zip - http://www.info-zip.org/pub/infozip/doc/ - PkWare has also a specification at : - ftp://ftp.pkware.com/probdesc.zip -*/ - -#ifndef _zip_H -#define _zip_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef _ZLIB_H -#include "zlib.h" -#endif - -#ifndef _ZLIBIOAPI_H -#include "ioapi.h" -#endif - -#if defined(STRICTZIP) || defined(STRICTZIPUNZIP) -/* like the STRICT of WIN32, we define a pointer that cannot be converted - from (void*) without cast */ -typedef struct TagzipFile__ { int unused; } zipFile__; -typedef zipFile__ *zipFile; -#else -typedef voidp zipFile; -#endif - -#define ZIP_OK (0) -#define ZIP_EOF (0) -#define ZIP_ERRNO (Z_ERRNO) -#define ZIP_PARAMERROR (-102) -#define ZIP_BADZIPFILE (-103) -#define ZIP_INTERNALERROR (-104) - -#ifndef DEF_MEM_LEVEL -# if MAX_MEM_LEVEL >= 8 -# define DEF_MEM_LEVEL 8 -# else -# define DEF_MEM_LEVEL MAX_MEM_LEVEL -# endif -#endif -/* default memLevel */ - -/* tm_zip contain date/time info */ -typedef struct tm_zip_s -{ - uInt tm_sec; /* seconds after the minute - [0,59] */ - uInt tm_min; /* minutes after the hour - [0,59] */ - uInt tm_hour; /* hours since midnight - [0,23] */ - uInt tm_mday; /* day of the month - [1,31] */ - uInt tm_mon; /* months since January - [0,11] */ - uInt tm_year; /* years - [1980..2044] */ -} tm_zip; - -typedef struct -{ - tm_zip tmz_date; /* date in understandable format */ - uLong dosDate; /* if dos_date == 0, tmu_date is used */ -/* uLong flag; */ /* general purpose bit flag 2 bytes */ - - uLong internal_fa; /* internal file attributes 2 bytes */ - uLong external_fa; /* external file attributes 4 bytes */ -} zip_fileinfo; - -typedef const char* zipcharpc; - - -#define APPEND_STATUS_CREATE (0) -#define APPEND_STATUS_CREATEAFTER (1) -#define APPEND_STATUS_ADDINZIP (2) - -extern zipFile ZEXPORT zipOpen OF((const char *pathname, int append)); -/* - Create a zipfile. - pathname contain on Windows XP a filename like "c:\\zlib\\zlib113.zip" or on - an Unix computer "zlib/zlib113.zip". - if the file pathname exist and append==APPEND_STATUS_CREATEAFTER, the zip - will be created at the end of the file. - (useful if the file contain a self extractor code) - if the file pathname exist and append==APPEND_STATUS_ADDINZIP, we will - add files in existing zip (be sure you don't add file that doesn't exist) - If the zipfile cannot be opened, the return value is NULL. - Else, the return value is a zipFile Handle, usable with other function - of this zip package. -*/ - -/* Note : there is no delete function into a zipfile. - If you want delete file into a zipfile, you must open a zipfile, and create another - Of couse, you can use RAW reading and writing to copy the file you did not want delte -*/ - -extern zipFile ZEXPORT zipOpen2 OF((const char *pathname, - int append, - zipcharpc* globalcomment, - zlib_filefunc_def* pzlib_filefunc_def)); - -extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file, - const char* filename, - const zip_fileinfo* zipfi, - const void* extrafield_local, - uInt size_extrafield_local, - const void* extrafield_global, - uInt size_extrafield_global, - const char* comment, - int method, - int level)); -/* - Open a file in the ZIP for writing. - filename : the filename in zip (if NULL, '-' without quote will be used - *zipfi contain supplemental information - if extrafield_local!=NULL and size_extrafield_local>0, extrafield_local - contains the extrafield data the the local header - if extrafield_global!=NULL and size_extrafield_global>0, extrafield_global - contains the extrafield data the the local header - if comment != NULL, comment contain the comment string - method contain the compression method (0 for store, Z_DEFLATED for deflate) - level contain the level of compression (can be Z_DEFAULT_COMPRESSION) -*/ - - -extern int ZEXPORT zipOpenNewFileInZip2 OF((zipFile file, - const char* filename, - const zip_fileinfo* zipfi, - const void* extrafield_local, - uInt size_extrafield_local, - const void* extrafield_global, - uInt size_extrafield_global, - const char* comment, - int method, - int level, - int raw)); - -/* - Same than zipOpenNewFileInZip, except if raw=1, we write raw file - */ - -extern int ZEXPORT zipOpenNewFileInZip3 OF((zipFile file, - const char* filename, - const zip_fileinfo* zipfi, - const void* extrafield_local, - uInt size_extrafield_local, - const void* extrafield_global, - uInt size_extrafield_global, - const char* comment, - int method, - int level, - int raw, - int windowBits, - int memLevel, - int strategy, - const char* password, - uLong crcForCtypting)); - -/* - Same than zipOpenNewFileInZip2, except - windowBits,memLevel,,strategy : see parameter strategy in deflateInit2 - password : crypting password (NULL for no crypting) - crcForCtypting : crc of file to compress (needed for crypting) - */ - - -extern int ZEXPORT zipWriteInFileInZip OF((zipFile file, - const void* buf, - unsigned len)); -/* - Write data in the zipfile -*/ - -extern int ZEXPORT zipCloseFileInZip OF((zipFile file)); -/* - Close the current file in the zipfile -*/ - -extern int ZEXPORT zipCloseFileInZipRaw OF((zipFile file, - uLong uncompressed_size, - uLong crc32)); -/* - Close the current file in the zipfile, for fiel opened with - parameter raw=1 in zipOpenNewFileInZip2 - uncompressed_size and crc32 are value for the uncompressed size -*/ - -extern int ZEXPORT zipClose OF((zipFile file, - const char* global_comment)); -/* - Close the zipfile -*/ - -#ifdef __cplusplus -} -#endif - -#endif /* _zip_H */ diff --git a/projects/mtg/src/AIPlayer.cpp b/projects/mtg/src/AIPlayer.cpp index fdb1e23bf..51b458c0d 100644 --- a/projects/mtg/src/AIPlayer.cpp +++ b/projects/mtg/src/AIPlayer.cpp @@ -16,8 +16,6 @@ int AIPlayer::totalAIDecks = -1; -const char * const MTG_LAND_TEXTS[] = { "artifact", "forest", "island", "mountain", "swamp", "plains", "other lands" }; - AIAction::AIAction(AIPlayer * owner, MTGCardInstance * c, MTGCardInstance * t) : owner(owner), ability(NULL), player(NULL), click(c), target(t) { diff --git a/projects/mtg/src/AIPlayerBaka.cpp b/projects/mtg/src/AIPlayerBaka.cpp index b126eb040..a2c237e6c 100644 --- a/projects/mtg/src/AIPlayerBaka.cpp +++ b/projects/mtg/src/AIPlayerBaka.cpp @@ -128,7 +128,7 @@ int OrderedAIAction::getEfficiency() break; } case MTGAbility::STANDARD_PREVENT: - { + { efficiency = 0;//starts out low to avoid spamming it when its not needed. if (!target) @@ -627,6 +627,10 @@ int OrderedAIAction::getEfficiency() { efficiency += 65; } + else if (dynamic_cast(a)) + { + efficiency += 55; + } SAFE_DELETE(transAbility); return efficiency; } @@ -650,8 +654,8 @@ MTGCardInstance * AIPlayerBaka::chooseCard(TargetChooser * tc, MTGCardInstance * } for(int players = 0; players < 2;++players) { - MTGGameZone * zones[] = { playerZones->hand, playerZones->library, playerZones->inPlay, playerZones->graveyard,playerZones->stack }; - for (int j = 0; j < 5; j++) + MTGGameZone * zones[] = { playerZones->hand, playerZones->library, playerZones->inPlay, playerZones->graveyard,playerZones->stack,playerZones->exile }; + for (int j = 0; j < 6; j++) { MTGGameZone * zone = zones[j]; for (int k = 0; k < zone->nb_cards; k++) @@ -1214,7 +1218,7 @@ int AIPlayerBaka::createAbilityTargets(MTGAbility * a, MTGCardInstance * c, Rank for (int i = 0; i < 2; i++) { Player * p = observer->players[i]; - MTGGameZone * playerZones[] = { p->game->graveyard, p->game->library, p->game->hand, p->game->inPlay,p->game->stack }; + MTGGameZone * playerZones[] = { p->game->graveyard, p->game->library, p->game->hand, p->game->inPlay,p->game->stack,p->game->exile }; if(a->getActionTc()->canTarget((Targetable*)p)) { if(a->getActionTc()->maxtargets == 1) @@ -1225,7 +1229,7 @@ int AIPlayerBaka::createAbilityTargets(MTGAbility * a, MTGCardInstance * c, Rank else potentialTargets.push_back(p); } - for (int j = 0; j < 5; j++) + for (int j = 0; j < 6; j++) { MTGGameZone * zone = playerZones[j]; for (int k = 0; k < zone->nb_cards; k++) @@ -1517,12 +1521,12 @@ int AIPlayerBaka::chooseTarget(TargetChooser * _tc, Player * forceTarget,MTGCard if (tc->Owner != observer->currentlyActing()) { observer->currentActionPlayer = tc->Owner; - //this is a hack, but if we hit this condition we are locked in a infinate loop - //so lets give the tc to its owner - //todo:find the root cause of this. - DebugTrace("AIPLAYER: Error, was asked to chose targets but I don't own the source of the targetController\n"); - return 0; - } + //this is a hack, but if we hit this condition we are locked in a infinate loop + //so lets give the tc to its owner + //todo:find the root cause of this. + DebugTrace("AIPLAYER: Error, was asked to chose targets but I don't own the source of the targetController\n"); + return 0; + } Player * target = forceTarget; int playerTargetedZone = 1; if (!target) @@ -1553,8 +1557,8 @@ int AIPlayerBaka::chooseTarget(TargetChooser * _tc, Player * forceTarget,MTGCard } } MTGPlayerCards * playerZones = target->game; - MTGGameZone * zones[] = { playerZones->hand, playerZones->library, playerZones->inPlay, playerZones->graveyard,playerZones->stack }; - for (int j = 0; j < 5; j++) + MTGGameZone * zones[] = { playerZones->hand, playerZones->library, playerZones->inPlay, playerZones->graveyard,playerZones->stack,playerZones->exile }; + for (int j = 0; j < 6; j++) { MTGGameZone * zone = zones[j]; for (int k = 0; k < zone->nb_cards; k++) @@ -1726,6 +1730,302 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty cd.setType(type); card = NULL; gotPayments = vector(); + //canplayfromgraveyard + while ((card = cd.nextmatch(game->graveyard, card))&& card->has(Constants::CANPLAYFROMGRAVEYARD)) + { + if (!CanHandleCost(card->getManaCost(),card)) + continue; + + if (card->hasType(Subtypes::TYPE_LAND)) + { + if (game->playRestrictions->canPutIntoZone(card, game->inPlay) == PlayRestriction::CANT_PLAY) + continue; + } + else + { + if (game->playRestrictions->canPutIntoZone(card, game->stack) == PlayRestriction::CANT_PLAY) + continue; + } + + if (card->hasType(Subtypes::TYPE_LEGENDARY) && game->inPlay->findByName(card->name)) + continue; + + if (card->hasType(Subtypes::TYPE_PLANESWALKER) && card->types.size() > 0 && game->inPlay->hasTypeSpecificInt(Subtypes::TYPE_PLANESWALKER,card->types[1])) + continue; + + if(hints && hints->HintSaysItsForCombo(observer,card)) + { + if(hints->canWeCombo(observer,card,this)) + { + AbilityFactory af(observer); + int canPlay = af.parseCastRestrictions(card,card->controller(),card->getRestrictions()); + if(!canPlay) + continue; + nextCardToPlay = card; + gotPayments.clear(); + if((!pMana->canAfford(nextCardToPlay->getManaCost()) || nextCardToPlay->getManaCost()->getKicker())) + gotPayments = canPayMana(nextCardToPlay,nextCardToPlay->getManaCost()); + return activateCombo(); + } + else + { + nextCardToPlay = NULL; + continue; + } + } + int currentCost = card->getManaCost()->getConvertedCost(); + int hasX = card->getManaCost()->hasX(); + gotPayments.clear(); + if((!pMana->canAfford(card->getManaCost()) || card->getManaCost()->getKicker())) + gotPayments = canPayMana(card,card->getManaCost()); + //for preformence reason we only look for specific mana if the payment couldn't be made with pmana. + if ((currentCost > maxCost || hasX) && (gotPayments.size() || pMana->canAfford(card->getManaCost()))) + { + TargetChooserFactory tcf(observer); + TargetChooser * tc = tcf.createTargetChooser(card); + int shouldPlayPercentage = 0; + if (tc) + { + int hasTarget = chooseTarget(tc,NULL,NULL,true); + if( + (tc->maxtargets > hasTarget && tc->maxtargets > 1 && !tc->targetMin && tc->maxtargets != TargetChooser::UNLITMITED_TARGETS) ||//target=<3>creature + (tc->maxtargets == TargetChooser::UNLITMITED_TARGETS && hasTarget < 1)//target=creatures + ) + hasTarget = 0; + if (!hasTarget)//single target covered here. + { + SAFE_DELETE(tc); + continue; + } + shouldPlayPercentage = 90; + if(tc->targetMin && hasTarget < tc->maxtargets) + shouldPlayPercentage = 0; + if(tc->maxtargets > 1 && tc->maxtargets != TargetChooser::UNLITMITED_TARGETS && hasTarget <= tc->maxtargets) + { + int maxA = hasTarget-tc->maxtargets; + shouldPlayPercentage += (10*maxA);//reduce the chances of playing multitarget if we are not above max targets. + } + if(tc->maxtargets == TargetChooser::UNLITMITED_TARGETS) + { + shouldPlayPercentage = 40 + (10*hasTarget); + int totalCost = pMana->getConvertedCost()-currentCost; + int totalTargets = hasTarget+hasTarget; + if(hasX && totalCost <= totalTargets)// {x} spell with unlimited targeting tend to divide damage, we want atleast 1 damage per target before casting. + { + shouldPlayPercentage = 0; + } + } + SAFE_DELETE(tc); + } + else + { + int shouldPlay = effectBadOrGood(card); + if (shouldPlay == BAKA_EFFECT_GOOD) + { + shouldPlayPercentage = 90; + } + else if (BAKA_EFFECT_DONTKNOW == shouldPlay) + { + //previously shouldPlayPercentage = 80;, I found this a little to high + //for cards which AI had no idea how to use. + shouldPlayPercentage = 60; + } + else if (card->isLand()) + { + shouldPlayPercentage = 90; + } + else + { + // shouldPlay == baka_effect_bad giving it a 1 for odd ball lottery chance. + shouldPlayPercentage = 1; + } + + } + //Reduce the chances of playing a spell with X cost if available mana is low + if (hasX) + { + int xDiff = pMana->getConvertedCost() - currentCost; + if (xDiff < 0) + xDiff = 0; + shouldPlayPercentage = shouldPlayPercentage - static_cast ((shouldPlayPercentage * 1.9f) / (1 + xDiff)); + } + if(card->getManaCost() && card->getManaCost()->getKicker() && card->getManaCost()->getKicker()->isMulti) + { + shouldPlayPercentage = 10* size_t(gotPayments.size())/int(1+(card->getManaCost()->getConvertedCost()+card->getManaCost()->getKicker()->getConvertedCost())); + if(shouldPlayPercentage <= 10) + shouldPlayPercentage = shouldPlayPercentage/3; + } + DebugTrace("Should I play " << (card ? card->name : "Nothing" ) << "?" << endl + <<"shouldPlayPercentage = "<< shouldPlayPercentage); + if(card->getRestrictions().size()) + { + AbilityFactory af(observer); + int canPlay = af.parseCastRestrictions(card,card->controller(),card->getRestrictions()); + if(!canPlay) + continue; + } + int randomChance = randomGenerator.random(); + int chance = randomChance % 100; + if (chance > shouldPlayPercentage) + continue; + if(shouldPlayPercentage <= 10) + { + DebugTrace("shouldPlayPercentage was less than 10 this was a lottery roll on RNG"); + } + nextCardToPlay = card; + maxCost = currentCost; + if (hasX) + maxCost = pMana->getConvertedCost(); + } + } + //canplayfromexile + while ((card = cd.nextmatch(game->exile, card))&& card->has(Constants::CANPLAYFROMEXILE)) + { + if (!CanHandleCost(card->getManaCost(),card)) + continue; + + if (card->hasType(Subtypes::TYPE_LAND)) + { + if (game->playRestrictions->canPutIntoZone(card, game->inPlay) == PlayRestriction::CANT_PLAY) + continue; + } + else + { + if (game->playRestrictions->canPutIntoZone(card, game->stack) == PlayRestriction::CANT_PLAY) + continue; + } + + if (card->hasType(Subtypes::TYPE_LEGENDARY) && game->inPlay->findByName(card->name)) + continue; + + if (card->hasType(Subtypes::TYPE_PLANESWALKER) && card->types.size() > 0 && game->inPlay->hasTypeSpecificInt(Subtypes::TYPE_PLANESWALKER,card->types[1])) + continue; + + if(hints && hints->HintSaysItsForCombo(observer,card)) + { + if(hints->canWeCombo(observer,card,this)) + { + AbilityFactory af(observer); + int canPlay = af.parseCastRestrictions(card,card->controller(),card->getRestrictions()); + if(!canPlay) + continue; + nextCardToPlay = card; + gotPayments.clear(); + if((!pMana->canAfford(nextCardToPlay->getManaCost()) || nextCardToPlay->getManaCost()->getKicker())) + gotPayments = canPayMana(nextCardToPlay,nextCardToPlay->getManaCost()); + return activateCombo(); + } + else + { + nextCardToPlay = NULL; + continue; + } + } + int currentCost = card->getManaCost()->getConvertedCost(); + int hasX = card->getManaCost()->hasX(); + gotPayments.clear(); + if((!pMana->canAfford(card->getManaCost()) || card->getManaCost()->getKicker())) + gotPayments = canPayMana(card,card->getManaCost()); + //for preformence reason we only look for specific mana if the payment couldn't be made with pmana. + if ((currentCost > maxCost || hasX) && (gotPayments.size() || pMana->canAfford(card->getManaCost()))) + { + TargetChooserFactory tcf(observer); + TargetChooser * tc = tcf.createTargetChooser(card); + int shouldPlayPercentage = 0; + if (tc) + { + int hasTarget = chooseTarget(tc,NULL,NULL,true); + if( + (tc->maxtargets > hasTarget && tc->maxtargets > 1 && !tc->targetMin && tc->maxtargets != TargetChooser::UNLITMITED_TARGETS) ||//target=<3>creature + (tc->maxtargets == TargetChooser::UNLITMITED_TARGETS && hasTarget < 1)//target=creatures + ) + hasTarget = 0; + if (!hasTarget)//single target covered here. + { + SAFE_DELETE(tc); + continue; + } + shouldPlayPercentage = 90; + if(tc->targetMin && hasTarget < tc->maxtargets) + shouldPlayPercentage = 0; + if(tc->maxtargets > 1 && tc->maxtargets != TargetChooser::UNLITMITED_TARGETS && hasTarget <= tc->maxtargets) + { + int maxA = hasTarget-tc->maxtargets; + shouldPlayPercentage += (10*maxA);//reduce the chances of playing multitarget if we are not above max targets. + } + if(tc->maxtargets == TargetChooser::UNLITMITED_TARGETS) + { + shouldPlayPercentage = 40 + (10*hasTarget); + int totalCost = pMana->getConvertedCost()-currentCost; + int totalTargets = hasTarget+hasTarget; + if(hasX && totalCost <= totalTargets)// {x} spell with unlimited targeting tend to divide damage, we want atleast 1 damage per target before casting. + { + shouldPlayPercentage = 0; + } + } + SAFE_DELETE(tc); + } + else + { + int shouldPlay = effectBadOrGood(card); + if (shouldPlay == BAKA_EFFECT_GOOD) + { + shouldPlayPercentage = 90; + } + else if (BAKA_EFFECT_DONTKNOW == shouldPlay) + { + //previously shouldPlayPercentage = 80;, I found this a little to high + //for cards which AI had no idea how to use. + shouldPlayPercentage = 60; + } + else if (card->isLand()) + { + shouldPlayPercentage = 90; + } + else + { + // shouldPlay == baka_effect_bad giving it a 1 for odd ball lottery chance. + shouldPlayPercentage = 1; + } + + } + //Reduce the chances of playing a spell with X cost if available mana is low + if (hasX) + { + int xDiff = pMana->getConvertedCost() - currentCost; + if (xDiff < 0) + xDiff = 0; + shouldPlayPercentage = shouldPlayPercentage - static_cast ((shouldPlayPercentage * 1.9f) / (1 + xDiff)); + } + if(card->getManaCost() && card->getManaCost()->getKicker() && card->getManaCost()->getKicker()->isMulti) + { + shouldPlayPercentage = 10* size_t(gotPayments.size())/int(1+(card->getManaCost()->getConvertedCost()+card->getManaCost()->getKicker()->getConvertedCost())); + if(shouldPlayPercentage <= 10) + shouldPlayPercentage = shouldPlayPercentage/3; + } + DebugTrace("Should I play " << (card ? card->name : "Nothing" ) << "?" << endl + <<"shouldPlayPercentage = "<< shouldPlayPercentage); + if(card->getRestrictions().size()) + { + AbilityFactory af(observer); + int canPlay = af.parseCastRestrictions(card,card->controller(),card->getRestrictions()); + if(!canPlay) + continue; + } + int randomChance = randomGenerator.random(); + int chance = randomChance % 100; + if (chance > shouldPlayPercentage) + continue; + if(shouldPlayPercentage <= 10) + { + DebugTrace("shouldPlayPercentage was less than 10 this was a lottery roll on RNG"); + } + nextCardToPlay = card; + maxCost = currentCost; + if (hasX) + maxCost = pMana->getConvertedCost(); + } + } while ((card = cd.nextmatch(game->hand, card))) { if (!CanHandleCost(card->getManaCost(),card)) @@ -2109,6 +2409,56 @@ int AIPlayerBaka::computeActions() nextCardToPlay = NULL; count++; } + + if(nextCardToPlay == NULL)//check if there is a free card to play, play it.... + {//TODO: add potential mana if we can pay if there is a cost increaser in play + CardDescriptor cd; + if (game->hand->hasAbility(Constants::PAYZERO)) + { + //Attempt to put free cards into play + cd.init(); + cd.SetExclusionColor(Constants::MTG_COLOR_LAND); + MTGCardInstance *freecard = cd.match(game->hand); + int canCastCard = game->playRestrictions->canPutIntoZone(freecard, game->inPlay); + if (freecard && (canCastCard == PlayRestriction::CAN_PLAY) && freecard->has(Constants::PAYZERO) && (freecard->getIncreasedManaCost()->getConvertedCost() < 1)) + { + MTGAbility * castFreeCard = observer->mLayers->actionLayer()->getAbility(MTGAbility::PAYZERO_COST); + AIAction * aa = NEW AIAction(this, castFreeCard, freecard); //TODO putinplay action + clickstream.push(aa); + break; + } + } + if (game->graveyard->hasAbility(Constants::PAYZERO) && game->graveyard->hasAbility(Constants::CANPLAYFROMGRAVEYARD)) + { + //Attempt to put free cards into play + cd.init(); + cd.SetExclusionColor(Constants::MTG_COLOR_LAND); + MTGCardInstance *freecard = cd.match(game->graveyard); + int canCastCard = game->playRestrictions->canPutIntoZone(freecard, game->inPlay); + if (freecard && (canCastCard == PlayRestriction::CAN_PLAY) && freecard->has(Constants::PAYZERO) && freecard->has(Constants::CANPLAYFROMGRAVEYARD) && (freecard->getIncreasedManaCost()->getConvertedCost() < 1) && (freecard->alias != 1111)) + { + MTGAbility * castFreeCard = observer->mLayers->actionLayer()->getAbility(MTGAbility::PAYZERO_COST); + AIAction * aa = NEW AIAction(this, castFreeCard, freecard); //TODO putinplay action + clickstream.push(aa); + break; + } + } + if (game->exile->hasAbility(Constants::PAYZERO) && game->exile->hasAbility(Constants::CANPLAYFROMEXILE)) + { + //Attempt to put free cards into play + cd.init(); + cd.SetExclusionColor(Constants::MTG_COLOR_LAND); + MTGCardInstance *freecard = cd.match(game->exile); + int canCastCard = game->playRestrictions->canPutIntoZone(freecard, game->inPlay); + if (freecard && (canCastCard == PlayRestriction::CAN_PLAY) && freecard->has(Constants::PAYZERO) && freecard->has(Constants::CANPLAYFROMEXILE) && (freecard->getIncreasedManaCost()->getConvertedCost() < 1) && (freecard->alias != 1111)) + { + MTGAbility * castFreeCard = observer->mLayers->actionLayer()->getAbility(MTGAbility::PAYZERO_COST); + AIAction * aa = NEW AIAction(this, castFreeCard, freecard); //TODO putinplay action + clickstream.push(aa); + break; + } + } + }//end } SAFE_DELETE(currentMana); diff --git a/projects/mtg/src/AIStats.cpp b/projects/mtg/src/AIStats.cpp index b181e238b..c5003147d 100644 --- a/projects/mtg/src/AIStats.cpp +++ b/projects/mtg/src/AIStats.cpp @@ -107,8 +107,8 @@ int AIStats::receiveEvent(WEvent * event) //the following tells ai if a creature should be blocked or targeted bool AIStats::isInTop(MTGCardInstance * card, unsigned int max, bool tooSmallCountsForTrue) { - //return true; - //uncomment the above return to make Ai always multiblock your creatures. + //return true; + //uncomment the above return to make Ai always multiblock your creatures. if (stats.size() < max) return tooSmallCountsForTrue; unsigned int n = 0; diff --git a/projects/mtg/src/ActionLayer.cpp b/projects/mtg/src/ActionLayer.cpp index 5efec2e67..28f5453d9 100644 --- a/projects/mtg/src/ActionLayer.cpp +++ b/projects/mtg/src/ActionLayer.cpp @@ -361,8 +361,8 @@ int ActionLayer::reactToClick(MTGCardInstance * card) } #ifdef WIN32 - // if we hit this, then something strange has happened with the click logic - reactToClick() - // should never be called if isReactingToClick() previously didn't have an object return true + // if we hit this, then something strange has happened with the click logic - reactToClick() + // should never be called if isReactingToClick() previously didn't have an object return true assert(!mReactions.empty()); #endif diff --git a/projects/mtg/src/ActionStack.cpp b/projects/mtg/src/ActionStack.cpp index 24b15752a..a0246881d 100644 --- a/projects/mtg/src/ActionStack.cpp +++ b/projects/mtg/src/ActionStack.cpp @@ -93,9 +93,27 @@ void Interruptible::Render(MTGCardInstance * source, JQuad * targetQuad, string WFont * mFont = observer->getResourceManager()->GetWFont(Fonts::MAIN_FONT); mFont->SetColor(ARGB(255,255,255,255)); mFont->SetScale(DEFAULT_MAIN_FONT_SCALE); - - mFont->DrawString(_(action).c_str(), x + 35, y + GetVerticalTextOffset(), JGETEXT_LEFT); JRenderer * renderer = JRenderer::GetInstance(); + + if (!targetQuad) + { + /*if(source->controller()->isHuman() && source->controller()->opponent()->isAI() && !alt2.size() && _(action).c_str() == source->name) + mFont->DrawString("You play ", x + 35, y-15 + GetVerticalTextOffset(), JGETEXT_LEFT); + else if(source->controller()->isAI() && source->controller()->opponent()->isHuman() && !alt2.size() && _(action).c_str() == source->name) + mFont->DrawString("Opponent plays ", x + 35, y-15 + GetVerticalTextOffset(), JGETEXT_LEFT);*/ + mFont->DrawString(_(action).c_str(), x + 35, y + GetVerticalTextOffset(), JGETEXT_LEFT); + } + else + { + renderer->FillRect(x-2,y-16 + GetVerticalTextOffset(), 73, 43, ARGB(235,10,10,10)); + /*if(source->controller()->isHuman() && source->controller()->opponent()->isAI()) + renderer->DrawRect(x-2,y-16 + GetVerticalTextOffset(), 73, 43, ARGB(245,0,255,0)); + else + renderer->DrawRect(x-2,y-16 + GetVerticalTextOffset(), 73, 43, ARGB(245,255,0,0));*/ + mFont->DrawString(">", x + 32, y + GetVerticalTextOffset(), JGETEXT_LEFT); + mFont->DrawString(_(action).c_str(), x + 75, y + GetVerticalTextOffset(), JGETEXT_LEFT); + } + JQuadPtr quad = observer->getResourceManager()->RetrieveCard(source, CACHE_THUMB); if (!quad.get()) quad = CardGui::AlternateThumbQuad(source); @@ -123,12 +141,12 @@ void Interruptible::Render(MTGCardInstance * source, JQuad * targetQuad, string targetQuad->SetColor(ARGB(255,255,255,255)); targetQuad->SetHotSpot(targetQuad->mWidth / 2, targetQuad->mHeight / 2); float scale = mHeight / targetQuad->mHeight; - renderer->RenderQuad(targetQuad, x + 150, y + ((mHeight - targetQuad->mHeight) / 2) + targetQuad->mHotSpotY, 0, scale, scale); + renderer->RenderQuad(targetQuad, x + 55, y + ((mHeight - targetQuad->mHeight) / 2) + targetQuad->mHotSpotY, 0, scale, scale); targetQuad->SetHotSpot(backupX, backupY); } else if (alt2.size()) { - mFont->DrawString(_(alt2).c_str(), x + 120, y + GetVerticalTextOffset()); + mFont->DrawString(_(alt2).c_str(), x + 35, y+15 + GetVerticalTextOffset()); } } @@ -283,7 +301,13 @@ bool Spell::FullfilledAlternateCost(const int &costType) hasFullfilledAlternateCost = (payResult == ManaCost::MANA_PAID_WITH_RETRACE); break; case ManaCost::MANA_PAID_WITH_SUSPEND: - hasFullfilledAlternateCost = (payResult == ManaCost::MANA_PAID_WITH_RETRACE); + hasFullfilledAlternateCost = (payResult == ManaCost::MANA_PAID_WITH_SUSPEND); + break; + case ManaCost::MANA_PAID_WITH_OVERLOAD: + hasFullfilledAlternateCost = (payResult == ManaCost::MANA_PAID_WITH_OVERLOAD); + break; + case ManaCost::MANA_PAID_WITH_BESTOW: + hasFullfilledAlternateCost = (payResult == ManaCost::MANA_PAID_WITH_BESTOW); break; } @@ -327,13 +351,13 @@ int Spell::resolve() if (options[Options::SFXVOLUME].number > 0) { - if(observer->getResourceManager()) - observer->getResourceManager()->PlaySample(source->getSample()); + if(observer->getResourceManager()) + observer->getResourceManager()->PlaySample(source->getSample()); } if(this->cost) - { - source->getManaCost()->setManaUsedToCast(NEW ManaCost(this->cost)); - } + { + source->getManaCost()->setManaUsedToCast(NEW ManaCost(this->cost)); + } AbilityFactory af(observer); af.addAbilities(observer->mLayers->actionLayer()->getMaxId(), this); return 1; @@ -733,7 +757,7 @@ int ActionStack::resolve() { for (int i = 0; i < 2; i++) { - if (interruptDecision[i] != 2) + if (interruptDecision[i] != 2) interruptDecision[i] = NOT_DECIDED; } } @@ -797,7 +821,7 @@ int ActionStack::count(int type, int state, int display) Interruptible * ActionStack::getActionElementFromCard(MTGCardInstance * card) { - if(!card) + if(!card) return 0; for (size_t i = 0; i < mObjects.size(); i++) { @@ -981,7 +1005,7 @@ void ActionStack::Update(float dt) //and set the timer to 4 secs. BUG FIX //http://code.google.com/p/wagic/issues/detail?id=464 extraTime = count(0, NOT_RESOLVED, 0); if (extraTime == 0) - extraTime = 1;//we never want this int to be 0. + extraTime = 1;//we never want this int to be 0. if (timer < 0) timer = static_cast(options[Options::INTERRUPT_SECONDS].number * extraTime); @@ -1219,10 +1243,17 @@ void ActionStack::Render() mFont->SetColor(ARGB(255,255,255,255)); JRenderer * renderer = JRenderer::GetInstance(); - renderer->FillRoundRect(x0 + 16, y0 + 16, width + 2, height + 2, 10, ARGB(128,0,0,0)); - renderer->FillRoundRect(x0 - 5, y0, width + 2, height + 2, 10, ARGB(200,0,0,0)); - renderer->DrawRoundRect(x0 - 5, y0, width + 2, height + 2, 10, ARGB(255,255,255,255)); - + //stack shadow + //renderer->FillRoundRect(x0 - 7, y0+2, width + 17, height + 2, 9.0f, ARGB(128,0,0,0)); + //stack fill + renderer->FillRect(x0 - 7, y0+2, width + 17, height + 14, ARGB(225,5,5,5)); + //stack highlight + renderer->FillRect(x0 - 6, y0+3, width + 15, 30, ARGB(255,89,89,89)); + //another border + renderer->DrawRect(x0 - 6, y0+33, width + 15, height - 18, ARGB(255,89,89,89)); + //stack border + renderer->DrawRect(x0 - 7, y0+2, width + 17, height + 14, ARGB(255,240,240,240)); + std::ostringstream stream; // WALDORF - changed "interrupt ?" to "Interrupt?". Don't display count down // seconds if the user disables auto progressing interrupts by setting the seconds @@ -1235,11 +1266,11 @@ void ActionStack::Render() else stream << _(kInterruptMessageString) << " " << static_cast(timer); - mFont->DrawString(stream.str(), x0 + 5, currenty); + mFont->DrawString(stream.str(), x0 + 5, currenty - 2); // static const float kIconVerticalOffset = 24; - static const float kIconHorizontalOffset = 9; - static const float kBeforeIconSpace = 10; + static const float kIconHorizontalOffset = 10; + static const float kBeforeIconSpace = 12; //Render "interrupt?" text + possible actions { @@ -1248,25 +1279,25 @@ void ActionStack::Render() if (gModRules.game.canInterrupt()) { - renderer->RenderQuad(pspIcons[7].get(), currentx, kIconVerticalOffset, 0, kGamepadIconSize, kGamepadIconSize); + renderer->RenderQuad(pspIcons[7].get(), currentx, kIconVerticalOffset - 2, 0, kGamepadIconSize, kGamepadIconSize); currentx+= kIconHorizontalOffset; - mFont->DrawString(_(kInterruptString), currentx, kIconVerticalOffset - 6); + mFont->DrawString(_(kInterruptString), currentx, kIconVerticalOffset - 8); currentx+= mFont->GetStringWidth(_(kInterruptString).c_str()) + kBeforeIconSpace; } noBtnXOffset = static_cast(currentx); - renderer->RenderQuad(pspIcons[4].get(), currentx, kIconVerticalOffset, 0, kGamepadIconSize, kGamepadIconSize); + renderer->RenderQuad(pspIcons[4].get(), currentx, kIconVerticalOffset - 2, 0, kGamepadIconSize, kGamepadIconSize); currentx+= kIconHorizontalOffset; - mFont->DrawString(_(kNoString), currentx, kIconVerticalOffset - 6); + mFont->DrawString(_(kNoString), currentx, kIconVerticalOffset - 8); currentx+= mFont->GetStringWidth(_(kNoString).c_str()) + kBeforeIconSpace; noToAllBtnXOffset = static_cast(currentx); if (mObjects.size() > 1) { - renderer->RenderQuad(pspIcons[6].get(), currentx, kIconVerticalOffset, 0, kGamepadIconSize, kGamepadIconSize); + renderer->RenderQuad(pspIcons[6].get(), currentx, kIconVerticalOffset - 2, 0, kGamepadIconSize, kGamepadIconSize); currentx+= kIconHorizontalOffset; - mFont->DrawString(_(kNoToAllString), currentx, kIconVerticalOffset - 6); + mFont->DrawString(_(kNoToAllString), currentx, kIconVerticalOffset - 8); currentx+= mFont->GetStringWidth(_(kNoToAllString).c_str()) + kBeforeIconSpace; } diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 26cd01faa..2951f628d 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -261,8 +261,8 @@ AADamager * AADamager::clone() const //AADepleter -AADepleter::AADepleter(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target,string nbcardsStr, ManaCost * _cost, int who) : - ActivatedAbilityTP(observer, _id, card, _target, _cost, who),nbcardsStr(nbcardsStr) +AADepleter::AADepleter(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target,string nbcardsStr, ManaCost * _cost, int who, bool toexile) : + ActivatedAbilityTP(observer, _id, card, _target, _cost, who),nbcardsStr(nbcardsStr),toexile(toexile) { } @@ -277,7 +277,12 @@ AADepleter::AADepleter(GameObserver* observer, int _id, MTGCardInstance * card, for (int i = 0; i < numCards.getValue(); i++) { if (library->nb_cards) - player->game->putInZone(library->cards[library->nb_cards - 1], library, player->game->graveyard); + { + if(toexile) + player->game->putInZone(library->cards[library->nb_cards - 1], library, player->game->exile); + else + player->game->putInZone(library->cards[library->nb_cards - 1], library, player->game->graveyard); + } } } return 1; @@ -285,6 +290,8 @@ AADepleter::AADepleter(GameObserver* observer, int _id, MTGCardInstance * card, const string AADepleter::getMenuText() { + if(toexile) + return "Ingest"; return "Deplete"; } @@ -383,7 +390,26 @@ int AACopier::resolve() MTGCardInstance * _target = (MTGCardInstance *) target; if (_target) { - source->copy(_target); + MTGCard* clone = MTGCollection()->getCardById(_target->copiedID); + MTGCardInstance * myClone = NEW MTGCardInstance(clone, source->controller()->game); + source->copy(myClone); + source->isACopier = true; + source->copiedID = _target->copiedID; + source->modifiedbAbi = _target->modifiedbAbi; + source->origbasicAbilities = _target->origbasicAbilities; + if(_target->isMorphed) + { + source->power = 2; + source->life = 2; + source->toughness = 2; + source->setColor(0,1); + source->name = "Morph"; + source->types.clear(); + string cre = "Creature"; + source->setType(cre.c_str()); + source->basicAbilities.reset(); + source->getManaCost()->resetCosts(); + } return 1; } return 0; @@ -1120,9 +1146,9 @@ AASetCoin::~AASetCoin() //paying for an ability as an effect but as a cost GenericPaidAbility::GenericPaidAbility(GameObserver* observer, int id, MTGCardInstance * source, - Targetable * target, string _newName, string _castRestriction, string mayCost, string _toAdd, ManaCost * cost) : + Targetable * target, string _newName, string _castRestriction, string mayCost, string _toAdd, bool asAlternate, ManaCost * cost) : ActivatedAbility(observer, id, source, cost, 0), - newName(_newName), restrictions(_castRestriction), baseCost(mayCost), baseAbilityStr(_toAdd) + newName(_newName), restrictions(_castRestriction), baseCost(mayCost), baseAbilityStr(_toAdd), asAlternate(asAlternate) { this->GetId(); baseAbility = NULL; @@ -1146,20 +1172,22 @@ int GenericPaidAbility::resolve() AbilityFactory Af(game); vector baseAbilityStrSplit = split(baseAbilityStr,'?'); vector selection; + MTGAbility * nomenuAbility = NULL; + bool nomenu = false; if (baseAbilityStrSplit.size() > 1) { baseAbility = Af.parseMagicLine(baseAbilityStrSplit[0], this->GetId(), NULL, source); baseAbility->target = target; optionalCost = ManaCost::parseManaCost(baseCost, NULL, source); - // hacky way to produce better MenuText + /*// hacky way to produce better MenuText AAFakeAbility* isFake = dynamic_cast< AAFakeAbility* >( baseAbility ); size_t findPayN = isFake->named.find(" {value} mana"); if (isFake && findPayN != string::npos) { stringstream parseN; parseN << optionalCost->getCost(Constants::MTG_COLOR_ARTIFACT); isFake->named.replace(findPayN + 1, 7, parseN.str()); - } + }//commented out, it crashes cards with recover ability*/ MTGAbility * set = baseAbility->clone(); set->oneShot = true; @@ -1174,10 +1202,12 @@ int GenericPaidAbility::resolve() } else { + nomenu = true; baseAbility = Af.parseMagicLine(baseAbilityStrSplit[0], this->GetId(), NULL, source); baseAbility->target = target; optionalCost = ManaCost::parseManaCost(baseCost, NULL, source); MTGAbility * set = baseAbility->clone(); + nomenuAbility = baseAbility->clone(); set->oneShot = true; selection.push_back(set); } @@ -1185,10 +1215,37 @@ int GenericPaidAbility::resolve() if (selection.size()) { bool must = baseAbilityStrSplit.size() > 1 ? true : false; - MenuAbility * a1 = NEW MenuAbility(game, this->GetId(), target, source, must, selection, NULL, newName); - a1->optionalCosts.push_back(NEW ManaCost(optionalCost)); - game->mLayers->actionLayer()->currentActionCard = (MTGCardInstance *)target; - a1->resolve(); + //todo get increased - reduced cost if asAlternate cost to cast using castcard + if(asAlternate) + { + must = true; + //cost increase - reduce + trinisphere effect ability todo... + if(((MTGCardInstance *)target)->getIncreasedManaCost()->getConvertedCost()) + optionalCost->add(((MTGCardInstance *)target)->getIncreasedManaCost()); + if(((MTGCardInstance *)target)->getReducedManaCost()->getConvertedCost()) + optionalCost->remove(((MTGCardInstance *)target)->getReducedManaCost()); + //trinisphere effect must be hardcoded...here.. + /*if(((MTGCardInstance *)target)->has(Constants::TRINISPHERE)) + { + if(optionalCost->getConvertedCost() == 2) + optionalCost->add(Constants::MTG_COLOR_ARTIFACT, 1); + else if(optionalCost->getConvertedCost() == 1) + optionalCost->add(Constants::MTG_COLOR_ARTIFACT, 2); + else if(optionalCost->getConvertedCost() < 1) + optionalCost->add(Constants::MTG_COLOR_ARTIFACT, 3); + }*/ + } + if(asAlternate && nomenu && optionalCost->getConvertedCost() < 1) + { + nomenuAbility->resolve(); + } + else + { + MenuAbility * a1 = NEW MenuAbility(game, this->GetId(), target, source, must, selection, NULL, newName); + a1->optionalCosts.push_back(NEW ManaCost(optionalCost)); + game->mLayers->actionLayer()->currentActionCard = (MTGCardInstance *)target; + a1->resolve(); + } } return 1; } @@ -1328,11 +1385,36 @@ AAFakeAbility * AAFakeAbility::clone() const return NEW AAFakeAbility(*this); } +//EPIC + AAEPIC::AAEPIC(GameObserver* observer, int id, MTGCardInstance * source, MTGCardInstance * _target, string _named,ManaCost * cost): + ActivatedAbility(observer, id, source, cost, 0),named(_named) +{ + this->target = _target; +} +int AAEPIC::resolve() +{ + MTGCardInstance * _target = (MTGCardInstance *)target; + _target->controller()->epic = 1; + return 1; +} + +const string AAEPIC::getMenuText() +{ + if(named.size()) + return named.c_str(); + return "EPIC"; +} + +AAEPIC * AAEPIC::clone() const +{ + return NEW AAEPIC(*this); +} + // Fizzler AAFizzler::AAFizzler(GameObserver* observer, int _id, MTGCardInstance * card, Spell * _target, ManaCost * _cost) : ActivatedAbility(observer, _id, card, _cost, 0) { - aType = MTGAbility::STANDARD_FIZZLER; + aType = MTGAbility::STANDARD_FIZZLER; target = _target; // by default we put the spell to graveyard after fizzling @@ -1359,6 +1441,13 @@ int AAFizzler::resolve() sCard = sTarget->source; if (!sCard || !sTarget || sCard->has(Constants::NOFIZZLE)) return 0; + if (source->alias == 111057 && sTarget)//Draining Whelk + { + for (int j = sTarget->cost->getConvertedCost(); j > 0; j--) + { + source->counters->addCounter(1,1); + } + } stack->Fizzle(sTarget, fizzleMode); return 1; } @@ -1681,8 +1770,8 @@ AAFrozen * AAFrozen::clone() const } // chose a new target for an aura or enchantment and equip it note: VERY basic right now. -AANewTarget::AANewTarget(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target,bool retarget, ManaCost * _cost) : -ActivatedAbility(observer, id, card, _cost, 0),retarget(retarget) +AANewTarget::AANewTarget(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target,bool retarget, ManaCost * _cost, bool reequip, bool newhook) : +ActivatedAbility(observer, id, card, _cost, 0),retarget(retarget),reequip(reequip),newhook(newhook) { target = _target; } @@ -1695,7 +1784,7 @@ int AANewTarget::resolve() _target = source; source = (MTGCardInstance *) target; } - if (_target) + if (_target && !reequip) { while (_target->next) _target = _target->next; @@ -1732,6 +1821,37 @@ int AANewTarget::resolve() } } + if (_target && _target->currentZone == _target->controller()->game->battlefield && reequip) + { + if(!newhook) + { + _target = source; + source = (MTGCardInstance *) target; + } + else + { + while (_target->next) + _target = _target->next; + } + if(_target->hasSubtype(Subtypes::TYPE_EQUIPMENT)) + { + for (size_t i = 1; i < game->mLayers->actionLayer()->mObjects.size(); i++) + { + MTGAbility * a = ((MTGAbility *) game->mLayers->actionLayer()->mObjects[i]); + AEquip * eq = dynamic_cast (a); + if (eq && eq->source == _target) + { + ((AEquip*)a)->unequip(); + ((AEquip*)a)->equip(source); + } + } + } + if(!newhook) + { + target = source; + source = _target; + } + } return 1; } @@ -2029,16 +2149,16 @@ int AADynamic::resolve() switch(type) { case DYNAMIC_ABILITY_TYPE_POWER: - sourceamount = ((MTGCardInstance *) source)->power; - targetamount = ((MTGCardInstance *) _target)->power; + sourceamount = ((MTGCardInstance *) source)->getCurrentPower(); + targetamount = ((MTGCardInstance *) _target)->getCurrentPower(); if(eachother ) - sourceamount = ((MTGCardInstance *) source)->power; + sourceamount = ((MTGCardInstance *) source)->getCurrentPower(); break; case DYNAMIC_ABILITY_TYPE_TOUGHNESS: - sourceamount = ((MTGCardInstance *) source)->toughness; - targetamount = ((MTGCardInstance *) _target)->toughness; + sourceamount = ((MTGCardInstance *) source)->getCurrentToughness(); + targetamount = ((MTGCardInstance *) _target)->getCurrentToughness(); if(eachother ) - sourceamount = ((MTGCardInstance *) source)->toughness; + sourceamount = ((MTGCardInstance *) source)->getCurrentToughness(); break; case DYNAMIC_ABILITY_TYPE_MANACOST: if(amountsource == 1) @@ -2381,6 +2501,49 @@ AALifer * AALifer::clone() const return NEW AALifer(*this); } +//players modify hand size +AModifyHand::AModifyHand(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable * _target, string hand, int who) : + AbilityTP(observer, _id, _source, _target, who), hand(hand) +{ +} + +int AModifyHand::addToGame() +{ + Damageable * _target = (Damageable *) getTarget(); + Player * p = getPlayerFromDamageable(_target); + + if (!p) + return 0; + + WParsedInt handmodifier(hand, NULL, source); + p->handmodifier += handmodifier.getValue(); + + return MTGAbility::addToGame(); +} + +int AModifyHand::destroy() +{ + Damageable * _target = (Damageable *) getTarget(); + Player * p = getPlayerFromDamageable(_target); + + if (!p) + return 0; + + WParsedInt handmodifier(hand, NULL, source); + p->handmodifier -= handmodifier.getValue(); + + return 1; +} + +const string AModifyHand::getMenuText() +{ + return "Modify Hand Size"; +} + +AModifyHand * AModifyHand::clone() const +{ + return NEW AModifyHand(*this); +} //players max hand size AASetHand::AASetHand(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable * _target, int hand, ManaCost * _cost, @@ -2480,37 +2643,69 @@ int AACloner::resolve() // Use id of the card to have the same image as the original MTGCard* clone = (_target->isToken ? _target: MTGCollection()->getCardById(_target->getId())); + // If its a copier then copy what it is + if(_target->isACopier) + clone = _target; + Player * targetPlayer = who == 1 ? source->controller()->opponent() : source->controller(); - MTGCardInstance * myClone = NEW MTGCardInstance(clone, targetPlayer->game); - targetPlayer->game->temp->addCard(myClone); + int tokenize = 1;//tokenizer support for cloning + if (targetPlayer->game->battlefield->hasAbility(Constants::TOKENIZER)) + { + int nbcards = targetPlayer->game->battlefield->nb_cards; + for (int j = 0; j < nbcards; j++) + { + if (targetPlayer->game->battlefield->cards[j]->has(Constants::TOKENIZER)) + tokenize *= 2; + } + } + + for (int i = 0; i < tokenize; ++i) + { + MTGCardInstance * myClone = NEW MTGCardInstance(clone, targetPlayer->game); + targetPlayer->game->temp->addCard(myClone); - Spell * spell = NEW Spell(game, myClone); - spell->source->isToken = 1; - spell->resolve(); - spell->source->fresh = 1; - spell->source->model = spell->source; - spell->source->model->data = spell->source; - if(_target->isToken) - { - spell->source->power = _target->origpower; - spell->source->toughness = _target->origtoughness; - spell->source->life = _target->origtoughness; + Spell * spell = NEW Spell(game, myClone); + spell->source->isToken = 1; + spell->resolve(); + spell->source->fresh = 1; + spell->source->model = spell->source; + spell->source->model->data = spell->source; + //if the token doesn't have cda/dynamic pt then allow this... + if((_target->isToken) && (!_target->isCDA)) + { + if(_target->pbonus > 0) + spell->source->power = _target->power - _target->pbonus; + else + spell->source->power = _target->power + abs(_target->pbonus); + if(_target->tbonus > 0) + { + spell->source->toughness = _target->toughness - _target->tbonus; + spell->source->life = _target->toughness - _target->tbonus; + } + else + { + spell->source->toughness = _target->toughness + abs(_target->tbonus); + spell->source->life = _target->toughness + abs(_target->tbonus); + } + } + list::iterator 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); + } + for (it = typesToAdd.begin(); it != typesToAdd.end(); it++) + { + spell->source->addType(*it); + } + spell->source->modifiedbAbi = _target->modifiedbAbi; + spell->source->origbasicAbilities = _target->origbasicAbilities; + delete spell; } - list::iterator it; - for (it = awith.begin(); it != awith.end(); it++) - { - spell->source->basicAbilities[*it] = 1; - } - for (it = colors.begin(); it != colors.end(); it++) - { - spell->source->setColor(*it); - } - for (it = typesToAdd.begin(); it != typesToAdd.end(); it++) - { - spell->source->addType(*it); - } - delete spell; return 1; } @@ -2644,8 +2839,8 @@ AInstantCastRestrictionUEOT::~AInstantCastRestrictionUEOT() //AAMover -AAMover::AAMover(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target, string dest,string newName, ManaCost * _cost) : - ActivatedAbility(observer, _id, _source, _cost, 0), destination(dest),named(newName) +AAMover::AAMover(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target, string dest,string newName, ManaCost * _cost, bool undying, bool persist) : + ActivatedAbility(observer, _id, _source, _cost, 0), destination(dest),named(newName),undying(undying),persist(persist) { if (_target) target = _target; @@ -2692,6 +2887,10 @@ int AAMover::resolve() andAbilityClone->addToGame(); } } + if(persist) + spell->source->counters->addCounter(-1,-1); + if(undying) + spell->source->counters->addCounter(1,1); delete spell; return 1; } @@ -2941,6 +3140,32 @@ AAShuffle * AAShuffle::clone() const return NEW AAShuffle(*this); } +// Mulligan +AAMulligan::AAMulligan(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target, ManaCost * _cost, int who) : + ActivatedAbilityTP(observer, _id, card, _target, _cost, who) +{ +} + +int AAMulligan::resolve() +{ + Player * player = getPlayerFromTarget(getTarget()); + if (player) + { + player->serumMulligan(); + } + return 1; +} + +const string AAMulligan::getMenuText() +{ + return "Mulligan"; +} + +AAMulligan * AAMulligan::clone() const +{ + return NEW AAMulligan(*this); +} + // Remove Mana From ManaPool AARemoveMana::AARemoveMana(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target, string manaDesc, int who) : ActivatedAbilityTP(observer, _id, card, _target, NULL, who) @@ -3950,12 +4175,12 @@ ATransformer::ATransformer(GameObserver* observer, int id, MTGCardInstance * sou myCurrentTurn = 1000; //this subkeyword adds a color without removing the existing colors. addNewColors = (sabilities.find("newcolors") != string::npos); - remove = (stypes.find("removealltypes") != string::npos); - removeCreatureSubtypes = (stypes.find("removecreaturesubtypes") != string::npos); + remove = (stypes.find("removealltypes") != string::npos); + removeCreatureSubtypes = (stypes.find("removecreaturesubtypes") != string::npos); removeTypes = (stypes.find("removetypes") != string::npos); - if (stypes.find("allsubtypes") != string::npos || stypes.find("removecreaturesubtypes") != string::npos) - { + if (stypes.find("allsubtypes") != string::npos || stypes.find("removecreaturesubtypes") != string::npos) + { const vector values = MTGAllCards::getValuesById(); for (size_t i = 0; i removeType(i,1); } - else if (remove) - { - for (it = oldtypes.begin(); it != oldtypes.end(); it++) - { - _target->removeType(*it); - } - } - else - { + else if (remove) + { + for (it = oldtypes.begin(); it != oldtypes.end(); it++) + { + _target->removeType(*it); + } + } + else + { for (it = types.begin(); it != types.end(); it++) - { + { if(removeCreatureSubtypes) { @@ -4055,8 +4280,8 @@ for (it = types.begin(); it != types.end(); it++) { _target->addType(*it); } - } - } + } + } for (it = colors.begin(); it != colors.end(); it++) { _target->setColor(*it); @@ -4065,6 +4290,7 @@ 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) @@ -4108,23 +4334,34 @@ for (it = types.begin(); it != types.end(); it++) } } } + if(newpowerfound || newtoughnessfound) + _target->isSettingBase += 1; if(newpowerfound ) { WParsedInt * val = NEW WParsedInt(newpower,NULL, source); - oldpower = _target->power; - _target->power += val->getValue(); - _target->power -= oldpower; - _target->power += reapplyCountersBonus(_target,false,true); + if(_target->isSwitchedPT) + { + _target->switchPT(false); + _target->addbaseP(val->getValue()); + _target->switchPT(true); + } + else + _target->addbaseP(val->getValue()); delete val; } if(newtoughnessfound ) - { + {//we should consider the damage if there is, if you have a 5/5 creature with 1 damage, + //and you turn it into 1/1, the 1 damage is still there and the creature must die... + //the toughness is intact but what we see in the game is the life... WParsedInt * val = NEW WParsedInt(newtoughness,NULL, source); - oldtoughness = _target->toughness; - _target->addToToughness(val->getValue()); - _target->addToToughness(-oldtoughness); - _target->addToToughness(reapplyCountersBonus(_target,true,false)); - _target->life = _target->toughness; + if(_target->isSwitchedPT) + { + _target->switchPT(false); + _target->addbaseT(val->getValue()); + _target->switchPT(true); + } + else + _target->addbaseT(val->getValue()); delete val; } @@ -4202,20 +4439,24 @@ 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++) { _target->setColor(*it); } + + if(newpowerfound || newtoughnessfound) + _target->isSettingBase -= 1; if(newpowerfound ) { - _target->power = oldpower; + _target->revertbaseP(); } if(newtoughnessfound ) { - _target->setToughness(oldtoughness); + _target->revertbaseT(); } if(newAbilityFound) { @@ -4232,22 +4473,22 @@ int ATransformer::destroy() newAbilities.erase(_target); } } - if (remove || removeCreatureSubtypes) - { - for (it = oldtypes.begin(); it != oldtypes.end(); it++) - { + if (remove || removeCreatureSubtypes) + { + for (it = oldtypes.begin(); it != oldtypes.end(); it++) + { if(!_target->hasSubtype(*it)) _target->addType(*it); - } - } - ////in the case that we removed or added types to a card, so that it retains its original name when the effect is removed. - //if(_target->model->data->name.size())//tokens don't have a model name. - // _target->setName(_target->model->data->name.c_str()); + } + } + ////in the case that we removed or added types to a card, so that it retains its original name when the effect is removed. + //if(_target->model->data->name.size())//tokens don't have a model name. + // _target->setName(_target->model->data->name.c_str()); //edit: this ability shouldn't have to reset the name on a card becuase removing a subtype changes the name of a land. //that should be handled in addType...not here. //im sure commenting this out will reintroduce a bug somewhere but it needs to be handled correctly. furthermore, why does adding and removing a type touch the name of a card? - } + } return 1; } @@ -4316,6 +4557,7 @@ int PTInstant::resolve() APowerToughnessModifier * a = ability->clone(); GenericInstantAbility * wrapper = NEW GenericInstantAbility(game, 1, source, (Damageable *) (this->target), a); wrapper->addToGame(); + ((Damageable *) (this->target))->afterDamage();//additional check the negative pt after resolving.. return 1; } const string PTInstant::getMenuText() @@ -4455,8 +4697,8 @@ int ALoseAbilities::addToGame() if (al->mObjects[i]) { MTGAbility * currentAction = (MTGAbility *) al->mObjects[i]; - ALord * l = dynamic_cast (currentAction); - if(l) + ALord * l = dynamic_cast (currentAction); + if(l) lordsInGame.push_back(l); } } @@ -4466,9 +4708,9 @@ int ALoseAbilities::addToGame() if (al->mObjects[i]) { MTGAbility * currentAction = (MTGAbility *) al->mObjects[i]; - ALoseAbilities * la = dynamic_cast (currentAction); - if(la) - continue; + ALoseAbilities * la = dynamic_cast (currentAction); + if(la) + continue; if (currentAction->source == _target) { bool canRemove = true; @@ -4509,20 +4751,20 @@ int ALoseAbilities::destroy() MTGAbility * a = storedAbilities[i]; //OneShot abilities are not supposed to stay in the game for long. // If we copied one, something wrong probably happened - if (a->oneShot) - { + if (a->oneShot) + { DebugTrace("ALLABILITIES: Ability should not be one shot"); - continue; + continue; } //Avoid inifinite loop of removing/putting back abilities if (dynamic_cast (a)) { - DebugTrace("ALLABILITIES: loseability won't be put in the loseability list"); - continue; - } + DebugTrace("ALLABILITIES: loseability won't be put in the loseability list"); + continue; + } - a->addToGame(); + a->addToGame(); } storedAbilities.clear(); return 1; @@ -4744,6 +4986,78 @@ AVanishing::~AVanishing() { } +//Produce Mana +AProduceMana::AProduceMana(GameObserver* observer, int _id, MTGCardInstance * _source, string ManaDescription) : +MTGAbility(observer, _id, source),ManaDescription(ManaDescription) +{ + source = _source; + mana[0] = "{g}"; mana[1] = "{u}"; mana[2] = "{r}"; mana[3] = "{b}"; mana[4] = "{w}"; +} + +int AProduceMana::receiveEvent(WEvent * event) +{ + if(WEventCardTappedForMana * isTappedForMana = dynamic_cast (event)) + { + if ((isTappedForMana->card == source)||(isTappedForMana->card == source->target && ManaDescription == "selectmana")) + produce(); + } + return 1; +} + +int AProduceMana::produce() +{ + if(ManaDescription == "selectmana") + {//I tried menu ability and vector to have a shorter code but it crashes wagic at end of turn... + //The may ability on otherhand works but the ability is cumulative... + //This must be wrapped on menuability so we can use it on successions... + AManaProducer *ap0 = NEW AManaProducer(game, game->mLayers->actionLayer()->getMaxId(), source, source->controller(), ManaCost::parseManaCost(mana[0],NULL,source), NULL, 0,"",false); + MayAbility *mw0 = NEW MayAbility(game, game->mLayers->actionLayer()->getMaxId(), ap0, source,true); + MTGAbility *ga0 = NEW GenericAddToGame(game, game->mLayers->actionLayer()->getMaxId(), source,NULL,mw0); + + AManaProducer *ap1 = NEW AManaProducer(game, game->mLayers->actionLayer()->getMaxId(), source, source->controller(), ManaCost::parseManaCost(mana[1],NULL,source), NULL, 0,"",false); + MayAbility *mw1 = NEW MayAbility(game, game->mLayers->actionLayer()->getMaxId(), ap1, source,true); + MTGAbility *ga1 = NEW GenericAddToGame(game, game->mLayers->actionLayer()->getMaxId(), source,NULL,mw1); + + AManaProducer *ap2 = NEW AManaProducer(game, game->mLayers->actionLayer()->getMaxId(), source, source->controller(), ManaCost::parseManaCost(mana[2],NULL,source), NULL, 0,"",false); + MayAbility *mw2 = NEW MayAbility(game, game->mLayers->actionLayer()->getMaxId(), ap2, source,true); + MTGAbility *ga2 = NEW GenericAddToGame(game, game->mLayers->actionLayer()->getMaxId(), source,NULL,mw2); + + AManaProducer *ap3 = NEW AManaProducer(game, game->mLayers->actionLayer()->getMaxId(), source, source->controller(), ManaCost::parseManaCost(mana[3],NULL,source), NULL, 0,"",false); + MayAbility *mw3 = NEW MayAbility(game, game->mLayers->actionLayer()->getMaxId(), ap3, source,true); + MTGAbility *ga3 = NEW GenericAddToGame(game, game->mLayers->actionLayer()->getMaxId(), source,NULL,mw3); + + AManaProducer *ap4 = NEW AManaProducer(game, game->mLayers->actionLayer()->getMaxId(), source, source->controller(), ManaCost::parseManaCost(mana[4],NULL,source), NULL, 0,"",false); + MayAbility *mw4 = NEW MayAbility(game, game->mLayers->actionLayer()->getMaxId(), ap4, source,true); + MTGAbility *ga4 = NEW GenericAddToGame(game, game->mLayers->actionLayer()->getMaxId(), source,NULL,mw4); + + ga0->resolve(); + ga1->resolve(); + ga2->resolve(); + ga3->resolve(); + ga4->resolve(); + } + else + { + AManaProducer *amp = NEW AManaProducer(game, game->mLayers->actionLayer()->getMaxId(), source, source->controller(), ManaCost::parseManaCost(ManaDescription,NULL,source), NULL, 0,"",false); + amp->resolve(); + } + return 1; +} + +const string AProduceMana::getMenuText() +{ + return "Produce Mana"; +} + +AProduceMana * AProduceMana::clone() const +{ + return NEW AProduceMana(*this); +} + +AProduceMana::~AProduceMana() +{ +} + //AUpkeep AUpkeep::AUpkeep(GameObserver* observer, int _id, MTGCardInstance * card, MTGAbility * a, ManaCost * _cost, int restrictions, int _phase, int _once,bool Cumulative) : @@ -4852,8 +5166,8 @@ AUpkeep::~AUpkeep() } //A Phase based Action -APhaseAction::APhaseAction(GameObserver* observer, int _id, MTGCardInstance * card, MTGCardInstance *, string sAbility, int, int _phase,bool forcedestroy,bool next,bool myturn,bool opponentturn,bool once) : -MTGAbility(observer, _id, card),sAbility(sAbility), phase(_phase),forcedestroy(forcedestroy),next(next),myturn(myturn),opponentturn(opponentturn),once(once) +APhaseAction::APhaseAction(GameObserver* observer, int _id, MTGCardInstance * card, MTGCardInstance *, string sAbility, int, int _phase,bool forcedestroy,bool next,bool myturn,bool opponentturn,bool once, bool checkexile) : +MTGAbility(observer, _id, card),sAbility(sAbility), phase(_phase),forcedestroy(forcedestroy),next(next),myturn(myturn),opponentturn(opponentturn),once(once),checkexile(checkexile) { abilityId = _id; abilityOwner = card->controller(); @@ -4870,6 +5184,14 @@ MTGAbility(observer, _id, card),sAbility(sAbility), phase(_phase),forcedestroy(f void APhaseAction::Update(float dt) { + if(checkexile) + { + if(((MTGCardInstance *)target)->next->getCurrentZone() != ((MTGCardInstance *)target)->owner->game->exile) + { + this->forceDestroy = 1; + return; + } + } if (newPhase != currentPhase) { if((myturn && game->currentPlayer == source->controller())|| @@ -4946,11 +5268,11 @@ APhaseAction::~APhaseAction() } // the main ability -APhaseActionGeneric::APhaseActionGeneric(GameObserver* observer, int _id, MTGCardInstance * card, MTGCardInstance * target, string sAbility, int restrictions, int _phase,bool forcedestroy,bool next,bool myturn,bool opponentturn,bool once) : +APhaseActionGeneric::APhaseActionGeneric(GameObserver* observer, int _id, MTGCardInstance * card, MTGCardInstance * target, string sAbility, int restrictions, int _phase,bool forcedestroy,bool next,bool myturn,bool opponentturn,bool once, bool checkexile) : InstantAbility(observer, _id, card, target) { MTGCardInstance * _target = target; - ability = NEW APhaseAction(game, _id, card,_target, sAbility, restrictions, _phase,forcedestroy,next,myturn,opponentturn,once); + ability = NEW APhaseAction(game, _id, card,_target, sAbility, restrictions, _phase,forcedestroy,next,myturn,opponentturn,once,checkexile); } int APhaseActionGeneric::resolve() @@ -4998,10 +5320,13 @@ void ABlink::Update(float dt) if ((blinkueot && currentPhase == MTG_PHASE_ENDOFTURN) || (blinkForSource && !source->isInPlay(game))) { - if (Blinked == NULL) - MTGAbility::Update(dt); - MTGCardInstance * _target = Blinked; - returnCardIntoPlay(_target); + if(Blinked->blinked) + { + if (Blinked == NULL) + MTGAbility::Update(dt); + MTGCardInstance * _target = Blinked; + returnCardIntoPlay(_target); + } } MTGAbility::Update(dt); } @@ -5032,6 +5357,7 @@ void ABlink::resolveBlink() return; } _target = _target->next; + _target->blinked = true; Blinked = _target; if(!blinkueot && !blinkForSource) { @@ -5042,6 +5368,11 @@ void ABlink::resolveBlink() void ABlink::returnCardIntoPlay(MTGCardInstance* _target) { MTGCardInstance * Blinker = NULL; + if(!_target->blinked) + { + this->forceDestroy = 1; + return; + } if (!blinkhand) Blinker = _target->controller()->game->putInZone( _target, @@ -5072,7 +5403,7 @@ void ABlink::returnCardIntoPlay(MTGCardInstance* _target) { return; } - MTGGameZone * inplay = spell->source->owner->game->inPlay; + /*MTGGameZone * inplay = spell->source->owner->game->inPlay; spell->source->target = NULL; for (int i = game->getRandomGenerator()->random()%inplay->nb_cards;;i = game->getRandomGenerator()->random()%inplay->nb_cards) { @@ -5086,7 +5417,16 @@ void ABlink::returnCardIntoPlay(MTGCardInstance* _target) { this->forceDestroy = 1; return; } - } + }*/ + //replaced with castcard(putinplay) + MTGAbility *a = NEW AACastCard(game, game->mLayers->actionLayer()->getMaxId(), Blinker, Blinker,false,false,false,"","Return to Play",false,true); + a->oneShot = false; + a->canBeInterrupted = false; + a->addToGame(); + SAFE_DELETE(spell); + SAFE_DELETE(tc); + this->forceDestroy = 1; + return; } spell->source->power = spell->source->origpower; spell->source->toughness = spell->source->origtoughness; @@ -5319,7 +5659,7 @@ int AEquip::unequip() { MTGAbility * a = currentAbilities[i]; if (dynamic_cast (a) || dynamic_cast (a) || dynamic_cast (a) - || dynamic_cast (AbilityFactory::getCoreAbility(a)) + || dynamic_cast (AbilityFactory::getCoreAbility(a)) || (a->aType == MTGAbility::STANDARD_TOKENCREATOR && a->oneShot)) { SAFE_DELETE(a); @@ -5328,6 +5668,8 @@ int AEquip::unequip() game->removeObserver(currentAbilities[i]); } currentAbilities.clear(); + WEvent * e = NEW WEventCardUnattached(source); + game->receiveEvent(e); return 1; } @@ -5360,6 +5702,8 @@ int AEquip::equip(MTGCardInstance * equipped) //we equip... a->addToGame(); } + WEvent * e = NEW WEventCardEquipped(source); + game->receiveEvent(e); return 1; } @@ -5405,8 +5749,8 @@ AEquip * AEquip::clone() const } // casting a card for free, or casting a copy of a card. -AACastCard::AACastCard(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target,bool _restricted,bool _copied,bool asNormal,string _namedCard,string _name,bool _noEvent) : - MTGAbility(observer, _id, _source),restricted(_restricted),asCopy(_copied),normal(asNormal),cardNamed(_namedCard),nameThis(_name),noEvent(_noEvent) +AACastCard::AACastCard(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target,bool _restricted,bool _copied,bool asNormal,string _namedCard,string _name,bool _noEvent,bool putinplay) : + MTGAbility(observer, _id, _source),restricted(_restricted),asCopy(_copied),normal(asNormal),cardNamed(_namedCard),nameThis(_name),noEvent(_noEvent),putinplay(putinplay) { target = _target; andAbility = NULL; @@ -5424,6 +5768,22 @@ void AACastCard::Update(float dt) { theNamedCard = makeCard(); } + if(putinplay) + { + MTGCardInstance * toCheck = (MTGCardInstance*)target; + toCheck->target = NULL; + toCheck->playerTarget = NULL; + toCheck->bypassTC = true; + TargetChooserFactory tcf(game); + TargetChooser * atc = tcf.createTargetChooser(toCheck->spellTargetType,toCheck); + if ((toCheck->hasType(Subtypes::TYPE_AURA) && !atc->validTargetsExist())||toCheck->isToken) + { + processed = true; + this->forceDestroy = 1; + return ; + } + SAFE_DELETE(atc); + } if (restricted) { MTGCardInstance * toCheck = (MTGCardInstance*)target; @@ -5441,16 +5801,28 @@ void AACastCard::Update(float dt) this->forceDestroy = 1; return; } - if(!toCheck->hasType(Subtypes::TYPE_INSTANT) && !(game->getCurrentGamePhase() == MTG_PHASE_FIRSTMAIN || game->getCurrentGamePhase() == MTG_PHASE_SECONDMAIN)) + /*if(!toCheck->hasType(Subtypes::TYPE_INSTANT) && !(game->getCurrentGamePhase() == MTG_PHASE_FIRSTMAIN || game->getCurrentGamePhase() == MTG_PHASE_SECONDMAIN)) + { + processed = true; + this->forceDestroy = 1; + return; + }*/ + } + MTGCardInstance * toCheck = (MTGCardInstance*)target; + if(theNamedCard) + toCheck = theNamedCard; + if(toCheck && toCheck->spellTargetType.size()) + { + TargetChooserFactory tcf(game); + TargetChooser * stc = tcf.createTargetChooser(toCheck->spellTargetType,toCheck); + if (!stc->validTargetsExist()||toCheck->isToken) { processed = true; this->forceDestroy = 1; return; } + SAFE_DELETE(stc); } - MTGCardInstance * toCheck = (MTGCardInstance*)target; - if(theNamedCard) - toCheck = theNamedCard; if (Spell * checkSpell = dynamic_cast(target)) { toCheck = checkSpell->source; @@ -5531,12 +5903,18 @@ int AACastCard::resolveSpell() MTGCardInstance * copy = NULL; if (normal ||(!_target->hasType(Subtypes::TYPE_INSTANT) && !_target->hasType(Subtypes::TYPE_SORCERY))) { - copy =_target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->stack,noEvent); + if (putinplay && (_target->hasType(Subtypes::TYPE_ARTIFACT)||_target->hasType(Subtypes::TYPE_CREATURE)||_target->hasType(Subtypes::TYPE_ENCHANTMENT)||_target->hasType(Subtypes::TYPE_PLANESWALKER))) + copy =_target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->battlefield,noEvent); + else + copy =_target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->stack,noEvent); copy->changeController(source->controller(),true); } else { - copy =_target->controller()->game->putInZone(_target, _target->currentZone, _target->controller()->game->stack,noEvent); + if (putinplay && (_target->hasType(Subtypes::TYPE_ARTIFACT)||_target->hasType(Subtypes::TYPE_CREATURE)||_target->hasType(Subtypes::TYPE_ENCHANTMENT)||_target->hasType(Subtypes::TYPE_PLANESWALKER))) + copy =_target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->battlefield,noEvent); + else + copy =_target->controller()->game->putInZone(_target, _target->currentZone, _target->controller()->game->stack,noEvent); copy->changeController(source->controller(),true); } if (game->targetChooser) @@ -5591,7 +5969,9 @@ const string AACastCard::getMenuText() { if(nameThis.size()) return nameThis.c_str(); - return "Cast For Free"; + if(putinplay) + return "Put Into Play"; + return "Cast Card"; } AACastCard * AACastCard::clone() const @@ -5633,7 +6013,7 @@ ATutorialMessage::ATutorialMessage(GameObserver* observer, MTGCardInstance * sou else { mMessage = _(message); //translate directly here, remove this and translate at rendering time if it bites us - ReplaceString(mMessage, "\\n", "\n"); + ReplaceString(mMessage, "\\n", "\n"); } } @@ -5763,7 +6143,7 @@ void ATutorialMessage::Render() if (options[Options::SFXVOLUME].number > 0) { - game->getResourceManager()->PlaySample("tutorial.wav"); + game->getResourceManager()->PlaySample("tutorial.wav"); } } else diff --git a/projects/mtg/src/CardDescriptor.cpp b/projects/mtg/src/CardDescriptor.cpp index c6ae1e7a7..64951c818 100644 --- a/projects/mtg/src/CardDescriptor.cpp +++ b/projects/mtg/src/CardDescriptor.cpp @@ -129,7 +129,7 @@ MTGCardInstance * CardDescriptor::match_or(MTGCardInstance * card) return NULL; if (toughnessComparisonMode && !valueInRange(toughnessComparisonMode, card->getToughness(), toughness)) return NULL; - if (manacostComparisonMode && !valueInRange(manacostComparisonMode, card->getManaCost()->getConvertedCost(), convertedManacost)) + if (manacostComparisonMode && !valueInRange(manacostComparisonMode, card->myconvertedcost, convertedManacost)) return NULL; if (nameComparisonMode && compareName != card->name) return NULL; @@ -170,7 +170,7 @@ MTGCardInstance * CardDescriptor::match_and(MTGCardInstance * card) match = NULL; if (toughnessComparisonMode && !valueInRange(toughnessComparisonMode, card->getToughness(), toughness)) match = NULL; - if (manacostComparisonMode && !valueInRange(manacostComparisonMode, card->getManaCost()->getConvertedCost(), convertedManacost)) + if (manacostComparisonMode && !valueInRange(manacostComparisonMode, card->myconvertedcost, convertedManacost)) match = NULL; if(nameComparisonMode && compareName != card->name) match = NULL; diff --git a/projects/mtg/src/CardDisplay.cpp b/projects/mtg/src/CardDisplay.cpp index 38cf35913..13c9f2fcd 100644 --- a/projects/mtg/src/CardDisplay.cpp +++ b/projects/mtg/src/CardDisplay.cpp @@ -267,7 +267,7 @@ void CardDisplay::Render() int drawMode = DrawMode::kNormal; if (observer) { - pos.actY = 150; + pos.actY = 145; if (x < (CardGui::BigWidth / 2)) pos.actX = SCREEN_WIDTH - 10 - CardGui::BigWidth / 2; drawMode = observer->getCardSelector()->GetDrawMode(); } diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index 0b5b9d44a..4cdfecb12 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -43,11 +43,11 @@ namespace } CardGui::CardGui(MTGCardInstance* card, float x, float y) - : PlayGuiObject(Height, x, y, 0, false), card(card) + : PlayGuiObject(Height, x, y, 0, false), card(card) { } CardGui::CardGui(MTGCardInstance* card, const Pos& ref) - : PlayGuiObject(Height, ref, 0, false), card(card) + : PlayGuiObject(Height, ref, 0, false), card(card) { } @@ -69,7 +69,7 @@ float CardView::GetCenterY() CardView::CardView(const SelectorZone owner, MTGCardInstance* card, float x, float y) - : CardGui(card, x, y), owner(owner) + : CardGui(card, x, y), owner(owner) { const Pos* ref = card->view; while (card) @@ -81,7 +81,7 @@ CardView::CardView(const SelectorZone owner, MTGCardInstance* card, float x, flo } CardView::CardView(const SelectorZone owner, MTGCardInstance* card, const Pos& ref) - : CardGui(card, ref), owner(owner) + : CardGui(card, ref), owner(owner) { const Pos* r = card->view; while (card) @@ -111,17 +111,17 @@ void CardGui::Update(float dt) PlayGuiObject::Update(dt); } -void CardGui::DrawCard(const Pos& inPosition, int inMode, bool thumb) +void CardGui::DrawCard(const Pos& inPosition, int inMode, bool thumb, bool noborder) { - DrawCard(card, inPosition, inMode, thumb); + DrawCard(card, inPosition, inMode, thumb, noborder); } -void CardGui::DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode, bool thumb) +void CardGui::DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode, bool thumb, bool noborder) { switch (inMode) { case DrawMode::kNormal: - RenderBig(inCard, inPosition, thumb); + RenderBig(inCard, inPosition, thumb, noborder); break; case DrawMode::kText: AlternateRender(inCard, inPosition); @@ -237,6 +237,31 @@ 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) + { + fakeborder->SetColor(ARGB((int)(actA),15,15,15)); + renderer->RenderQuad(fakeborder.get(), actX, actY, actT, (29 * actZ + 1) / 16, 42 * actZ / 16); + } + //draw border for highlighting + if (game) + { + if (card && card->isTargetted() && highlightborder) + { + highlightborder->SetColor(ARGB(95,255,0,0)); + renderer->RenderQuad(highlightborder.get(), actX, actY, actT, (30 * actZ + 1) / 16, 43 * actZ / 16); + } + if (card && card->isTargetter() && highlightborder) + { + highlightborder->SetColor(ARGB(95,0,245,0)); + renderer->RenderQuad(highlightborder.get(), actX, actY, actT, (30 * actZ + 1) / 16, 43 * actZ / 16); + } + } + //draw the card image renderer->RenderQuad(quad.get(), actX, actY, actT, scale, scale); } @@ -267,7 +292,7 @@ void CardGui::Render() } JQuadPtr mor; - if(card->isMorphed && !alternate) + if((card->isMorphed||(card->name == "Morph" && card->isACopier)) && !alternate) { mor = card->getObserver()->getResourceManager()->RetrieveTempQuad("morph.jpg"); if (mor && mor->mTex) { @@ -277,17 +302,92 @@ void CardGui::Render() } } + //draw line + if (game) + { + if (card && card->isTargetted()) + { + if(card->isTapped()) + { + if(mHasFocus) + renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-10,actY - (scale * quad->mHeight / 2)+6.5f, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(250,255,0,0)); + else + renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-8,actY - (scale * quad->mHeight / 2)+4, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(250,255,0,0)); + } + else + renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-2,actY - (scale * quad->mHeight / 2)-2, (scale * quad->mWidth)-0.02f, (scale * quad->mHeight)-0.02f, 1.8f,ARGB(250,255,0,0)); + } + if (card && card->isTargetter()) + { + if(card->isTapped()) + { + if(mHasFocus) + renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-10,actY - (scale * quad->mHeight / 2)+6.5f, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(250,0,255,0)); + else + renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-8,actY - (scale * quad->mHeight / 2)+4, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(250,0,255,0)); + } + else + renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-2,actY - (scale * quad->mHeight / 2)-2, (scale * quad->mWidth)-0.02f, (scale * quad->mHeight)-0.02f, 1.8f,ARGB(250,0,255,0)); + } + } + //draws the numbers power/toughness if (card->isCreature()) { mFont->SetScale(DEFAULT_MAIN_FONT_SCALE); char buffer[200]; sprintf(buffer, "%i/%i", card->power, card->life); - renderer->FillRect(actX - (12 * actZ), actY + 6 * actZ, 25 * actZ, 12 * actZ, + renderer->FillRect(actX - (13 * actZ), actY + 4 * actZ, 25.5f * actZ, 14 * actZ, ARGB(((static_cast(actA))/2),0,0,0)); - mFont->SetColor(ARGB(static_cast(actA),255,255,255)); + renderer->DrawRect(actX - (13 * actZ), actY + 4 * actZ, 25.5f * actZ, 14 * actZ, + ARGB(((static_cast(actA))),20,20,20)); + //damaged or buffed or powered down + if(card->wasDealtDamage && card->life <= 2) + mFont->SetColor(ARGB(static_cast(actA),255,0,0));//red critical and damaged + else if(!card->wasDealtDamage && card->pbonus < 0) + mFont->SetColor(ARGB(static_cast(actA),216,191,216));//thistle powered down + else if(!card->wasDealtDamage && card->pbonus >= 3) + mFont->SetColor(ARGB(static_cast(actA),255,255,0));//yellow buff + else if(card->hasType("legendary") && card->hasType("eldrazi") && !card->has(Constants::CHANGELING)) + mFont->SetColor(ARGB(static_cast(actA),238,130,238));//violet legendary eldrazi + else + mFont->SetColor(ARGB(static_cast(actA),255,255,255));//white default mFont->SetScale(actZ); - mFont->DrawString(buffer, actX - 10 * actZ, actY + 8 * actZ); + mFont->SetScale(actZ); + mFont->DrawString(buffer, actX - 10 * actZ, actY + 7 * actZ); + mFont->SetScale(1); + } + + string buff = ""; + if(card->isToken && !card->isACopier) + buff = "T"; + if(card->isToken && card->isACopier) + buff = "CT"; + if(!card->isToken && card->isACopier) + buff = "C"; + if(card->has(Constants::PAYZERO)) + buff += "Z"; + if(card->alias == 1000) + { + if(card->chooseacolor == 1) + buff += "\n-Green"; + else if(card->chooseacolor == 2) + buff += "\n-Blue"; + else if(card->chooseacolor == 3) + buff += "\n-Red"; + else if(card->chooseacolor == 4) + buff += "\n-Black"; + 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... + { + mFont->SetScale(DEFAULT_MAIN_FONT_SCALE); + char buffer[200]; + sprintf(buffer, "%s", buff.c_str()); + mFont->SetColor(ARGB(static_cast(actA),255,215,0));//Gold indicator + mFont->SetScale(0.8f); + mFont->DrawString(buffer, actX - 10 * actZ, actY - (16 * actZ)); mFont->SetScale(1); } @@ -958,7 +1058,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) +void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder) { JRenderer * renderer = JRenderer::GetInstance(); //GameObserver * game = GameObserver::GetInstance(); @@ -983,7 +1083,30 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb) } quad->SetColor(ARGB(255,255,255,255)); float scale = pos.actZ * 250.f / quad->mHeight; - renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale, scale); + //init setname + string cardsetname = setlist[card->setId].c_str(); + if(!noborder) + { + if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR") + { + //like white border + renderer->FillRoundRect(x-92,pos.actY-130, (scale * quad->mWidth)-10, (scale * quad->mHeight)-11, 9.0f,ARGB(255,248,248,255)); + //black thin line to simulate card edge + renderer->DrawRoundRect(x-92,pos.actY-130, (scale * quad->mWidth)-10, (scale * quad->mHeight)-11, 9.0f,ARGB(150,20,20,20)); + } + else + { + //like black border + renderer->FillRoundRect(x-92,pos.actY-130, (scale * quad->mWidth)-10, (scale * quad->mHeight)-11, 9.0f,ARGB(255,10,10,10)); + //white thin line to simulate card edge + renderer->DrawRoundRect(x-92,pos.actY-130, (scale * quad->mWidth)-10, (scale * quad->mHeight)-11, 9.0f,ARGB(50,240,240,240)); + } + //render card image + renderer->RenderQuad(quad.get(), x, pos.actY-2, pos.actT, scale-0.02f, scale-0.02f); + } + else + renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale, scale); + RenderCountersBig(card, pos); return; } @@ -1242,6 +1365,9 @@ bool CardGui::FilterCard(MTGCard * _card,string filter) if (minus) { cd.setisMultiColored(-1); + cd.SetExclusionColor(0);//not multicolored is monocolored not colorless, use iscolorless attribute + cd.SetExclusionColor(6);//restriction... green, red, blue, black or white colored only + cd.mode = CardDescriptor::CD_OR; } else { diff --git a/projects/mtg/src/CardPrimitive.cpp b/projects/mtg/src/CardPrimitive.cpp index 462457492..0ed61cd68 100644 --- a/projects/mtg/src/CardPrimitive.cpp +++ b/projects/mtg/src/CardPrimitive.cpp @@ -41,6 +41,8 @@ CardPrimitive::CardPrimitive(CardPrimitive * source) if(!source) return; basicAbilities = source->basicAbilities; + origbasicAbilities = source->basicAbilities; + LKIbasicAbilities = source->basicAbilities; for (size_t i = 0; i < source->types.size(); ++i) types.push_back(source->types[i]); @@ -76,6 +78,7 @@ CardPrimitive::~CardPrimitive() int CardPrimitive::init() { basicAbilities.reset(); + origbasicAbilities.reset(); types.clear(); diff --git a/projects/mtg/src/CardSelector.cpp b/projects/mtg/src/CardSelector.cpp index ce94a404c..3a7de16a7 100644 --- a/projects/mtg/src/CardSelector.cpp +++ b/projects/mtg/src/CardSelector.cpp @@ -176,7 +176,7 @@ bool CardSelector::CheckUserInput(JButton key) return true; } Target* oldactive = active; - timer = 250; + timer = 800; int x,y; JGE* jge = observer->getInput(); if(!jge) return false; @@ -306,7 +306,7 @@ switch_active: } else { - timer = 250; + timer = 800; } return true; } diff --git a/projects/mtg/src/Counters.cpp b/projects/mtg/src/Counters.cpp index f61504e27..b01c57644 100644 --- a/projects/mtg/src/Counters.cpp +++ b/projects/mtg/src/Counters.cpp @@ -56,8 +56,14 @@ int Counter::added() { if (power != 0 || toughness != 0) { - target->power += power; - target->addToToughness(toughness); + if(target->isSwitchedPT) + { + target->switchPT(false); + target->addcounter(power, toughness); + target->switchPT(true); + } + else + target->addcounter(power, toughness); } return 1; } @@ -66,8 +72,14 @@ int Counter::removed() { if (power != 0 || toughness != 0) { - target->power -= power; - target->addToToughness(-toughness); + if(target->isSwitchedPT) + { + target->switchPT(false); + target->removecounter(power, toughness); + target->switchPT(true); + } + else + target->removecounter(power, toughness); } return 1; } @@ -85,7 +97,7 @@ Counters::~Counters() } } -int Counters::addCounter(const char * _name, int _power, int _toughness) +int Counters::addCounter(const char * _name, int _power, int _toughness, bool _noevent) { /*420.5n If a permanent has both a +1/+1 counter and a -1/-1 counter on it, N +1/+1 and N -1/-1 counters are removed from it, where N is the smaller of the number of +1/+1 and -1/-1 counters on it.*/ GameObserver *g = target->getObserver(); @@ -109,9 +121,12 @@ int Counters::addCounter(const char * _name, int _power, int _toughness) Counter * counter = NEW Counter(target, _name, _power, _toughness); counters.push_back(counter); counter->added(); - WEvent * w = NEW WEventCounters(this,_name,_power,_toughness,true,false); - dynamic_cast(w)->targetCard = this->target; - g->receiveEvent(w); + if (!_noevent) + { + WEvent * w = NEW WEventCounters(this,_name,_power,_toughness,true,false); + dynamic_cast(w)->targetCard = this->target; + g->receiveEvent(w); + } mCount++; this->target->doDamageTest = 1; this->target->afterDamage(); @@ -122,7 +137,12 @@ int Counters::addCounter(const char * _name, int _power, int _toughness) int Counters::addCounter(int _power, int _toughness) { - return addCounter("", _power, _toughness); + return addCounter("", _power, _toughness, false); +} + +int Counters::addCounter(int _power, int _toughness, bool _noevent) +{ + return addCounter("", _power, _toughness, _noevent); } int Counters::init() diff --git a/projects/mtg/src/Credits.cpp b/projects/mtg/src/Credits.cpp index 64c4a609e..3e920c178 100644 --- a/projects/mtg/src/Credits.cpp +++ b/projects/mtg/src/Credits.cpp @@ -69,7 +69,7 @@ bool Unlockable::tryToUnlock(GameObserver * game) { string id = getValue("id"); assert(id.size() > 0); - GameOptionAward* goa = (GameOptionAward*) &options[id]; + GameOptionAward* goa = (GameOptionAward*) &options[id]; goa->giveAward(); return true; } diff --git a/projects/mtg/src/Damage.cpp b/projects/mtg/src/Damage.cpp index 6626c4df8..5691eed5a 100644 --- a/projects/mtg/src/Damage.cpp +++ b/projects/mtg/src/Damage.cpp @@ -76,8 +76,13 @@ int Damage::resolve() MTGCardInstance * _target = (MTGCardInstance *) target; if ((_target)->protectedAgainst(source)) damage = 0; - //rulings = 10/4/2004 The damage prevention ability works even if it has no counters, as long as some effect keeps its toughness above zero. + //rulings = 10/4/2004 The damage prevention ability works even if it has no counters, as long as some effect keeps its toughness above zero. //these creature are essentially immune to damage. however 0/-1 effects applied through lords or counters can kill them. + if ((_target)->has(Constants::PROTECTIONFROMCOLOREDSPELLS)) + {//damage is prevented as long as the damage source is a spell on the stack... + if((source->currentZone == source->controller()->opponent()->game->stack||source->currentZone == source->controller()->game->stack) && (source->hasColor(1)||source->hasColor(2)||source->hasColor(3)||source->hasColor(4)||source->hasColor(5))) + damage = 0; + } if ((_target)->has(Constants::PHANTOM)) { damage = 0; @@ -121,7 +126,35 @@ int Damage::resolve() } _target->doDamageTest = 1; } + if (target->type_as_damageable == Damageable::DAMAGEABLE_PLAYER) + { + if(source->has(Constants::LIBRARYEATER) && typeOfDamage == 1) + { + for (int j = damage; j > 0; j--) + { + if(((Player*)target)->game->library->nb_cards) + ((Player*)target)->game->putInZone(((Player*)target)->game->library->cards[((Player*)target)->game->library->nb_cards - 1], ((Player*)target)->game->library, ((Player*)target)->game->graveyard); + } + damage = 0; + } + if(source->alias == 89092 && typeOfDamage == 1)//Szadek Lord of Secrets + { + for (int j = damage; j > 0; j--) + { + if(((Player*)target)->game->library->nb_cards) + ((Player*)target)->game->putInZone(((Player*)target)->game->library->cards[((Player*)target)->game->library->nb_cards - 1], ((Player*)target)->game->library, ((Player*)target)->game->graveyard); + source->counters->addCounter(1, 1); + } + damage = 0; + } + if (!damage) + { + state = RESOLVED_NOK; + delete (e); + return 0; + } + } int a = damage; if (target->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE && (source->has(Constants::WITHER) || source->has( diff --git a/projects/mtg/src/DeckMenu.cpp b/projects/mtg/src/DeckMenu.cpp index 8524fc90e..3b670e9f5 100644 --- a/projects/mtg/src/DeckMenu.cpp +++ b/projects/mtg/src/DeckMenu.cpp @@ -20,14 +20,11 @@ namespace DeckMenuConst const float kLineHeight = 25; const float kDescriptionVerticalBoxPadding = -5; const float kDescriptionHorizontalBoxPadding = 5; - - const float kDefaultFontScale = 1.0f; + const float kVerticalScrollSpeed = 7.0f; const int DETAILED_INFO_THRESHOLD = 20; const int kDetailedInfoButtonId = 10000; - - const PIXEL_TYPE kRedColor = ARGB(0xFF, 0xFF, 0x00, 0x00); } hgeParticleSystem* DeckMenu::stars = NULL; @@ -72,7 +69,7 @@ JGuiController(JGE::GetInstance(), id, listener), fontId(fontId), mShowDetailsSc menuInitialized = false; float scrollerWidth = 200.0f; - float scrollerHeight = 28.0f; + float scrollerHeight = 28.0f; mScroller = NEW VerticalTextScroller(Fonts::MAIN_FONT, 14, 235, scrollerWidth, scrollerHeight, DeckMenuConst::kVerticalScrollSpeed); mAutoTranslate = true; @@ -97,7 +94,7 @@ JGuiController(JGE::GetInstance(), id, listener), fontId(fontId), mShowDetailsSc mSelectionTargetY = selectionY = DeckMenuConst::kVerticalMargin; if (NULL == stars) - stars = NEW hgeParticleSystem(WResourceManager::Instance()->RetrievePSI("stars.psi", WResourceManager::Instance()->GetQuad("stars").get())); + stars = NEW hgeParticleSystem(WResourceManager::Instance()->RetrievePSI("stars.psi", WResourceManager::Instance()->GetQuad("stars").get())); stars->FireAt(mX, mY); const string detailedInfoString = _("Detailed Info"); @@ -218,7 +215,7 @@ void DeckMenu::selectRandomDeck(bool isAi) { DeckManager *deckManager = DeckManager::GetInstance(); vector *deckList = isAi ? deckManager->getAIDeckOrderList() : deckManager->getPlayerDeckOrderList(); - int random = (WRand() * 1000) % deckList->size(); + int random = rand() % (int)deckList->size(); selectDeck( random, isAi ); } @@ -251,11 +248,11 @@ void DeckMenu::Render() if (currentMenuItem->getY() - DeckMenuConst::kLineHeight * startId < mY + height - DeckMenuConst::kLineHeight + 7) { // only load stats for visible items in the list - DeckMetaData* metaData = currentMenuItem->getMetaData(); + DeckMetaData* metaData = currentMenuItem->getMetaData(); if (metaData && !metaData->mStatsLoaded) { metaData->LoadStats(); - } + } if (currentMenuItem->hasFocus()) { @@ -279,6 +276,8 @@ void DeckMenu::Render() JQuadPtr quad = WResourceManager::Instance()->RetrieveTempQuad(currentAvatarImageName, TEXTURE_SUB_AVATAR); if(quad.get()) { + quad->mWidth = 35.f; + quad->mHeight = 50.f; if (currentMenuItem->getText() == "Evil Twin") { JQuad * evil = quad.get(); @@ -292,7 +291,7 @@ void DeckMenu::Render() } // fill in the description part of the screen - string text = wordWrap(_(currentMenuItem->getDescription()), descWidth, descriptionFont->mFontID ); + string text = wordWrap(_(currentMenuItem->getDescription()), descWidth, descriptionFont->mFontID ); descriptionFont->SetColor(ARGB(255,255,255,255)); descriptionFont->DrawString(text.c_str(), descX, descY); @@ -315,19 +314,19 @@ void DeckMenu::Render() } } - if (!title.empty()) + if (!title.empty()) { mFont->SetColor(ARGB(255,255,255,255)); mFont->DrawString(title.c_str(), titleX, titleY, JGETEXT_CENTER); } mScroller->Render(); - RenderBackground(); + RenderBackground(); RenderDeckManaColors(); renderer->SetTexBlend(BLEND_SRC_ALPHA, BLEND_ONE); - stars->Render(); - renderer->SetTexBlend(BLEND_SRC_ALPHA, BLEND_ONE_MINUS_SRC_ALPHA); + stars->Render(); + renderer->SetTexBlend(BLEND_SRC_ALPHA, BLEND_ONE_MINUS_SRC_ALPHA); } @@ -404,13 +403,13 @@ void DeckMenu::updateScroller() for (vector::iterator it = taskList.tasks.begin(); it != taskList.tasks.end(); it++) { - ostringstream taskDescription; - taskDescription << "Credits: " << setw(4) << (*it)->getReward() << " / " - << "Days Left: " << (*it)->getExpiration() << endl + ostringstream taskDescription; + taskDescription << "Credits: " << setw(4) << (*it)->getReward() << " / " + << "Days Left: " << (*it)->getExpiration() << endl << (*it)->getDesc() << endl << endl; - mScroller->Add(taskDescription.str()); + mScroller->Add(taskDescription.str()); } - + } void DeckMenu::Close() diff --git a/projects/mtg/src/DeckMenuItem.cpp b/projects/mtg/src/DeckMenuItem.cpp index ee5151ddd..d44e4725d 100644 --- a/projects/mtg/src/DeckMenuItem.cpp +++ b/projects/mtg/src/DeckMenuItem.cpp @@ -16,33 +16,33 @@ float DeckMenuItem::mYOffset = 0; DeckMenuItem::DeckMenuItem(DeckMenu* _parent, int id, int fontId, string text, float x, float y, bool hasFocus, bool autoTranslate, DeckMetaData *deckMetaData) : JGuiObject(id), parent(_parent), fontId(fontId), mX(x), mY(y) { - WFont * mFont = WResourceManager::Instance()->GetWFont(fontId); + WFont * mFont = WResourceManager::Instance()->GetWFont(fontId); mMetaData = deckMetaData; - mText = trim(text); + mText = trim(text); mIsValidSelection = false; - if (autoTranslate) - mText = _(mText); + if (autoTranslate) + mText = _(mText); mHasFocus = hasFocus; - float newImageWidth = 0.0f; + float newImageWidth = 0.0f; if (mMetaData && !mMetaData->getGamesPlayed()) { JTexture * tex = WResourceManager::Instance()->RetrieveTexture("new.png"); if (tex) { JQuadPtr quad = WResourceManager::Instance()->RetrieveQuad("new.png", 2.0f, 2.0f, tex->mWidth - 4.0f, tex->mHeight - 4.0f); //avoids weird rectangle around the texture because of bilinear filtering - newImageWidth = quad->mWidth; - } - } + newImageWidth = quad->mWidth; + } + } - float titleStringWidth = mFont->GetStringWidth( mText.c_str() ); - mTitleResetWidth = (titleStringWidth - newImageWidth )/ 2; - mScrollEnabled = titleStringWidth > ( ITEM_PX_WIDTH - newImageWidth ); - mScrollerOffset = 0.0f; + float titleStringWidth = mFont->GetStringWidth( mText.c_str() ); + mTitleResetWidth = (titleStringWidth - newImageWidth )/ 2; + mScrollEnabled = titleStringWidth > ( ITEM_PX_WIDTH - newImageWidth ); + mScrollerOffset = 0.0f; - if (hasFocus) + if (hasFocus) { mIsValidSelection = true; Entering(); @@ -67,7 +67,7 @@ DeckMenuItem::DeckMenuItem(DeckMenu* _parent, int id, int fontId, string text, f break; } default: - mImageFilename = "noavatar.jpg"; + mImageFilename = "noavatar.jpg"; // do nothing. break; } @@ -75,15 +75,15 @@ DeckMenuItem::DeckMenuItem(DeckMenu* _parent, int id, int fontId, string text, f } - mDisplayInitialized = false; + mDisplayInitialized = false; } void DeckMenuItem::Update(float dt) { - mScrollerOffset += kHorizontalScrollSpeed * dt; - if ( (mScrollerOffset) > mTitleResetWidth ) - mScrollerOffset = -ITEM_PX_WIDTH; + mScrollerOffset += kHorizontalScrollSpeed * dt; + if ( (mScrollerOffset) > mTitleResetWidth ) + mScrollerOffset = -ITEM_PX_WIDTH; } @@ -92,12 +92,12 @@ void DeckMenuItem::RenderWithOffset(float yOffset) mYOffset = yOffset; WFont * mFont = WResourceManager::Instance()->GetWFont(fontId); - - if (!( mHasFocus && mScrollEnabled )) - mScrollerOffset = 0; - if (!mHasFocus && mScrollEnabled) - mScrollerOffset = -1 * ( getWidth() - ITEM_PX_WIDTH )/2; - float offSet = mScrollerOffset; + + if (!( mHasFocus && mScrollEnabled )) + mScrollerOffset = 0; + if (!mHasFocus && mScrollEnabled) + mScrollerOffset = -1 * ( getWidth() - ITEM_PX_WIDTH )/2; + float offSet = mScrollerOffset; if (mHasFocus) mFont->SetScale(SCALE_SELECTED); @@ -105,8 +105,8 @@ void DeckMenuItem::RenderWithOffset(float yOffset) mFont->SetScale(SCALE_NORMAL); mFont->DrawString(mText.c_str(), mX, mY + yOffset, JGETEXT_CENTER, offSet, ITEM_PX_WIDTH); - mDisplayInitialized = true; - //Render a "new" icon for decks that have never been played yet + mDisplayInitialized = true; + //Render a "new" icon for decks that have never been played yet if (mMetaData && !mMetaData->getGamesPlayed()) { JTexture * tex = WResourceManager::Instance()->RetrieveTexture("new.png"); @@ -128,7 +128,7 @@ void DeckMenuItem::Render() void DeckMenuItem::checkUserClick() { - int x1 = -1, y1 = -1; + int x1 = -1, y1 = -1; if (mEngine->GetLeftClickCoordinates(x1, y1)) { mIsValidSelection = false; @@ -136,8 +136,8 @@ void DeckMenuItem::checkUserClick() if ( (x1 >= x2) && (x1 <= (x2 + ITEM_PX_WIDTH)) && (y1 >= y2) && (y1 < (y2 + kItemYHeight))) mIsValidSelection = true; } - else - mIsValidSelection = true; + else + mIsValidSelection = true; } @@ -175,14 +175,14 @@ float DeckMenuItem::getWidth() const string DeckMenuItem::getDeckName() const { - if (mMetaData) - return mMetaData->getName(); + if (mMetaData) + return mMetaData->getName(); - std::string s; - std::stringstream out; - out << mMetaData->getDeckId(); - s = out.str(); - return "[deck" + s + "]"; + std::string s; + std::stringstream out; + out << mMetaData->getDeckId(); + s = out.str(); + return "[deck" + s + "]"; } ostream& DeckMenuItem::toString(ostream& out) const diff --git a/projects/mtg/src/DeckStats.cpp b/projects/mtg/src/DeckStats.cpp index 677760bb6..8ba637293 100644 --- a/projects/mtg/src/DeckStats.cpp +++ b/projects/mtg/src/DeckStats.cpp @@ -394,9 +394,9 @@ void StatsWrapper::updateStats(string filename, MTGAllCards *collection) void StatsWrapper::updateStats(DeckDataWrapper *myDeck) { - if (!this->needUpdate || !myDeck) return; + if (!this->needUpdate || !myDeck) return; - this->needUpdate = false; + this->needUpdate = false; this->cardCount = myDeck->getCount(WSrcDeck::UNFILTERED_COPIES); this->countLands = myDeck->getCount(Constants::MTG_COLOR_LAND); this->totalPrice = myDeck->totalPrice(); diff --git a/projects/mtg/src/DeckView.cpp b/projects/mtg/src/DeckView.cpp index 682b75957..394a9322c 100644 --- a/projects/mtg/src/DeckView.cpp +++ b/projects/mtg/src/DeckView.cpp @@ -133,13 +133,13 @@ void DeckView::renderCard(int index, int alpha, bool asThumbnail) else { Pos pos = Pos(cardPosition.x, cardPosition.y, cardPosition.scale * 285 / 250, 0.0, 255); - CardGui::DrawCard(cardPosition.card, pos, asThumbnail); + CardGui::DrawCard(cardPosition.card, pos, asThumbnail, true); } } else { Pos pos = Pos(cardPosition.x, cardPosition.y, cardPosition.scale * 285 / 250, 0.0, 255); - CardGui::DrawCard(cardPosition.card, pos, DrawMode::kText, asThumbnail); + CardGui::DrawCard(cardPosition.card, pos, DrawMode::kText, asThumbnail, true); } } else @@ -147,9 +147,10 @@ void DeckView::renderCard(int index, int alpha, bool asThumbnail) int mode = !options[Options::DISABLECARDS].number ? DrawMode::kNormal : DrawMode::kText; Pos pos = Pos(cardPosition.x, cardPosition.y, cardPosition.scale * 285 / 250, 0.0, 255); - CardGui::DrawCard(cardPosition.card, pos, mode, asThumbnail); + CardGui::DrawCard(cardPosition.card, pos, mode, asThumbnail, true); } - + //the three DrawCard function above, I intentionally disabled the rendered border when in Deck Editor since the border must be dynamically resized + //we can pass variables so the DrawCard method knows what to do to the border but... there must be a better way to do it... int quadAlpha = alpha; if (!deck()->count(cardPosition.card)) quadAlpha /= 2; quadAlpha = 255 - quadAlpha; diff --git a/projects/mtg/src/DuelLayers.cpp b/projects/mtg/src/DuelLayers.cpp index 2c1713849..b97112aa7 100644 --- a/projects/mtg/src/DuelLayers.cpp +++ b/projects/mtg/src/DuelLayers.cpp @@ -89,7 +89,7 @@ DuelLayers::DuelLayers(GameObserver* go, int playerViewIndex) : nbitems(0), mPlayerViewIndex(playerViewIndex) { observer = go; - observer->mLayers = this; + observer->mLayers = this; mCardSelector = NEW CardSelector(go, this); //1 Action Layer action = NEW ActionLayer(go); @@ -98,8 +98,8 @@ DuelLayers::DuelLayers(GameObserver* go, int playerViewIndex) : //Other display elements action->Add(NEW HUDDisplay(go, -1)); - Add(NEW GuiMana(20, 20, getRenderedPlayerOpponent())); - Add(NEW GuiMana(440, 20, getRenderedPlayer())); + Add(NEW GuiMana(20, 20, getRenderedPlayerOpponent())); + Add(NEW GuiMana(440, 20, getRenderedPlayer())); Add(stack = NEW ActionStack(go)); Add(combat = NEW GuiCombat(go)); Add(action); @@ -216,10 +216,10 @@ float DuelLayers::RightBoundary() Player* DuelLayers::getRenderedPlayer() { - return observer->players[mPlayerViewIndex]; + return observer->players[mPlayerViewIndex]; }; Player* DuelLayers::getRenderedPlayerOpponent() { - return observer->players[mPlayerViewIndex]->opponent(); + return observer->players[mPlayerViewIndex]->opponent(); }; diff --git a/projects/mtg/src/ExtraCost.cpp b/projects/mtg/src/ExtraCost.cpp index 37b398807..4437bd0f8 100644 --- a/projects/mtg/src/ExtraCost.cpp +++ b/projects/mtg/src/ExtraCost.cpp @@ -7,7 +7,21 @@ #include "Player.h" #include "Counters.h" #include "AllAbilities.h" + +#if !defined(QT_CONFIG) #include +typedef boost::scoped_ptr ManaCostPtr; +#else +#include +class ManaCostPtr : public QScopedPointer +{ +public: + ManaCostPtr(ManaCost*m) : QScopedPointer(m){ + }; + ManaCost* get() const {return data();}; + +}; +#endif SUPPORT_OBJECT_ANALYTICS(ExtraCost) @@ -209,7 +223,7 @@ LifeorManaCost::LifeorManaCost(TargetChooser *_tc, string manaType) string buildType ="{"; buildType.append(manaType); buildType.append("}"); - boost::scoped_ptr cost(ManaCost::parseManaCost(buildType)); + ManaCostPtr cost(ManaCost::parseManaCost(buildType)); manaCost.copy(cost.get()); } @@ -540,7 +554,12 @@ ExtraCost("UnTap") int UnTapCost::isPaymentSet() { - if (source && !source->isTapped()) +/*602.5a A creature's activated ability with the tap symbol ({T}) or the untap symbol ({Q}) + * in its activation cost can't be activated unless the creature has been under its + * controller's control since the start of his or her most recent turn. + * Ignore this rule for creatures with haste (see rule 702.10). As of 6/1/2014 Comprehensive Rules + */ + if (source && (!source->isTapped() || source->hasSummoningSickness())) { return 0; } @@ -757,6 +776,65 @@ int Ninja::doPay() } //endbouncetargetcostforninja + +//Sacrifice target as cost for Offering +Offering * Offering::clone() const +{ + Offering * ec = NEW Offering(*this); + if (tc) + ec->tc = tc->clone(); + return ec; +} + +Offering::Offering(TargetChooser *_tc) : +ExtraCost("Select creature to offer", _tc) +{ +} + +int Offering::canPay() +{ + if (target && (!source->controller()->getManaPool()->canAfford(source->getManaCost()->Diff(target->getManaCost())))) + { + tc->removeTarget(target); + target = NULL; + return 0; + } + if (target && (source->controller()->getManaPool()->canAfford(source->getManaCost()->Diff(target->getManaCost())))) + return 1; + return 0; +} + +int Offering::isPaymentSet() +{ + if (target && (!source->controller()->getManaPool()->canAfford(source->getManaCost()->Diff(target->getManaCost())))) + { + tc->removeTarget(target); + target = NULL; + return 0; + } + if (target && (source->controller()->getManaPool()->canAfford(source->getManaCost()->Diff(target->getManaCost())))) + return 1; + return 0; +} + +int Offering::doPay() +{ + if (target) + { + target->controller()->getManaPool()->pay(source->getManaCost()->Diff(target->getManaCost())); + MTGCardInstance * beforeCard = target; + source->storedCard = target->createSnapShot(); + target->controller()->game->putInGraveyard(target); + WEvent * e = NEW WEventCardSacrifice(beforeCard,target); + GameObserver * game = target->owner->getObserver(); + game->receiveEvent(e); + target = NULL; + if (tc) + tc->initTargets(); + return 1; + } + return 0; +} //------------------------------------------------------------ SacrificeCost * SacrificeCost::clone() const @@ -885,8 +963,8 @@ int CounterCost::doPay() if (counter->nb >= 0) { //Add counters as a cost for (int i = 0; i < counter->nb; i++) - { - target->counters->addCounter(counter->name.c_str(), counter->power, counter->toughness); + {//send no event because its a cost not an effect... for doubling season + target->counters->addCounter(counter->name.c_str(), counter->power, counter->toughness, true); } if (tc) tc->initTargets(); diff --git a/projects/mtg/src/GameApp.cpp b/projects/mtg/src/GameApp.cpp index 5648b778b..60fcfd31a 100644 --- a/projects/mtg/src/GameApp.cpp +++ b/projects/mtg/src/GameApp.cpp @@ -39,6 +39,7 @@ bool GameApp::HasMusic = true; JMusic * GameApp::music = NULL; string GameApp::currentMusicFile = ""; string GameApp::systemError = ""; +char GameApp::mynbcardsStr[512] = {0}; vector manaIcons; @@ -76,7 +77,7 @@ GameApp::GameApp() : mCurrentState = NULL; mNextState = NULL; - rules = 0; + rules = 0; music = NULL; } @@ -155,7 +156,7 @@ void GameApp::Create() //Setup Cache before calling any gfx/sfx functions - WResourceManager::Instance()->ResetCacheLimits(); + WResourceManager::Instance()->ResetCacheLimits(); LOG("Checking for music files"); @@ -173,6 +174,9 @@ void GameApp::Create() LOG("Loading Textures"); LOG("--Loading menuicons.png"); WResourceManager::Instance()->RetrieveTexture("menuicons.png", RETRIEVE_MANAGE); +#if !defined (PSP) + WResourceManager::Instance()->RetrieveTexture("miconslarge.png", RETRIEVE_MANAGE); +#endif LOG("---Gettings menuicons.png quads"); //Load all icons from gModRules and save in manaIcons -> todo. Change the icons positions on menuicons.png to avoid use item->mColorId diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index 80fb9a0f4..0b1705378 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -165,18 +165,18 @@ void GameObserver::nextGamePhase() { Phase * cPhaseOld = phaseRing->getCurrentPhase(); if (cPhaseOld->id == MTG_PHASE_COMBATDAMAGE) - if ((FIRST_STRIKE == combatStep) || (END_FIRST_STRIKE == combatStep) || (DAMAGE == combatStep)) - { - nextCombatStep(); - return; - } + if ((FIRST_STRIKE == combatStep) || (END_FIRST_STRIKE == combatStep) || (DAMAGE == combatStep)) + { + nextCombatStep(); + return; + } if (cPhaseOld->id == MTG_PHASE_COMBATBLOCKERS) - if (BLOCKERS == combatStep || TRIGGERS == combatStep) - { - nextCombatStep(); - return; - } + if (BLOCKERS == combatStep || TRIGGERS == combatStep) + { + nextCombatStep(); + return; + } phaseRing->forward(); @@ -191,12 +191,12 @@ void GameObserver::nextGamePhase() mCurrentGamePhase = cPhase->id; if (MTG_PHASE_COMBATDAMAGE == mCurrentGamePhase) - nextCombatStep(); + nextCombatStep(); if (MTG_PHASE_COMBATEND == mCurrentGamePhase) combatStep = BLOCKERS; //if (currentPlayer != cPhase->player) - // nextPlayer();//depreciated; we call this at EOT step now. unsure what the purpose of this was originally.fix for a bug? + // nextPlayer();//depreciated; we call this at EOT step now. unsure what the purpose of this was originally.fix for a bug? //init begin of turn if (mCurrentGamePhase == MTG_PHASE_BEFORE_BEGIN) @@ -204,6 +204,8 @@ void GameObserver::nextGamePhase() cleanupPhase(); currentPlayer->damageCount = 0; currentPlayer->drawCounter = 0; + currentPlayer->raidcount = 0; + currentPlayer->opponent()->raidcount = 0; currentPlayer->prowledTypes.clear(); currentPlayer->opponent()->damageCount = 0; //added to clear odcount currentPlayer->preventable = 0; @@ -223,8 +225,12 @@ void GameObserver::nextGamePhase() if (mCurrentGamePhase == MTG_PHASE_AFTER_EOT) { + int handmodified = 0; + handmodified = currentPlayer->handsize+currentPlayer->handmodifier; //Auto Hand cleaning, in case the player didn't do it himself - while (currentPlayer->game->hand->nb_cards > currentPlayer->handsize && currentPlayer->nomaxhandsize == false) + if(handmodified < 0) + handmodified = 0; + while (currentPlayer->game->hand->nb_cards > handmodified && currentPlayer->nomaxhandsize == false) { WEvent * e = NEW WEventCardDiscard(currentPlayer->game->hand->cards[0]); receiveEvent(e); @@ -306,16 +312,16 @@ void GameObserver::userRequestNextGamePhase(bool allowInterrupt, bool log) cardClick(getCurrentTargetChooser()->source, 0, false); } if (allowInterrupt && mLayers->stackLayer()->getNext(NULL, 0, NOT_RESOLVED)) - return; + return; if (getCurrentTargetChooser()) - return; + return; //if (mLayers->actionLayer()->isWaitingForAnswer()) - // return; + // return; // Wil 12/5/10: additional check, not quite understanding why TargetChooser doesn't seem active at this point. // If we deem that an extra cost payment needs to be made, don't allow the next game phase to proceed. // Here's what I find weird - if the extra cost is something like a sacrifice, doesn't that imply a TargetChooser? if (WaitForExtraPayment(NULL)) - return; + return; Phase * cPhaseOld = phaseRing->getCurrentPhase(); if (allowInterrupt && ((cPhaseOld->id == MTG_PHASE_COMBATBLOCKERS && combatStep == ORDER) @@ -323,7 +329,7 @@ void GameObserver::userRequestNextGamePhase(bool allowInterrupt, bool log) || (cPhaseOld->id == MTG_PHASE_COMBATDAMAGE) || opponent()->isAI() || options[Options::optionInterrupt(mCurrentGamePhase)].number - || currentPlayer->offerInterruptOnPhase - 1 == mCurrentGamePhase + || currentPlayer->offerInterruptOnPhase - 1 == mCurrentGamePhase )) { mLayers->stackLayer()->AddNextGamePhase(); @@ -516,12 +522,13 @@ bool GameObserver::operator==(const GameObserver& aGame) { error++; } - MTGGameZone * aZones[] = { p->game->graveyard, p->game->library, p->game->hand, p->game->inPlay }; + MTGGameZone * aZones[] = { p->game->graveyard, p->game->library, p->game->hand, p->game->inPlay, p->game->exile }; MTGGameZone * thisZones[] = { players[i]->game->graveyard, players[i]->game->library, players[i]->game->hand, - players[i]->game->inPlay }; - for (int j = 0; j < 4; j++) + players[i]->game->inPlay, + players[i]->game->exile }; + for (int j = 0; j < 5; j++) { MTGGameZone * zone = aZones[j]; if (zone->nb_cards != thisZones[j]->nb_cards) @@ -570,7 +577,7 @@ void GameObserver::Update(float dt) } currentActionPlayer = player; if (isInterrupting) - player = isInterrupting; + player = isInterrupting; if(mLayers) { mLayers->Update(dt, player); @@ -590,6 +597,25 @@ void GameObserver::gameStateBasedEffects() { if(getCurrentTargetChooser() && int(getCurrentTargetChooser()->getNbTargets()) == getCurrentTargetChooser()->maxtargets) getCurrentTargetChooser()->done = true; + ///////////////////////////////////// + for (int d = 0; d < 2; d++) + { + MTGGameZone * dzones[] = { players[d]->game->inPlay, players[d]->game->graveyard, players[d]->game->hand, players[d]->game->library, players[d]->game->exile }; + for (int k = 0; k < 5; k++) + { + MTGGameZone * zone = dzones[k]; + if (mLayers->stackLayer()->count(0, NOT_RESOLVED) == 0) + { + for (int c = zone->nb_cards - 1; c >= 0; c--) + { + zone->cards[c]->cardistargetted = 0; + zone->cards[c]->cardistargetter = 0; + } + } + }//check for losers if its GAMEOVER clear the stack to allow gamestateeffects to continue + players[d]->DeadLifeState(); + } + //////////////////////////////////// if (mLayers->stackLayer()->count(0, NOT_RESOLVED) != 0) return; @@ -608,6 +634,9 @@ void GameObserver::gameStateBasedEffects() for (int j = zone->nb_cards - 1; j >= 0; j--) { MTGCardInstance * card = zone->cards[j]; + card->LKIpower = card->power; + card->LKItoughness = card->toughness; + card->LKIbasicAbilities = card->basicAbilities; card->afterDamage(); card->mPropertiesChangedSinceLastUpdate = false; if(card->hasType(Subtypes::TYPE_PLANESWALKER) && (!card->counters||!card->counters->hasCounter("loyalty",0,0))) @@ -617,6 +646,25 @@ void GameObserver::gameStateBasedEffects() card->myPair->myPair = NULL; card->myPair = NULL; } + card->bypassTC = false; //turn off bypass + //////////////////////////////////////////////////// + //Unattach Equipments that dont have valid targets// + //////////////////////////////////////////////////// + if ((card->target) && card->hasType(Subtypes::TYPE_EQUIPMENT)) + { + if(card->target && isInPlay(card->target) && (card->target)->protectedAgainst(card))//protection from quality + { + for (size_t i = 1; i < mLayers->actionLayer()->mObjects.size(); i++) + { + MTGAbility * a = ((MTGAbility *) mLayers->actionLayer()->mObjects[i]); + AEquip * eq = dynamic_cast (a); + if (eq && eq->source == card) + { + ((AEquip*)a)->unequip(); + } + } + } + } /////////////////////////////////////////////////////// //Remove auras that don't have a valid target anymore// /////////////////////////////////////////////////////// @@ -624,6 +672,21 @@ void GameObserver::gameStateBasedEffects() { if(card->target && !isInPlay(card->target)) players[i]->game->putInGraveyard(card); + if(card->target && isInPlay(card->target)) + { + if(card->spellTargetType.find("creature") != string::npos && !card->target->hasType("creature")) + players[i]->game->putInGraveyard(card); + if(card->spellTargetType.find("artifact") != string::npos && !card->target->hasType("artifact")) + players[i]->game->putInGraveyard(card); + if(card->spellTargetType.find("enchantment") != string::npos && !card->target->hasType("enchantment")) + players[i]->game->putInGraveyard(card); + if(card->spellTargetType.find("land") != string::npos && !card->target->hasType("land")) + players[i]->game->putInGraveyard(card); + if(card->spellTargetType.find("planeswalker") != string::npos && !card->target->hasType("planeswalker")) + players[i]->game->putInGraveyard(card); + } + if(card->target && isInPlay(card->target) && (card->target)->protectedAgainst(card) && !card->has(Constants::AURAWARD))//protection from quality except aura cards like flickering ward + players[i]->game->putInGraveyard(card); } card->enchanted = false; if (card->target && isInPlay(card->target) && !card->hasType(Subtypes::TYPE_EQUIPMENT) && card->hasSubtype(Subtypes::TYPE_AURA)) @@ -727,34 +790,7 @@ void GameObserver::gameStateBasedEffects() /////////////////////////////////////////////////////////// //life checks/poison checks also checks cant win or lose.// /////////////////////////////////////////////////////////// - if (players[i]->life <= 0 || players[i]->poisonCount >= 10) - { - int cantlosers = 0; - MTGGameZone * z = players[i]->game->inPlay; - int nbcards = z->nb_cards; - for (int j = 0; j < nbcards; ++j) - { - MTGCardInstance * c = z->cards[j]; - if (c->has(Constants::CANTLOSE) || (c->has(Constants::CANTLIFELOSE) && players[i]->poisonCount < 10)) - { - cantlosers++; - } - } - MTGGameZone * k = players[i]->opponent()->game->inPlay; - int onbcards = k->nb_cards; - for (int m = 0; m < onbcards; ++m) - { - MTGCardInstance * e = k->cards[m]; - if (e->has(Constants::CANTWIN)) - { - cantlosers++; - } - } - if (cantlosers < 1) - { - setLoser(players[i]); - } - } + players[i]->DeadLifeState(true);//refactored } ////////////////////////////////////////////////////// //-------------card based states effects------------// @@ -817,6 +853,11 @@ void GameObserver::gameStateBasedEffects() } } + if(c->modifiedbAbi > 0) + { + c->modifiedbAbi = 0; + c->basicAbilities = c->origbasicAbilities; + } if(nbcards > z->nb_cards) { t = 0; @@ -841,6 +882,7 @@ void GameObserver::gameStateBasedEffects() enchantmentStatus(); ///////////////////////////// // Check affinity on a card// + // plus modify costs // ///////////////////////////// Affinity(); ///////////////////////////////////// @@ -917,46 +959,177 @@ void GameObserver::enchantmentStatus() void GameObserver::Affinity() { - for (int i = 0; i < 2; i++) + for (int dd = 0; dd < 2; dd++) { - MTGGameZone * zone = players[i]->game->hand; - for (int k = zone->nb_cards - 1; k >= 0; k--) + MTGGameZone * dzones[] = { players[dd]->game->graveyard, players[dd]->game->hand, players[dd]->game->library, players[dd]->game->exile }; + for (int kk = 0; kk < 4; kk++) { - MTGCardInstance * card = zone->cards[k]; - if (!card) - continue; + MTGGameZone * zone = dzones[kk]; + for (int cc = zone->nb_cards - 1; cc >= 0; cc--) + {//start + MTGCardInstance * card = zone->cards[cc]; + if (!card) + continue; - int color = 0; - string type = ""; - //only do any of the following if a card with the stated ability is in your hand. - ManaCost * original = NEW ManaCost(); - original->copy(card->model->data->getManaCost()); - //have to run alter cost before affinity or the 2 cancel each other out. - if(card->getIncreasedManaCost()->getConvertedCost()||card->getReducedManaCost()->getConvertedCost()) - { - if(card->getIncreasedManaCost()->getConvertedCost()) - original->add(card->getIncreasedManaCost()); - if(card->getReducedManaCost()->getConvertedCost()) - original->remove(card->getReducedManaCost()); - card->getManaCost()->copy(original); - if(card->getManaCost()->extraCosts) + int color = 0; + string type = ""; + //only do any of the following if a card with the stated ability is in your hand. + ManaCost * original = NEW ManaCost(); + ManaCost * alternate = NEW ManaCost(); + ManaCost * buyback = NEW ManaCost(); + ManaCost * flashback = NEW ManaCost(); + ManaCost * retrace = NEW ManaCost(); + original->copy(card->model->data->getManaCost()); + alternate->copy(card->model->data->getManaCost()->getAlternative()); + buyback->copy(card->model->data->getManaCost()->getBuyback()); + flashback->copy(card->model->data->getManaCost()->getFlashback()); + retrace->copy(card->model->data->getManaCost()->getRetrace()); + //have to run alter cost before affinity or the 2 cancel each other out. + if(card->getIncreasedManaCost()->getConvertedCost()||card->getReducedManaCost()->getConvertedCost()) { - for(unsigned int i = 0; i < card->getManaCost()->extraCosts->costs.size();i++) + if(card->getIncreasedManaCost()->getConvertedCost()) { - card->getManaCost()->extraCosts->costs[i]->setSource(card); + original->add(card->getIncreasedManaCost()); + for(int kc = Constants::MTG_COLOR_ARTIFACT; kc < Constants::NB_Colors;kc++) + { + if (card->getManaCost()->getAlternative()) + { + alternate->add(kc,card->getIncreasedManaCost()->getCost(kc)); + } + if (card->getManaCost()->getBuyback()) + { + buyback->add(kc,card->getIncreasedManaCost()->getCost(kc)); + } + if (card->getManaCost()->getFlashback()) + { + flashback->add(kc,card->getIncreasedManaCost()->getCost(kc)); + } + if (card->getManaCost()->getRetrace()) + { + retrace->add(kc,card->getIncreasedManaCost()->getCost(kc)); + } + } + } + if(card->getReducedManaCost()->getConvertedCost()) + { + original->remove(card->getReducedManaCost()); + for(int kc = Constants::MTG_COLOR_ARTIFACT; kc < Constants::NB_Colors;kc++) + { + if (card->getManaCost()->getAlternative()) + { + alternate->remove(kc,card->getReducedManaCost()->getCost(kc)); + } + if (card->getManaCost()->getBuyback()) + { + buyback->remove(kc,card->getIncreasedManaCost()->getCost(kc)); + } + if (card->getManaCost()->getFlashback()) + { + flashback->remove(kc,card->getIncreasedManaCost()->getCost(kc)); + } + if (card->getManaCost()->getRetrace()) + { + retrace->remove(kc,card->getIncreasedManaCost()->getCost(kc)); + } + } + } + if(card->getManaCost()) + card->getManaCost()->copy(original); + if(card->getManaCost()->getAlternative()) + card->getManaCost()->setAlternative(alternate); + if(card->getManaCost()->getBuyback()) + card->getManaCost()->setBuyback(buyback); + if(card->getManaCost()->getFlashback()) + card->getManaCost()->setFlashback(flashback); + if(card->getManaCost()->getRetrace()) + card->getManaCost()->setRetrace(retrace); + if(card->getManaCost()->extraCosts) + { + for(unsigned int i = 0; i < card->getManaCost()->extraCosts->costs.size();i++) + { + card->getManaCost()->extraCosts->costs[i]->setSource(card); + } } } - } - int reducem = 0; - bool resetCost = false; - for(unsigned int na = 0; na < card->cardsAbilities.size();na++) - { - ANewAffinity * newAff = dynamic_cast(card->cardsAbilities[na]); - if(newAff) + int reducem = 0; + bool resetCost = false; + for(unsigned int na = 0; na < card->cardsAbilities.size();na++) { - if(!resetCost) + ANewAffinity * newAff = dynamic_cast(card->cardsAbilities[na]); + if(newAff) { - resetCost = true; + if(!resetCost) + { + resetCost = true; + card->getManaCost()->copy(original); + if(card->getManaCost()->extraCosts) + { + for(unsigned int i = 0; i < card->getManaCost()->extraCosts->costs.size();i++) + { + card->getManaCost()->extraCosts->costs[i]->setSource(card); + } + } + } + TargetChooserFactory tf(this); + TargetChooser * tcn = tf.createTargetChooser(newAff->tcString,card,NULL); + + for (int w = 0; w < 2; ++w) + { + Player *p = this->players[w]; + MTGGameZone * zones[] = { p->game->inPlay, p->game->graveyard, p->game->hand, p->game->library, p->game->stack, p->game->exile }; + for (int k = 0; k < 6; k++) + { + MTGGameZone * z = zones[k]; + if (tcn->targetsZone(z)) + { + reducem += z->countByCanTarget(tcn); + } + } + } + SAFE_DELETE(tcn); + ManaCost * removingCost = ManaCost::parseManaCost(newAff->manaString); + for(int j = 0; j < reducem; j++) + card->getManaCost()->remove(removingCost); + SAFE_DELETE(removingCost); + } + } + if(card->has(Constants::AFFINITYARTIFACTS)|| + card->has(Constants::AFFINITYFOREST)|| + card->has(Constants::AFFINITYGREENCREATURES)|| + card->has(Constants::AFFINITYISLAND)|| + card->has(Constants::AFFINITYMOUNTAIN)|| + card->has(Constants::AFFINITYPLAINS)|| + card->has(Constants::AFFINITYSWAMP)) + { + if (card->has(Constants::AFFINITYARTIFACTS)) + { + type = "artifact"; + } + else if (card->has(Constants::AFFINITYSWAMP)) + { + type = "swamp"; + } + else if (card->has(Constants::AFFINITYMOUNTAIN)) + { + type = "mountain"; + } + else if (card->has(Constants::AFFINITYPLAINS)) + { + type = "plains"; + } + else if (card->has(Constants::AFFINITYISLAND)) + { + type = "island"; + } + else if (card->has(Constants::AFFINITYFOREST)) + { + type = "forest"; + } + else if (card->has(Constants::AFFINITYGREENCREATURES)) + { + color = 1; + type = "creature"; + } card->getManaCost()->copy(original); if(card->getManaCost()->extraCosts) { @@ -965,105 +1138,38 @@ void GameObserver::Affinity() card->getManaCost()->extraCosts->costs[i]->setSource(card); } } - } - TargetChooserFactory tf(this); - TargetChooser * tcn = tf.createTargetChooser(newAff->tcString,card,NULL); - - for (int w = 0; w < 2; ++w) - { - Player *p = this->players[w]; - MTGGameZone * zones[] = { p->game->inPlay, p->game->graveyard, p->game->hand, p->game->library, p->game->stack, p->game->exile }; - for (int k = 0; k < 6; k++) + int reduce = 0; + if(card->has(Constants::AFFINITYGREENCREATURES)) { - MTGGameZone * z = zones[k]; - if (tcn->targetsZone(z)) - { - reducem += z->countByCanTarget(tcn); - } + TargetChooserFactory tf(this); + TargetChooser * tc = tf.createTargetChooser("creature[green]",NULL); + reduce = card->controller()->game->battlefield->countByCanTarget(tc); + SAFE_DELETE(tc); + } + else + { + reduce = card->controller()->game->battlefield->countByType(type); + } + for(int i = 0; i < reduce;i++) + { + if(card->getManaCost()->getCost(color) > 0) + card->getManaCost()->remove(color,1); } } - SAFE_DELETE(tcn); - ManaCost * removingCost = ManaCost::parseManaCost(newAff->manaString); - for(int j = 0; j < reducem; j++) - card->getManaCost()->remove(removingCost); - SAFE_DELETE(removingCost); - } - } - if(card->has(Constants::AFFINITYARTIFACTS)|| - card->has(Constants::AFFINITYFOREST)|| - card->has(Constants::AFFINITYGREENCREATURES)|| - card->has(Constants::AFFINITYISLAND)|| - card->has(Constants::AFFINITYMOUNTAIN)|| - card->has(Constants::AFFINITYPLAINS)|| - card->has(Constants::AFFINITYSWAMP)){ - if (card->has(Constants::AFFINITYARTIFACTS)) - { - type = "artifact"; - } - else if (card->has(Constants::AFFINITYSWAMP)) - { - type = "swamp"; - } - else if (card->has(Constants::AFFINITYMOUNTAIN)) - { - type = "mountain"; - } - else if (card->has(Constants::AFFINITYPLAINS)) - { - type = "plains"; - } - else if (card->has(Constants::AFFINITYISLAND)) - { - type = "island"; - } - else if (card->has(Constants::AFFINITYFOREST)) - { - type = "forest"; - } - else if (card->has(Constants::AFFINITYGREENCREATURES)) - { - color = 1; - type = "creature"; - } - card->getManaCost()->copy(original); - if(card->getManaCost()->extraCosts) - { - for(unsigned int i = 0; i < card->getManaCost()->extraCosts->costs.size();i++) - { - card->getManaCost()->extraCosts->costs[i]->setSource(card); - } - } - int reduce = 0; - if(card->has(Constants::AFFINITYGREENCREATURES)) - { - TargetChooserFactory tf(this); - TargetChooser * tc = tf.createTargetChooser("creature[green]",NULL); - reduce = card->controller()->game->battlefield->countByCanTarget(tc); - SAFE_DELETE(tc); - } - else - { - reduce = card->controller()->game->battlefield->countByType(type); - } - for(int i = 0; i < reduce;i++) - { - if(card->getManaCost()->getCost(color) > 0) - card->getManaCost()->remove(color,1); - } - - } - SAFE_DELETE(original); + SAFE_DELETE(original); + }//end } } } + void GameObserver::Render() { if(mLayers) mLayers->Render(); if (targetChooser || (mLayers && mLayers->actionLayer()->isWaitingForAnswer())) - JRenderer::GetInstance()->DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, ARGB(255,255,0,0)); + JRenderer::GetInstance()->DrawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, ARGB(255,255,0,0)); if (mExtraPayment) - mExtraPayment->Render(); + mExtraPayment->Render(); for (size_t i = 0; i < players.size(); ++i) { @@ -1098,6 +1204,8 @@ void GameObserver::ButtonPressed(PlayGuiObject * target) } else if (GuiGraveyard* graveyard = dynamic_cast(target)) graveyard->toggleDisplay(); + else if (GuiExile* exile = dynamic_cast(target)) + exile->toggleDisplay(); //opponenthand else if (GuiOpponentHand* opponentHand = dynamic_cast(target)) if (opponentHand->showCards) @@ -1145,7 +1253,7 @@ void GameObserver::stackObjectClicked(Interruptible * action) { int reaction = mLayers->actionLayer()->isReactingToTargetClick(action); if (reaction == -1) - mLayers->actionLayer()->reactToTargetClick(action); + mLayers->actionLayer()->reactToTargetClick(action); } } @@ -1219,12 +1327,13 @@ int GameObserver::cardClick(MTGCardInstance * card, Targetable * object, bool lo { Player * clickedPlayer = NULL; int toReturn = 0; + int handmodified = 0; MTGGameZone* zone = NULL; size_t index = 0; MTGCardInstance* backup = NULL; if (!card) { - clickedPlayer = ((Player *) object); + clickedPlayer = ((Player *) object); } else { backup = card; zone = card->currentZone; @@ -1336,8 +1445,11 @@ int GameObserver::cardClick(MTGCardInstance * card, Targetable * object, bool lo } //Current player's hand + handmodified = currentPlayer->handsize+currentPlayer->handmodifier; + if(handmodified < 0) + handmodified = 0; if (currentPlayer->game->hand->hasCard(card) && mCurrentGamePhase == MTG_PHASE_CLEANUP - && currentPlayer->game->hand->nb_cards > currentPlayer->handsize && currentPlayer->nomaxhandsize == false) + && currentPlayer->game->hand->nb_cards > handmodified && currentPlayer->nomaxhandsize == false) { WEvent * e = NEW WEventCardDiscard(currentPlayer->game->hand->cards[0]); receiveEvent(e); @@ -1375,9 +1487,9 @@ int GameObserver::untap(MTGCardInstance * card) return 0; } if (card->has(Constants::DOESNOTUNTAP)) - return 0; + return 0; if (card->frozen > 0) - return 0; + return 0; card->attemptUntap(); return 1; } @@ -1399,7 +1511,7 @@ int GameObserver::isInPlay(MTGCardInstance * card) for (int i = 0; i < 2; i++) { if (players[i]->game->isInPlay(card)) - return 1; + return 1; } return 0; } @@ -1440,10 +1552,10 @@ void GameObserver::untapPhase() int GameObserver::receiveEvent(WEvent * e) { if (!e) - return 0; + return 0; eventsQueue.push(e); if (eventsQueue.size() > 1) - return -1; //resolving events can generate more events + return -1; //resolving events can generate more events int result = 0; while (eventsQueue.size()) { @@ -1462,7 +1574,7 @@ int GameObserver::receiveEvent(WEvent * e) Player * GameObserver::currentlyActing() { if (isInterrupting) - return isInterrupting; + return isInterrupting; return currentActionPlayer; } @@ -1555,7 +1667,7 @@ bool GameObserver::load(const string& ss, bool undo, int controlledPlayerIndex ) { bool currentPlayerSet = false; - int state = -1; + int state = -1; string s; stringstream stream(ss); @@ -1574,7 +1686,7 @@ bool GameObserver::load(const string& ss, bool undo, int controlledPlayerIndex if (s.find("seed ") == 0) { mSeed = atoi(s.substr(5).c_str()); - randomGenerator.setSeed(mSeed); + randomGenerator.setSeed(mSeed); continue; } if (s.find("rvalues:") == 0) @@ -1643,7 +1755,7 @@ bool GameObserver::load(const string& ss, bool undo, int controlledPlayerIndex case 3: if (s.compare("[end]") == 0) { - turn = 0; + turn = 0; mLayers = NEW DuelLayers(this, controlledPlayerIndex); currentPlayer = players[currentPlayerId]; phaseRing = NEW PhaseRing(this); @@ -1732,7 +1844,7 @@ bool GameObserver::processAction(const string& s) DebugTrace("no clue about: " + s); } - return true; + return true; } bool GameObserver::processActions(bool undo @@ -1773,7 +1885,7 @@ bool GameObserver::processActions(bool undo for(loadingite = loadingList.begin(); loadingite != loadingList.end(); loadingite++, cmdIndex++) { - processAction(*loadingite); + processAction(*loadingite); size_t nb = actionsList.size(); @@ -1839,6 +1951,13 @@ void GameObserver::Mulligan(Player* player) player->takeMulligan(); } +void GameObserver::serumMulligan(Player* player) +{ + if(!player) player = currentPlayer; + logAction(player, "mulligan serum powder"); + player->serumMulligan(); +} + Player* GameObserver::createPlayer(const string& playerMode #ifdef TESTSUITE , TestSuiteGame* testgame @@ -1846,7 +1965,7 @@ Player* GameObserver::createPlayer(const string& playerMode ) { Player::Mode aMode = (Player::Mode)atoi(playerMode.c_str()); - Player* pPlayer = 0; + Player* pPlayer = 0; switch(aMode) { @@ -1870,12 +1989,12 @@ Player* GameObserver::createPlayer(const string& playerMode break; } - if(pPlayer) - { - players.push_back(pPlayer); - } + if(pPlayer) + { + players.push_back(pPlayer); + } - return pPlayer; + return pPlayer; } #ifdef TESTSUITE @@ -1921,7 +2040,7 @@ void GameObserver::loadPlayer(int playerId, PlayerType playerType, int decknb, b loadPlayer(playerId, NEW HumanPlayer(this, deckFile, deckFileSmall, premadeDeck)); } - } + } else { //AI Player, chooses deck AIPlayerFactory playerCreator; @@ -1957,43 +2076,43 @@ void GameObserver::loadPlayer(int playerId, PlayerType playerType, int decknb, b #ifdef NETWORK_SUPPORT NetworkGameObserver::NetworkGameObserver(JNetwork* pNetwork, WResourceManager* output, JGE* input) - : GameObserver(output, input), mpNetworkSession(pNetwork), mSynchronized(false) + : GameObserver(output, input), mpNetworkSession(pNetwork), mSynchronized(false) { - mpNetworkSession->registerCommand("loadPlayer", this, loadPlayer, ignoreResponse); - mpNetworkSession->registerCommand("synchronize", this, synchronize, checkSynchro); - mpNetworkSession->registerCommand("sendAction", this, sendAction, checkSynchro); - mpNetworkSession->registerCommand("disconnect", this, disconnect, ignoreResponse); + mpNetworkSession->registerCommand("loadPlayer", this, loadPlayer, ignoreResponse); + mpNetworkSession->registerCommand("synchronize", this, synchronize, checkSynchro); + mpNetworkSession->registerCommand("sendAction", this, sendAction, checkSynchro); + mpNetworkSession->registerCommand("disconnect", this, disconnect, ignoreResponse); } NetworkGameObserver::~NetworkGameObserver() { - mpNetworkSession->sendCommand("disconnect", ""); + mpNetworkSession->sendCommand("disconnect", ""); } void NetworkGameObserver::disconnect(void*pxThis, stringstream&, stringstream&) { - NetworkGameObserver* pThis = (NetworkGameObserver*)pxThis; - pThis->setLoser(pThis->getView()->getRenderedPlayerOpponent()); + NetworkGameObserver* pThis = (NetworkGameObserver*)pxThis; + pThis->setLoser(pThis->getView()->getRenderedPlayerOpponent()); } void NetworkGameObserver::Update(float dt) { - mpNetworkSession->Update(); - ::GameObserver::Update(dt); + mpNetworkSession->Update(); + ::GameObserver::Update(dt); } void NetworkGameObserver::loadPlayer(int playerId, Player* player) { - GameObserver::loadPlayer(playerId, player); - stringstream out; - out << *player; - mpNetworkSession->sendCommand("loadPlayer", out.str()); + GameObserver::loadPlayer(playerId, player); + stringstream out; + out << *player; + mpNetworkSession->sendCommand("loadPlayer", out.str()); } void NetworkGameObserver::loadPlayer(void*pxThis, stringstream& in, stringstream&) { - NetworkGameObserver* pThis = (NetworkGameObserver*)pxThis; - Player* pPlayer = 0; + NetworkGameObserver* pThis = (NetworkGameObserver*)pxThis; + Player* pPlayer = 0; string s; while(std::getline(in, s)) @@ -2016,50 +2135,50 @@ void NetworkGameObserver::loadPlayer(void*pxThis, stringstream& in, stringstream void NetworkGameObserver::synchronize() { - if(!mSynchronized && mpNetworkSession->isServer()) - { - stringstream out; - out << *this; - mpNetworkSession->sendCommand("synchronize", out.str()); - mSynchronized = true; - } + if(!mSynchronized && mpNetworkSession->isServer()) + { + stringstream out; + out << *this; + mpNetworkSession->sendCommand("synchronize", out.str()); + mSynchronized = true; + } } void NetworkGameObserver::synchronize(void*pxThis, stringstream& in, stringstream& out) { - NetworkGameObserver* pThis = (NetworkGameObserver*)pxThis; - // now, we need to load the game from player 2's perspective - pThis->load(in.str(), false, 1); - out << *pThis; + NetworkGameObserver* pThis = (NetworkGameObserver*)pxThis; + // now, we need to load the game from player 2's perspective + pThis->load(in.str(), false, 1); + out << *pThis; } void NetworkGameObserver::checkSynchro(void*pxThis, stringstream& in, stringstream&) { - NetworkGameObserver* pThis = (NetworkGameObserver*)pxThis; - - GameObserver aGame; - aGame.mRules = pThis->mRules; - aGame.load(in.str()); + NetworkGameObserver* pThis = (NetworkGameObserver*)pxThis; + + GameObserver aGame; + aGame.mRules = pThis->mRules; + aGame.load(in.str()); - assert(aGame == *pThis); + assert(aGame == *pThis); } void NetworkGameObserver::sendAction(void*pxThis, stringstream& in, stringstream&) { - NetworkGameObserver* pThis = (NetworkGameObserver*)pxThis; + NetworkGameObserver* pThis = (NetworkGameObserver*)pxThis; pThis->mForwardAction = false; - pThis->processAction(in.str()); + pThis->processAction(in.str()); pThis->mForwardAction = true; - //out << *pThis; + //out << *pThis; } void NetworkGameObserver::logAction(const string& s) { - GameObserver::logAction(s); - if(mForwardAction) - mpNetworkSession->sendCommand("sendAction", s); + GameObserver::logAction(s); + if(mForwardAction) + mpNetworkSession->sendCommand("sendAction", s); } #endif diff --git a/projects/mtg/src/GameOptions.cpp b/projects/mtg/src/GameOptions.cpp index 548029827..c10bf2435 100644 --- a/projects/mtg/src/GameOptions.cpp +++ b/projects/mtg/src/GameOptions.cpp @@ -18,8 +18,8 @@ const string Options::optionNames[] = { "sfxVolume", "difficulty", "cheatmode", - "optimizedhand", - "cheatmodedecks", + "optimizedhand", + "cheatmodedecks", "displayOSD", "closed_hand", "hand_direction", @@ -352,11 +352,11 @@ int GameOptions::load() } // (PSY) Make sure that cheatmode is switched off for ineligible profiles: if (options[Options::ACTIVE_PROFILE].str != SECRET_PROFILE) - { + { (*this)[Options::CHEATMODE].number = 0; - (*this)[Options::OPTIMIZE_HAND].number = 0; - (*this)[Options::CHEATMODEAIDECK].number = 0; - } + (*this)[Options::OPTIMIZE_HAND].number = 0; + (*this)[Options::CHEATMODEAIDECK].number = 0; + } //Default values. Anywhere else to put those ? if (!(*this)[Options::MAX_GRADE].number) @@ -371,11 +371,11 @@ int GameOptions::save() { // (PSY) Make sure that cheatmode is switched off for ineligible profiles: if (options[Options::ACTIVE_PROFILE].str != SECRET_PROFILE) - { + { (*this)[Options::CHEATMODE].number = 0; - (*this)[Options::OPTIMIZE_HAND].number = 0; - (*this)[Options::CHEATMODEAIDECK].number = 0; - } + (*this)[Options::OPTIMIZE_HAND].number = 0; + (*this)[Options::CHEATMODEAIDECK].number = 0; + } std::ofstream file; if (JFileSystem::GetInstance()->openForWrite(file, mFilename)) @@ -997,9 +997,9 @@ OptionManaDisplay::OptionManaDisplay() { mDef.values.push_back(EnumDefinition::assoc(DYNAMIC, "Eye candy")); mDef.values.push_back(EnumDefinition::assoc(STATIC, "Simple")); - mDef.values.push_back(EnumDefinition::assoc(NOSTARSDYNAMIC, "No Glitter")); + mDef.values.push_back(EnumDefinition::assoc(NOSTARSDYNAMIC, "No Glitter")); mDef.values.push_back(EnumDefinition::assoc(BOTH, "Both"));//no luck in getting this to show up as an option. - //Both should still work as always however the enum and this dont want to pair up, no "both" in options now. + //Both should still work as always however the enum and this dont want to pair up, no "both" in options now. } ; OptionVolume OptionVolume::mDef; diff --git a/projects/mtg/src/GameState.cpp b/projects/mtg/src/GameState.cpp index 30c4eabd1..ff26683fc 100644 --- a/projects/mtg/src/GameState.cpp +++ b/projects/mtg/src/GameState.cpp @@ -70,7 +70,7 @@ vector GameState::BuildDeckList(const string& path, const string { std::ostringstream aiStatsDeckName; aiStatsDeckName << smallDeckPrefix << "_deck" << nbDecks; - meta->mStatsFilename = aiStatsDeckName.str(); + meta->mStatsFilename = aiStatsDeckName.str(); meta->mIsAI = true; if (meta->mPlayerDeck != statsPlayer->GetCurrentDeckStatsFile()) { @@ -100,7 +100,7 @@ vector GameState::BuildDeckList(const string& path, const string meta = NULL; } - std::sort(retList.begin(), retList.end(), sortByName); + std::sort(retList.begin(), retList.end(), sortByName); return retList; } diff --git a/projects/mtg/src/GameStateDuel.cpp b/projects/mtg/src/GameStateDuel.cpp index b93b31b53..98baeddf1 100644 --- a/projects/mtg/src/GameStateDuel.cpp +++ b/projects/mtg/src/GameStateDuel.cpp @@ -28,9 +28,6 @@ #include #endif -const float MENU_FONT_SCALE = 1.0f; - - enum ENUM_DUEL_STATE { DUEL_STATE_UNSET = 0, @@ -1098,7 +1095,7 @@ void GameStateDuel::Render() char buf[4096]; mFont->SetColor(ARGB(255,255,255,255)); - int elapsedTime = testSuite->getElapsedTime(); + int elapsedTime = testSuite->getElapsedTime(); sprintf(buf, "Time to run the tests: %is", elapsedTime/1000); mFont->DrawString(buf,0,SCREEN_HEIGHT/2 - 20); diff --git a/projects/mtg/src/GameStateMenu.cpp b/projects/mtg/src/GameStateMenu.cpp index b6df5f2f8..82dc9f005 100644 --- a/projects/mtg/src/GameStateMenu.cpp +++ b/projects/mtg/src/GameStateMenu.cpp @@ -85,10 +85,19 @@ void GameStateMenu::Create() { for (int j = 0; j < 2; j++) { +#if defined (PSP) sprintf(buf, "menuicons%d%d", i, j); mIcons[n] = WResourceManager::Instance()->RetrieveQuad("menuicons.png", 2 + i * 36.0f, 2.0f + j * 36.0f, 32.0f, 32.0f, buf); +#else + sprintf(buf, "miconslarge%d%d", i, j); + mIcons[n] = WResourceManager::Instance()->RetrieveQuad("miconslarge.png", 4 + i * 72.0f, 4.0f + j * 72.0f, 72.0f, 72.0f, buf); +#endif if (mIcons[n]) + { + mIcons[n]->mHeight = 36.f; + mIcons[n]->mWidth = 36.f; mIcons[n]->SetHotSpot(16, 16); + } n++; } } @@ -141,10 +150,10 @@ void GameStateMenu::Start() WResourceManager::Instance()->ClearUnlocked(); bgTexture = WResourceManager::Instance()->RetrieveTexture("menutitle.png", RETRIEVE_LOCK); - mBg = WResourceManager::Instance()->RetrieveQuad("menutitle.png", 0, 0, 256, 166); // Create background quad for rendering. + mBg = WResourceManager::Instance()->RetrieveQuad("menutitle.png", 0, 0, 0, 0); // Create background quad for rendering. if (mBg) - mBg->SetHotSpot(128, 50); + mBg->SetHotSpot(0, 0); if (MENU_STATE_MAJOR_MAINMENU == currentState) currentState = currentState | MENU_STATE_MINOR_FADEIN; @@ -160,22 +169,22 @@ void GameStateMenu::genNbCardsStr() PlayerData * playerdata = NEW PlayerData(MTGCollection()); size_t totalUnique = MTGCollection()->primitives.size(); size_t totalPrints = MTGCollection()->totalCards(); - + if (totalUnique != totalPrints) { if (playerdata && !options[Options::ACTIVE_PROFILE].isDefault()) - sprintf(nbcardsStr, _("%s: %i cards (%i) (%i unique)").c_str(), options[Options::ACTIVE_PROFILE].str.c_str(), + sprintf(GameApp::mynbcardsStr, _("%s: %i cards (%i) (%i unique)").c_str(), options[Options::ACTIVE_PROFILE].str.c_str(), playerdata->collection->totalCards(), totalPrints,totalUnique); else - sprintf(nbcardsStr, _("%i cards (%i unique)").c_str(),totalPrints,totalUnique); + sprintf(GameApp::mynbcardsStr, _("%i cards (%i unique)").c_str(),totalPrints,totalUnique); } else { if (playerdata && !options[Options::ACTIVE_PROFILE].isDefault()) - sprintf(nbcardsStr, _("%s: %i cards (%i)").c_str(), options[Options::ACTIVE_PROFILE].str.c_str(), + sprintf(GameApp::mynbcardsStr, _("%s: %i cards (%i)").c_str(), options[Options::ACTIVE_PROFILE].str.c_str(), playerdata->collection->totalCards(), totalPrints); else - sprintf(nbcardsStr, _("%i cards").c_str(),totalPrints); + sprintf(GameApp::mynbcardsStr, _("%i cards").c_str(),totalPrints); } SAFE_DELETE(playerdata); @@ -472,7 +481,7 @@ void GameStateMenu::Update(float dt) mParent->mpNetwork->connect(mParent->mServerAddress); // we let the server choose the game mode mParent->gameType = GAME_TYPE_SLAVE; - // just to select one, the HOST is in control here. + // just to select one, the HOST is in control here. mParent->rules = Rules::getRulesByFilename("classic.txt"); hasChosenGameType = true; subMenuController->Close(); @@ -590,16 +599,16 @@ void GameStateMenu::Update(float dt) case MENU_STATE_NETWORK_DEFINE: if(MENU_STATE_MINOR_NONE == (currentState & MENU_STATE_MINOR)) { - currentState = MENU_STATE_MAJOR_SUBMENU; + currentState = MENU_STATE_MAJOR_SUBMENU; subMenuController = NEW SimpleMenu(JGE::GetInstance(), WResourceManager::Instance(), MENU_FIRST_DUEL_SUBMENU, this, Fonts::MENU_FONT, 150, 60); - if (subMenuController) - { - subMenuController->Add(SUBMENUITEM_HOST_GAME, "Host a game"); - subMenuController->Add(SUBMENUITEM_JOIN_GAME, "Join a game"); - subMenuController->Add(SUBMENUITEM_CANCEL, "Cancel"); - } - } - break; + if (subMenuController) + { + subMenuController->Add(SUBMENUITEM_HOST_GAME, "Host a game"); + subMenuController->Add(SUBMENUITEM_JOIN_GAME, "Join a game"); + subMenuController->Add(SUBMENUITEM_CANCEL, "Cancel"); + } + } + break; case MENU_STATE_NETWORK_WAIT: if(MENU_STATE_MINOR_NONE == (currentState & MENU_STATE_MINOR)) { @@ -610,9 +619,9 @@ void GameStateMenu::Update(float dt) } else if(!subMenuController) { - string aString; - mParent->mpNetwork->getServerIp(aString); - aString = "Waiting for connection to " + aString; + string aString; + mParent->mpNetwork->getServerIp(aString); + aString = "Waiting for connection to " + aString; subMenuController = NEW SimpleMenu(JGE::GetInstance(), WResourceManager::Instance(), MENU_FIRST_DUEL_SUBMENU, this, Fonts::MENU_FONT, 150, 60, aString.c_str()); if (subMenuController) @@ -726,7 +735,7 @@ void GameStateMenu::RenderTopMenu() mFont->SetScale(DEFAULT_MAIN_FONT_SCALE); mFont->SetColor(ARGB(128,255,255,255)); mFont->DrawString(GAME_VERSION, rightTextPos, 5, JGETEXT_RIGHT); - mFont->DrawString(nbcardsStr, leftTextPos, 5); + mFont->DrawString(GameApp::mynbcardsStr, leftTextPos, 5); renderer->FillRect(leftTextPos, 26, 104, 8, ARGB(255, 100, 90, 60)); renderer->FillRect(leftTextPos + 2, 28, (float)(gamePercentComplete()), 4, ARGB(255,220,200, 125)); char buf[512]; @@ -790,7 +799,7 @@ void GameStateMenu::Render() scroller->Render(); if (mBg.get()) - renderer->RenderQuad(mBg.get(), SCREEN_WIDTH / 2, 50); + renderer->RenderQuad(mBg.get(), (SCREEN_WIDTH/4)-6, 2, 0, 256 / mBg->mWidth, 166 / mBg->mHeight); RenderTopMenu(); @@ -909,7 +918,7 @@ void GameStateMenu::ButtonPressed(int controllerId, int controlId) subMenuController->Close(); } #ifdef NETWORK_SUPPORT - SAFE_DELETE(mParent->mpNetwork); + SAFE_DELETE(mParent->mpNetwork); #endif //NETWORK_SUPPORT currentState = MENU_STATE_MAJOR_MAINMENU | MENU_STATE_MINOR_SUBMENU_CLOSING; break; @@ -960,7 +969,6 @@ ostream& GameStateMenu::toString(ostream& out) const << " ; mCreditsYPos : " << mCreditsYPos << " ; currentState : " << currentState << " ; mVolume : " << mVolume - << " ; nbcardsStr : " << nbcardsStr << " ; mCurrentSetName : " << mCurrentSetName << " ; mCurrentSetFileName : " << mCurrentSetFileName << " ; mReadConf : " << mReadConf diff --git a/projects/mtg/src/GameStateOptions.cpp b/projects/mtg/src/GameStateOptions.cpp index 16decd052..57d983833 100644 --- a/projects/mtg/src/GameStateOptions.cpp +++ b/projects/mtg/src/GameStateOptions.cpp @@ -1,6 +1,7 @@ #include "PrecompiledHeader.h" #include "GameStateOptions.h" +#include "GameStateMenu.h" #include "GameApp.h" #include "OptionItem.h" #include "SimpleMenu.h" @@ -80,8 +81,8 @@ void GameStateOptions::Start() optionsList->Add(NEW WGuiButton(NEW WGuiHeader("New Profile"), -102, GameStateOptionsConst::kNewProfileID, this)); optionsList->Add(NEW WDecoCheat(NEW OptionInteger(Options::CHEATMODE, "Enable Cheat Mode"))); - optionsList->Add(NEW WDecoCheat(NEW OptionInteger(Options::OPTIMIZE_HAND, "Optimize Starting Hand"))); - optionsList->Add(NEW WDecoCheat(NEW OptionInteger(Options::CHEATMODEAIDECK, "Unlock All Ai Decks"))); + optionsList->Add(NEW WDecoCheat(NEW OptionInteger(Options::OPTIMIZE_HAND, "Optimize Starting Hand"))); + optionsList->Add(NEW WDecoCheat(NEW OptionInteger(Options::CHEATMODEAIDECK, "Unlock All Ai Decks"))); optionsTabs->Add(optionsList); @@ -167,6 +168,7 @@ void GameStateOptions::Update(float dt) JSoundSystem::GetInstance()->SetMusicVolume(options[Options::MUSICVOLUME].number); mParent->DoTransition(TRANSITION_FADE, GAME_STATE_MENU); mState = SHOW_OPTIONS; + GameStateMenu::genNbCardsStr(); break; case WGuiBase::CONFIRM_NEED: optionsTabs->yieldFocus(); @@ -236,8 +238,8 @@ void GameStateOptions::Render() "Nakano, Niegen, Kaioshin, Psyringe, r1c47, Superhiro,", "Szei, Thanatos02, Whismer, Wololo", "", - "Thanks also go to Dr.Watson, Orine, Raphael, Sakya, Tyranid", - "for their help.", + "Thanks also go to Dr.Watson, KF1, Orine, Raphael, Sakya,", + "Tacoghandi, Tyranid for their help.", "", "Thanks to everyone who contributes code/content on the forums!", "", diff --git a/projects/mtg/src/GameStateShop.cpp b/projects/mtg/src/GameStateShop.cpp index 84ca3f6e4..47f300379 100644 --- a/projects/mtg/src/GameStateShop.cpp +++ b/projects/mtg/src/GameStateShop.cpp @@ -5,6 +5,7 @@ #include #include "GameStateShop.h" +#include "GameStateMenu.h" #include "GameApp.h" #include "MTGDeck.h" #include "MTGPack.h" @@ -626,12 +627,12 @@ void GameStateShop::Update(float dt) else if (btn == JGE_BTN_CANCEL) options[Options::DISABLECARDS].number = !options[Options::DISABLECARDS].number; else if (btn == JGE_BTN_SEC) - { + { bListCards = !bListCards; disablePurchase = false; clearInput = true; return; - } + } else if (shopMenu) { #if defined (IOS) || defined (ANDROID) @@ -769,7 +770,7 @@ void GameStateShop::Render() #ifndef TOUCH_ENABLED float len = 4 + mFont->GetStringWidth(kOtherCardsString.c_str()); - r->RenderQuad(pspIcons[6].get(), SCREEN_WIDTH - len - 0.5 - 10, SCREEN_HEIGHT - 8, 0, kPspIconScaleFactor, kPspIconScaleFactor); + r->RenderQuad(pspIcons[6].get(), SCREEN_WIDTH - len - 0.5 - 10, SCREEN_HEIGHT - 8, 0, kPspIconScaleFactor, kPspIconScaleFactor); mFont->DrawString(kOtherCardsString, SCREEN_WIDTH - len, SCREEN_HEIGHT - 14); #else enableButtons(); @@ -840,6 +841,7 @@ void GameStateShop::ButtonPressed(int controllerId, int controlId) mStage = STAGE_SHOP_SHOP; mParent->DoTransition(TRANSITION_FADE, GAME_STATE_MENU); save(); + GameStateMenu::genNbCardsStr(); break; case 14: mStage = STAGE_SHOP_TASKS; diff --git a/projects/mtg/src/GuiAvatars.cpp b/projects/mtg/src/GuiAvatars.cpp index e364bae3c..b12d2a8fd 100644 --- a/projects/mtg/src/GuiAvatars.cpp +++ b/projects/mtg/src/GuiAvatars.cpp @@ -10,30 +10,38 @@ GuiAvatars::GuiAvatars(DuelLayers* duelLayers) : GuiLayer(duelLayers), active(NULL) { - Add(self = NEW GuiAvatar(SCREEN_WIDTH, SCREEN_HEIGHT, false, mpDuelLayers->getRenderedPlayer(), GuiAvatar::BOTTOM_RIGHT, this)); + Add(self = NEW GuiAvatar(SCREEN_WIDTH, SCREEN_HEIGHT, false, mpDuelLayers->getRenderedPlayer(), GuiAvatar::BOTTOM_RIGHT, this)); self->zoom = 0.9f; Add(selfGraveyard = NEW GuiGraveyard(SCREEN_WIDTH - GuiAvatar::Width - GuiGameZone::Width / 2 - 11, SCREEN_HEIGHT - GuiAvatar::Height - 1, false, mpDuelLayers->getRenderedPlayer(), this)); Add(selfLibrary = NEW GuiLibrary(SCREEN_WIDTH - GuiAvatar::Width - GuiGameZone::Width / 2 - 11, SCREEN_HEIGHT - GuiAvatar::Height - 5 + GuiGameZone::Height + 5, false, mpDuelLayers->getRenderedPlayer(), this)); + //myexile + Add(selfExile = NEW GuiExile(SCREEN_WIDTH - GuiAvatar::Width - GuiGameZone::Width / 2 - 11, SCREEN_HEIGHT - GuiAvatar::Height - 30, false, mpDuelLayers->getRenderedPlayer(), this)); Add(opponent = NEW GuiAvatar(0, 0, false, mpDuelLayers->getRenderedPlayerOpponent(), GuiAvatar::TOP_LEFT, this)); opponent->zoom = 0.9f; - //opponenthandveiw button - Add(opponentHand = NEW GuiOpponentHand(-30 + GuiAvatar::Width * 1.2 - GuiGameZone::Width / 2, 35 + GuiGameZone::Height - 10, + //opponentExile + Add(opponentExile = NEW GuiExile(-30 + GuiAvatar::Width * 1.2 - GuiGameZone::Width / 2, 35 + GuiGameZone::Height - 10, false, mpDuelLayers->getRenderedPlayerOpponent(), this)); - //opponenthandveiwends + //opponentGraveyard Add(opponentGraveyard = NEW GuiGraveyard(5 + GuiAvatar::Width * 1.4 - 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, + mpDuelLayers->getRenderedPlayerOpponent(), this)); + //opponentLibrary Add(opponentLibrary = NEW GuiLibrary(5 + GuiAvatar::Width * 1.4 - GuiGameZone::Width / 2, 5 + GuiGameZone::Height + 5, false, mpDuelLayers->getRenderedPlayerOpponent(), this)); observer->getCardSelector()->Add(self); observer->getCardSelector()->Add(selfGraveyard); + observer->getCardSelector()->Add(selfExile); observer->getCardSelector()->Add(selfLibrary); observer->getCardSelector()->Add(opponent); observer->getCardSelector()->Add(opponentGraveyard); + observer->getCardSelector()->Add(opponentExile); observer->getCardSelector()->Add(opponentLibrary); observer->getCardSelector()->Add(opponentHand); - selfGraveyard->alpha = selfLibrary->alpha = opponentGraveyard->alpha = opponentLibrary->alpha = opponentHand->alpha = 0; + selfGraveyard->alpha = selfExile->alpha = opponentExile->alpha = selfLibrary->alpha = opponentGraveyard->alpha = opponentLibrary->alpha = opponentHand->alpha = 0; } float GuiAvatars::LeftBoundarySelf() @@ -50,15 +58,15 @@ void GuiAvatars::Activate(PlayGuiObject* c) c->zoom = 1.2f; c->mHasFocus = true; - if ((opponentGraveyard == c) || (opponentLibrary == c) || (opponent == c) || (opponentHand == c)) + if ((opponentGraveyard == c) || (opponentExile == c) || (opponentLibrary == c) || (opponent == c) || (opponentHand == c)) { - opponentGraveyard->alpha = opponentLibrary->alpha = opponentHand->alpha = 128.0f; + opponentGraveyard->alpha = opponentExile->alpha = opponentLibrary->alpha = opponentHand->alpha = 128.0f; active = opponent; opponent->zoom = 1.2f; } - else if ((selfGraveyard == c) || (selfLibrary == c) || (self == c)) + else if ((selfGraveyard == c) || (selfExile == c) || (selfLibrary == c) || (self == c)) { - selfGraveyard->alpha = selfLibrary->alpha = 128.0f; + selfGraveyard->alpha = selfExile->alpha = selfLibrary->alpha = 128.0f; self->zoom = 1.0f; active = self; } @@ -69,15 +77,15 @@ void GuiAvatars::Deactivate(PlayGuiObject* c) { c->zoom = 1.0; c->mHasFocus = false; - if ((opponentGraveyard == c) || (opponentLibrary == c) || (opponentHand == c) || (opponent == c)) + if ((opponentGraveyard == c) || (opponentExile == c) || (opponentLibrary == c) || (opponentHand == c) || (opponent == c)) { - opponentGraveyard->alpha = opponentLibrary->alpha = opponentHand->alpha = 0; + opponentGraveyard->alpha = opponentExile->alpha = opponentLibrary->alpha = opponentHand->alpha = 0; opponent->zoom = 0.9f; active = NULL; } - else if ((selfGraveyard == c) || (selfLibrary == c) || (self == c)) + else if ((selfGraveyard == c) || (selfExile == c) || (selfLibrary == c) || (self == c)) { - selfGraveyard->alpha = selfLibrary->alpha = 0; + selfGraveyard->alpha = selfExile->alpha = selfLibrary->alpha = 0; self->zoom = 0.5f; active = NULL; } @@ -85,13 +93,15 @@ void GuiAvatars::Deactivate(PlayGuiObject* c) int GuiAvatars::receiveEventPlus(WEvent* e) { - return selfGraveyard->receiveEventPlus(e) | opponentGraveyard->receiveEventPlus(e) | opponentHand->receiveEventPlus(e); + return selfGraveyard->receiveEventPlus(e) | selfExile->receiveEventPlus(e) | opponentExile->receiveEventPlus(e) | opponentGraveyard->receiveEventPlus(e) | opponentHand->receiveEventPlus(e); } int GuiAvatars::receiveEventMinus(WEvent* e) { selfGraveyard->receiveEventMinus(e); + selfExile->receiveEventMinus(e); opponentGraveyard->receiveEventMinus(e); + opponentExile->receiveEventMinus(e); opponentHand->receiveEventMinus(e); return 1; } @@ -104,8 +114,12 @@ bool GuiAvatars::CheckUserInput(JButton key) return true; if (selfGraveyard->CheckUserInput(key)) return true; + if (selfExile->CheckUserInput(key)) + return true; if (opponentGraveyard->CheckUserInput(key)) return true; + if (opponentExile->CheckUserInput(key)) + return true; if (opponentHand->CheckUserInput(key)) return true; if (selfLibrary->CheckUserInput(key)) @@ -120,8 +134,10 @@ void GuiAvatars::Update(float dt) self->Update(dt); opponent->Update(dt); selfGraveyard->Update(dt); + selfExile->Update(dt); opponentHand->Update(dt); opponentGraveyard->Update(dt); + opponentExile->Update(dt); selfLibrary->Update(dt); opponentLibrary->Update(dt); } @@ -133,10 +149,12 @@ void GuiAvatars::Render() float h = 54; 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)); } else if (self == active) { + r->FillRect(self->actX - w * self->actZ - 4.5f, self->actY - h-28 * self->actZ, 24 * self->actZ, h+28 * self->actZ, ARGB(200,0,0,0)); r->FillRect(self->actX - w * self->actZ - 4.5f, self->actY - h * self->actZ, w * self->actZ, h * self->actZ, ARGB(200,0,0,0)); } GuiLayer::Render(); diff --git a/projects/mtg/src/GuiBackground.cpp b/projects/mtg/src/GuiBackground.cpp index dfcbfe232..fba1877d6 100644 --- a/projects/mtg/src/GuiBackground.cpp +++ b/projects/mtg/src/GuiBackground.cpp @@ -30,6 +30,8 @@ void GuiBackground::Render() } if (quad.get()) { - renderer->RenderQuad(quad.get(), 0, 18); + quad->mWidth = 480.f; + quad->mHeight = 272.f; + renderer->RenderQuad(quad.get(), 0, 0); } } diff --git a/projects/mtg/src/GuiCombat.cpp b/projects/mtg/src/GuiCombat.cpp index 129352d59..ad9a05a98 100644 --- a/projects/mtg/src/GuiCombat.cpp +++ b/projects/mtg/src/GuiCombat.cpp @@ -483,6 +483,8 @@ void GuiCombat::Render() } else { + observer->opponent()->getIcon()->mHeight = 50.f; + observer->opponent()->getIcon()->mWidth = 35.f; observer->opponent()->getIcon()->SetHotSpot(18, 25); enemy_avatar.Render(observer->opponent()->getIcon().get()); } @@ -502,7 +504,7 @@ void GuiCombat::Render() ok_quad->SetHotSpot(28, 22); ok.Render(ok_quad.get()); } - renderer->DrawLine(0, SCREEN_HEIGHT / 2 + 10, SCREEN_WIDTH, SCREEN_HEIGHT / 2 + 10, ARGB(255, 255, 64, 0)); + renderer->DrawLine(0, SCREEN_HEIGHT / 2, SCREEN_WIDTH, SCREEN_HEIGHT / 2, ARGB(255, 255, 64, 0)); if (FIRST_STRIKE == step) { WFont * mFont = WResourceManager::Instance()->GetWFont(Fonts::MAIN_FONT); diff --git a/projects/mtg/src/GuiFrame.cpp b/projects/mtg/src/GuiFrame.cpp index e4f764fe9..89f49b64f 100644 --- a/projects/mtg/src/GuiFrame.cpp +++ b/projects/mtg/src/GuiFrame.cpp @@ -6,16 +6,20 @@ GuiFrame::GuiFrame(GameObserver* observer) : GuiLayer(observer) { - if (observer->getResourceManager()) - { - if (observer->getResourceManager()->GetTexture("wood.png")) - wood = observer->getResourceManager()->RetrieveQuad("wood.png", 0, 0, SCREEN_WIDTH, 28); + //if (observer->getResourceManager()) + //{ + /*if (observer->getResourceManager()->GetTexture("wood.png")) + { + wood = observer->getResourceManager()->RetrieveQuad("wood.png", 0, 0, 0, 0); + wood->mHeight = 32.f; + wood->mWidth = 480.f; + } else { GameApp::systemError += "Can't load wood texture : " __FILE__ "\n"; - } + }*/ - if (observer->getResourceManager()->GetTexture("gold.png")) + /*if (observer->getResourceManager()->GetTexture("gold.png")) { gold1 = observer->getResourceManager()->RetrieveQuad("gold.png", 0, 0, SCREEN_WIDTH, 6, "gold1"); gold2 = observer->getResourceManager()->RetrieveQuad("gold.png", 0, 6, SCREEN_WIDTH, 6, "gold2"); @@ -26,9 +30,9 @@ GuiFrame::GuiFrame(GameObserver* observer) gold2->SetColor(ARGB(127, 255, 255, 255)); gold2->SetHFlip(true); } - } - } - step = 0.0; + }*/ + //} + //step = 0.0; } @@ -38,12 +42,12 @@ GuiFrame::~GuiFrame() void GuiFrame::Render() { - JRenderer* renderer = JRenderer::GetInstance(); + /*JRenderer* renderer = JRenderer::GetInstance(); float sized = step / 4; if (sized > SCREEN_WIDTH) sized -= SCREEN_WIDTH; - renderer->RenderQuad(wood.get(), 0, 0); - if (gold1.get()) + renderer->RenderQuad(wood.get(), 0, 0);*/ + /*if (gold1.get()) { renderer->RenderQuad(gold1.get(), -sized, 16); renderer->RenderQuad(gold1.get(), -sized + 479, 16); @@ -60,12 +64,12 @@ void GuiFrame::Render() renderer->RenderQuad(gold2.get(), step / 2, 16); renderer->RenderQuad(gold2.get(), step / 2 - 479, 16); } - } + }*/ } void GuiFrame::Update(float dt) { - step += dt * 5; + /*step += dt * 5; if (step > 2 * SCREEN_WIDTH) - step -= 2 * SCREEN_WIDTH; + step -= 2 * SCREEN_WIDTH;*/ } diff --git a/projects/mtg/src/GuiHand.cpp b/projects/mtg/src/GuiHand.cpp index ef318c8c9..950585dd9 100644 --- a/projects/mtg/src/GuiHand.cpp +++ b/projects/mtg/src/GuiHand.cpp @@ -330,4 +330,4 @@ int GuiHandOpponent::receiveEventMinus(WEvent* e) // I wanna write it like that. GCC doesn't want me to without -O. // I'm submitting a bug report. -// it->x = (it->x + (flip ? RightRowX : LeftRowX)) / 2; +// it->x = (it->x + (flip ? RightRowX : LeftRowX)) / 2; diff --git a/projects/mtg/src/GuiMana.cpp b/projects/mtg/src/GuiMana.cpp index c4ca3d257..14c73d720 100644 --- a/projects/mtg/src/GuiMana.cpp +++ b/projects/mtg/src/GuiMana.cpp @@ -106,14 +106,14 @@ ManaIcon::ManaIcon(int color, float x, float y, float destx, float desty) : // if we want to throttle the amount of particles for mana, // here's where to do it - this is hardcoded to something like 114 in the psi file - if(OptionManaDisplay::NOSTARSDYNAMIC == options[Options::MANADISPLAY].number) - { + if(OptionManaDisplay::NOSTARSDYNAMIC == options[Options::MANADISPLAY].number) + { particleSys->info.nEmission = 0; - } - else - { + } + else + { particleSys->info.nEmission = 60; - } + } icon = manaIcons[color]; particleSys->FireAt(x, y); @@ -193,7 +193,7 @@ void ManaIcon::Update(float dt, float shift) if (particleSys && (fabs(destx - x) < 5) && (fabs(desty + shift - y) < 5)) { - if (OptionManaDisplay::STATIC == options[Options::MANADISPLAY].number) + if (OptionManaDisplay::STATIC == options[Options::MANADISPLAY].number) { SAFE_DELETE(particleSys); //Static Mana Only: avoid expensive particle processing } @@ -262,7 +262,7 @@ void GuiMana::RenderStatic() float x0 = x - 20 * totalColors; x0 = max(40.f, x0); float xEnd = x0 + 20 * totalColors; - r->FillRoundRect(x0, y - 5, static_cast (20 * totalColors + 5), 20, 2, ARGB(128,0,0,0)); + r->FillRoundRect(x0, y - 8, static_cast (20 * totalColors + 5), 20, 2, ARGB(128,0,0,0)); int offset = 0; for (int i = 0; i < Constants::NB_Colors; ++i) @@ -270,10 +270,10 @@ void GuiMana::RenderStatic() if (values[i]) { offset -= 20; - r->RenderQuad(manaIcons[i].get(), xEnd + 15 + offset, y + 5, 0, 0.7f, 0.7f); + r->RenderQuad(manaIcons[i].get(), xEnd + 15 + offset, y + 3, 0, 0.65f, 0.65f); } } - r->FillRoundRect(x0, y, static_cast (20 * totalColors + 5), 8, 2, ARGB(100,0,0,0)); + //r->DrawRoundRect(x0, y - 8, static_cast (20 * totalColors + 5), 20, 2, ARGB(128,255,255,255)); offset = 0; for (int i = 0; i < Constants::NB_Colors; ++i) { @@ -283,7 +283,7 @@ void GuiMana::RenderStatic() char buf[4]; sprintf(buf, "%i", values[i]); mFont->SetColor(ARGB(255,255,255,255)); - mFont->DrawString(buf, xEnd + offset + 9, y); + mFont->DrawString(buf, xEnd + offset + 18, y + 5); } } } @@ -305,7 +305,7 @@ void GuiMana::Render() for (vector::iterator it = manas.begin(); it != manas.end(); ++it) (*it)->Render(); - if (OptionManaDisplay::DYNAMIC != options[Options::MANADISPLAY].number && OptionManaDisplay::NOSTARSDYNAMIC != options[Options::MANADISPLAY].number ) + if (OptionManaDisplay::DYNAMIC != options[Options::MANADISPLAY].number && OptionManaDisplay::NOSTARSDYNAMIC != options[Options::MANADISPLAY].number ) RenderStatic(); } diff --git a/projects/mtg/src/GuiPhaseBar.cpp b/projects/mtg/src/GuiPhaseBar.cpp index f782c6518..7d774f44a 100644 --- a/projects/mtg/src/GuiPhaseBar.cpp +++ b/projects/mtg/src/GuiPhaseBar.cpp @@ -24,7 +24,7 @@ }; */ -const float GuiPhaseBar::zoom_big = (float)(1.5 * 1.4); +const float GuiPhaseBar::zoom_big = (float)(1.5 * 1.25); const float GuiPhaseBar::zoom_small = 1.5; const float GuiPhaseBar::step = M_PI/6.0f; @@ -36,9 +36,9 @@ namespace const unsigned kPhases = NB_MTG_PHASES - 2; //there are two phases we do not show } -void GuiPhaseBar::DrawGlyph(JQuad *inQuad, int phaseId, float x, float y, float scale) +void GuiPhaseBar::DrawGlyph(JQuad *inQuad, int phaseId, float x, float y, float scale, float z) { - inQuad->SetTextureRect(phaseId * (kWidth + 1), 0, kWidth, kHeight); + inQuad->SetTextureRect(phaseId * (kWidth + 1), z, kWidth, kHeight); JRenderer::GetInstance()->RenderQuad(inQuad, x, y - scale * kWidth/2, 0.0f, scale, scale); } @@ -110,7 +110,10 @@ void GuiPhaseBar::Render() //hint: sin(circPos + PI/2) = cos(circPos) const float glyphScale = float(zoomFactor * cosf(circPos) * 0.5f); - DrawGlyph(quad.get(), (displayedPhaseId - 2 + i + kPhases) % kPhases, 0, glyphY, glyphScale); + if (observer->currentPlayer && observer->currentPlayer->isAI() && !observer->currentPlayer->opponent()->isAI()) + DrawGlyph(quad.get(), (displayedPhaseId - 2 + i + kPhases) % kPhases, 0, glyphY, glyphScale, 29); + else + DrawGlyph(quad.get(), (displayedPhaseId - 2 + i + kPhases) % kPhases, 0, glyphY, glyphScale, 0); } //print phase name diff --git a/projects/mtg/src/GuiPlay.cpp b/projects/mtg/src/GuiPlay.cpp index 0ab99501d..02bbe0939 100644 --- a/projects/mtg/src/GuiPlay.cpp +++ b/projects/mtg/src/GuiPlay.cpp @@ -106,7 +106,7 @@ GuiPlay::BattleField::BattleField() : attackers(0), height(0.0), red(0), colorFlow(0) { } -const float GuiPlay::BattleField::HEIGHT = 80.0f; +const float GuiPlay::BattleField::HEIGHT = 146.0f; void GuiPlay::BattleField::addAttacker(MTGCardInstance*) { ++attackers; @@ -124,7 +124,7 @@ void GuiPlay::BattleField::reset(float x, float y) void GuiPlay::BattleField::EnstackAttacker(CardView* card) { card->x = CARD_WIDTH + 20 + (currentAttacker * (HORZWIDTH) / (attackers+1)); - card->y = baseY + (card->card->getObserver()->getView()->getRenderedPlayer() == card->card->controller() ? 20 + y : -20 - y); + card->y = baseY + (card->card->getObserver()->getView()->getRenderedPlayer() == card->card->controller() ? 20 + y : -20 - y); ++currentAttacker; // JRenderer::GetInstance()->RenderQuad(WResourceManager::Instance()->GetQuad("BattleIcon"), card->actX, card->actY, 0, 0.5 + 0.1 * sinf(JGE::GetInstance()->GetTime()), 0.5 + 0.1 * sinf(JGE::GetInstance()->GetTime())); } @@ -160,7 +160,11 @@ void GuiPlay::BattleField::Update(float dt) void GuiPlay::BattleField::Render() { if (height > 3) - JRenderer::GetInstance()->FillRect(44, SCREEN_HEIGHT / 2 + 10 - height / 2, 318, height, ARGB(127, red, 0, 0)); + { + JRenderer::GetInstance()->FillRect(0, SCREEN_HEIGHT / 2 + 8.5f - height / 2, 480, height, ARGB(127, red, 0, 0)); + if(red > 1) + JRenderer::GetInstance()->DrawRect(-2, SCREEN_HEIGHT / 2 + 8.5f - height / 2, 484, height, ARGB(255, 255, 165, 0)); + } } GuiPlay::GuiPlay(DuelLayers* view) : @@ -193,7 +197,7 @@ void GuiPlay::Replace() { if((!(*it)->card->hasSubtype(Subtypes::TYPE_AURA)|| ((*it)->card->hasSubtype(Subtypes::TYPE_AURA) && (*it)->card->playerTarget)) && !(*it)->card->hasType(Subtypes::TYPE_PLANESWALKER)) { - if (mpDuelLayers->getRenderedPlayer() == (*it)->card->controller()) + if (mpDuelLayers->getRenderedPlayer() == (*it)->card->controller()) ++selfSpellsN; else ++opponentSpellsN; @@ -270,7 +274,7 @@ void GuiPlay::Replace() //rerun the iter reattaching planes walkers to the back of the lands. for (iterator it = end_spells; it != cards.end(); ++it) { - if ((*it)->card->hasType(Subtypes::TYPE_PLANESWALKER)) + if ((*it)->card->hasType(Subtypes::TYPE_PLANESWALKER) && !(*it)->card->isCreature()) { if (mpDuelLayers->getRenderedPlayer() == (*it)->card->controller()) selfLands.Enstack(*it); @@ -394,7 +398,7 @@ int GuiPlay::receiveEventPlus(WEvent * e) } else { - // this should never happen, if you have a consistent repro case, ping Wil please + // this should never happen, if you have a consistent repro case, ping Wil please assert(false); } return 1; @@ -406,6 +410,12 @@ int GuiPlay::receiveEventPlus(WEvent * e) } else if (dynamic_cast (e)) Replace(); + else if (dynamic_cast (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 4269577c9..2b7c6c93d 100644 --- a/projects/mtg/src/GuiStatic.cpp +++ b/projects/mtg/src/GuiStatic.cpp @@ -60,8 +60,8 @@ void GuiAvatar::Render() { if (corner == BOTTOM_RIGHT) { - x0 -= player->getIcon()->mWidth * actZ; - y0 -= player->getIcon()->mHeight * actZ; + x0 -= Width * actZ; + y0 -= Height * actZ; } switch (corner) { @@ -69,14 +69,14 @@ void GuiAvatar::Render() player->getIcon()->SetHotSpot(0, 0); break; case BOTTOM_RIGHT: - player->getIcon()->SetHotSpot(35, 50); + player->getIcon()->SetHotSpot(player->getIcon()->mWidth, player->getIcon()->mHeight); break; } player->getIcon()->SetColor(ARGB((int)actA, 255, avatarRed, avatarRed)); - r->RenderQuad(player->getIcon().get(), actX, actY, actT, actZ, actZ); + r->RenderQuad(player->getIcon().get(), actX, actY, actT, Width/player->getIcon()->mWidth*actZ, Height/player->getIcon()->mHeight*actZ); if (mHasFocus) { - r->FillRect(x0, x0, player->getIcon()->mWidth * actZ, player->getIcon()->mHeight * actZ, ARGB(abs(128 - wave),255,255,255)); + r->FillRect(x0, x0, Width/player->getIcon()->mWidth * actZ, Height/player->getIcon()->mHeight * actZ, ARGB(abs(128 - wave),255,255,255)); } } @@ -96,18 +96,29 @@ void GuiAvatar::Render() //Life char buffer[10]; + int lx = 255, ly = 255, lz = 255; + if(life > 24) { lx = 127; ly = 255; lz = 212; } + if(life > 16 && life < 24) { lx = 255; ly = 255; lz = 255; } + if(life > 12 && life < 17) { lx = 255; ly = 255; lz = 105; } + if(life > 8 && life < 13) { lx = 255; ly = 255; lz = 13; } + if(life > 4 && life < 9) { lx = 255; ly = 166; lz = 0; } + if(life < 5) { lx = 255; ly = 40; lz = 0; } sprintf(buffer, "%i", life); switch (corner) { case TOP_LEFT: mFont->SetColor(ARGB((int)actA / 4, 0, 0, 0)); mFont->DrawString(buffer, actX + 2, actY + 2); - mFont->SetColor(ARGB((int)actA, 255, 255, 255)); + mFont->SetScale(1.3f); + mFont->SetColor(ARGB((int)actA, lx, ly, lz)); mFont->DrawString(buffer, actX + 1, actY + 1); + mFont->SetScale(1); break; case BOTTOM_RIGHT: - mFont->SetColor(ARGB((int)actA, 255, 255, 255)); - mFont->DrawString(buffer, actX, actY - 10, JGETEXT_RIGHT); + mFont->SetScale(1.3f); + mFont->SetColor(ARGB((int)actA, lx, ly, lz)); + mFont->DrawString(buffer, actX, actY - 14, JGETEXT_RIGHT); + mFont->SetScale(1); break; } //poison @@ -153,7 +164,10 @@ void GuiGameZone::Render() JQuadPtr quad = WResourceManager::Instance()->GetQuad(kGenericCardThumbnailID); float scale = defaultHeight / quad->mHeight; quad->SetColor(ARGB((int)(actA),255,255,255)); - + if(type == GUI_EXILE) + { + quad->SetColor(ARGB((int)(actA),255,240,255)); + } JRenderer::GetInstance()->RenderQuad(quad.get(), actX, actY, 0.0, scale * actZ, scale * actZ); float x0 = actX; @@ -171,7 +185,16 @@ void GuiGameZone::Render() mFont->SetScale(DEFAULT_MAIN_FONT_SCALE); char buffer[11]; int mAlpha = (int) (actA); - sprintf(buffer, "%i", zone->nb_cards); + /*if(type == GUI_GRAVEYARD) + sprintf(buffer, "%i\ng", zone->nb_cards); + else if(type == GUI_LIBRARY) + sprintf(buffer, "%i\nl", zone->nb_cards); + else if(type == GUI_OPPONENTHAND) + sprintf(buffer, "%i\nh", zone->nb_cards); + else if(type == GUI_EXILE) + sprintf(buffer, "%i\ne", zone->nb_cards); + else*/ + sprintf(buffer, "%i", zone->nb_cards); mFont->SetColor(ARGB(mAlpha,0,0,0)); mFont->DrawString(buffer, x0 + 1, actY + 1); if (actA > 120) @@ -287,6 +310,52 @@ ostream& GuiGraveyard::toString(ostream& out) const return out << "GuiGraveyard :::"; } +GuiExile::GuiExile(float x, float y, bool hasFocus, Player * player, GuiAvatars* parent) : + GuiGameZone(x, y, hasFocus, player->game->exile, parent), player(player) +{ + type = GUI_EXILE; +} + +int GuiExile::receiveEventPlus(WEvent* e) +{ + if (WEventZoneChange* event = dynamic_cast(e)) + if (event->to == zone) + { + CardView* t; + if (event->card->view) + t = NEW CardView(CardView::nullZone, event->card, *(event->card->view)); + else + t = NEW CardView(CardView::nullZone, event->card, x, y); + t->x = x + Width / 2; + t->y = y + Height / 2; + t->zoom = 0.6f; + t->alpha = 0; + cards.push_back(t); + return 1; + } + return 0; +} + +int GuiExile::receiveEventMinus(WEvent* e) +{ + if (WEventZoneChange* event = dynamic_cast(e)) + if (event->from == zone) + for (vector::iterator it = cards.begin(); it != cards.end(); ++it) + if (event->card->previous == (*it)->card) + { + CardView* cv = *it; + cards.erase(it); + zone->owner->getObserver()->mTrash->trash(cv); + return 1; + } + return 0; +} + +ostream& GuiExile::toString(ostream& out) const +{ + return out << "GuiExile :::"; +} + //opponenthand begins GuiOpponentHand::GuiOpponentHand(float x, float y, bool hasFocus, Player * player, GuiAvatars* parent) : GuiGameZone(x, y, hasFocus, player->game->hand, parent), player(player) diff --git a/projects/mtg/src/IconButton.cpp b/projects/mtg/src/IconButton.cpp index 75515b478..8644183b2 100644 --- a/projects/mtg/src/IconButton.cpp +++ b/projects/mtg/src/IconButton.cpp @@ -4,8 +4,8 @@ #include "WResourceManager.h" #include "WFont.h" -#define SCALE_SELECTED 1.2f -#define SCALE_NORMAL 1.0f +#define SCALE_SELECTED 1.2f +#define SCALE_NORMAL 1.0f IconButtonsController::IconButtonsController(JGE* jge, float x, float y): JGuiController(jge, 0, NULL), mX(x), mY(y) { diff --git a/projects/mtg/src/InteractiveButton.cpp b/projects/mtg/src/InteractiveButton.cpp index 91a41813b..b86524204 100644 --- a/projects/mtg/src/InteractiveButton.cpp +++ b/projects/mtg/src/InteractiveButton.cpp @@ -80,7 +80,7 @@ void InteractiveButton::Render() mYOffset += 2; #endif - float buttonXOffset = getX() - mXOffset; + float buttonXOffset = getX() - mXOffset; float buttonYOffset = getY() + mYOffset; if (buttonImage != NULL) { diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index a4ad3f5e2..7d14d4615 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -39,7 +39,9 @@ const string kAlternateCostKeywords[] = "flashback", "retrace", "facedown", - "suspended" + "suspended", + "overload", + "bestow" }; const int kAlternateCostIds[] = { @@ -51,7 +53,9 @@ const int kAlternateCostIds[] = ManaCost::MANA_PAID_WITH_FLASHBACK, ManaCost::MANA_PAID_WITH_RETRACE, ManaCost::MANA_PAID_WITH_MORPH, - ManaCost::MANA_PAID_WITH_SUSPEND + ManaCost::MANA_PAID_WITH_SUSPEND, + ManaCost::MANA_PAID_WITH_OVERLOAD, + ManaCost::MANA_PAID_WITH_BESTOW }; //Used for "dynamic ability" parsing @@ -310,6 +314,21 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe return 0; } } + check = restriction[i].find("rebound"); + if(check != string::npos) + { + int count = 0; + for(unsigned int k = 0; k < player->game->stack->cardsSeenThisTurn.size(); k++) + { + MTGCardInstance * stackCard = player->game->stack->cardsSeenThisTurn[k]; + if(stackCard->next && stackCard->next == card && card->previousZone == card->controller()->game->hand) + count++; + if(stackCard == card && card->previousZone == card->controller()->game->hand) + count++; + } + if(!count) + return 0; + } check = restriction[i].find("morbid"); if(check != string::npos) { @@ -411,6 +430,20 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe } } + check = restriction[i].find("discarded"); + if(check != string::npos) + { + if(!card->discarded) + return 0; + } + + check = restriction[i].find("raid"); + if(check != string::npos) + { + if(card->controller()->raidcount < 1) + return 0; + } + check = restriction[i].find("ownerscontrol"); if(check != string::npos) { @@ -447,6 +480,12 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe if(cPhase < MTG_PHASE_COMBATBEGIN ||cPhase > MTG_PHASE_COMBATEND ) return 0; } + check = restriction[i].find("during my main phases"); + if(check != string::npos) + { + if( player != observer->currentPlayer && (cPhase != MTG_PHASE_FIRSTMAIN ||cPhase != MTG_PHASE_SECONDMAIN) ) + return 0; + } check = restriction[i].find("during my turn"); if(check != string::npos) { @@ -538,8 +577,8 @@ int AbilityFactory::countCards(TargetChooser * tc, Player * player, int option) { if (player && player != observer->players[i]) continue; - MTGGameZone * zones[] = { observer->players[i]->game->inPlay, observer->players[i]->game->graveyard, observer->players[i]->game->hand }; - for (int k = 0; k < 3; k++) + MTGGameZone * zones[] = { observer->players[i]->game->inPlay, observer->players[i]->game->graveyard, observer->players[i]->game->hand, observer->players[i]->game->exile }; + for (int k = 0; k < 4; k++) { for (int j = zones[k]->nb_cards - 1; j >= 0; j--) { @@ -691,8 +730,8 @@ TriggeredAbility * AbilityFactory::parseTrigger(string s, string, int id, Spell bool limitOnceATurn = (s.find("turnlimited") != string::npos); bool isSuspended = (s.find("suspended") != string::npos); bool opponentPoisoned = (s.find("opponentpoisoned") != string::npos); - bool lifelost = (s.find("foelost(") != string::npos); - int lifeamount = lifelost ? atoi(s.substr(s.find("foelost(") + 8,')').c_str()) : 0; + bool lifelost = (s.find("foelost(") != string::npos); + int lifeamount = lifelost ? atoi(s.substr(s.find("foelost(") + 8,')').c_str()) : 0; bool neverRemove = (s.find("dontremove") != string::npos); //Card Changed Zone @@ -805,7 +844,16 @@ TriggeredAbility * AbilityFactory::parseTrigger(string s, string, int id, Spell attackingTrigger,attackedAloneTrigger,notBlockedTrigger,attackBlockedTrigger,blockingTrigger); } - //Card card is drawn + + //drawn player - controller of card - dynamic version drawof(player) -> returns current controller even with exchange of card controller + if (TargetChooser * tc = parseSimpleTC(s, "drawof", card)) + return NEW TrcardDrawn(observer, id, card, tc,once,true,false); + + //drawn player - opponent of card controller - dynamic version drawfoeof(player) -> returns current opponent even with exchange of card controller + if (TargetChooser * tc = parseSimpleTC(s, "drawfoeof", card)) + return NEW TrcardDrawn(observer, id, card, tc,once,false,true); + + //Card card is drawn - static version - drawn(player) - any player; drawn(controller) - owner forever; drawn(opponent) - opponent forever if (TargetChooser * tc = parseSimpleTC(s, "drawn", card)) return NEW TrcardDrawn(observer, id, card, tc,once); @@ -821,35 +869,105 @@ TriggeredAbility * AbilityFactory::parseTrigger(string s, string, int id, Spell if (TargetChooser * tc = parseSimpleTC(s, "cycled", card)) return NEW TrCardDiscarded(observer, id, card, tc,once,true); - //Card Damaging non combat + //Card Damaging non combat current controller + if (TargetChooser * tc = parseSimpleTC(s, "noncombatdamageof", card)) + { + TargetChooser *fromTc = parseSimpleTC(s, "from", card); + return NEW TrDamaged(observer, id, card, tc, fromTc, 2,false,false,once,true,false); + } + + //Card Damaging non combat current opponent + if (TargetChooser * tc = parseSimpleTC(s, "noncombatdamagefoeof", card)) + { + TargetChooser *fromTc = parseSimpleTC(s, "from", card); + return NEW TrDamaged(observer, id, card, tc, fromTc, 2,false,false,once,false,true); + } + + //Card Damaging non combat static if (TargetChooser * tc = parseSimpleTC(s, "noncombatdamaged", card)) { TargetChooser *fromTc = parseSimpleTC(s, "from", card); return NEW TrDamaged(observer, id, card, tc, fromTc, 2,once); } - //Card Damaging combat + //Card Damaging combat current controller + if (TargetChooser * tc = parseSimpleTC(s, "combatdamageof", card)) + { + TargetChooser *fromTc = parseSimpleTC(s, "from", card); + return NEW TrDamaged(observer, id, card, tc, fromTc, 1,sourceUntapped,limitOnceATurn,once,true,false); + } + + //Card Damaging combat current opponent + if (TargetChooser * tc = parseSimpleTC(s, "combatdamagefoeof", card)) + { + TargetChooser *fromTc = parseSimpleTC(s, "from", card); + return NEW TrDamaged(observer, id, card, tc, fromTc, 1,sourceUntapped,limitOnceATurn,once,false,true); + } + + //Card Damaging combat static if (TargetChooser * tc = parseSimpleTC(s, "combatdamaged", card)) { TargetChooser *fromTc = parseSimpleTC(s, "from", card); return NEW TrDamaged(observer, id, card, tc, fromTc, 1,sourceUntapped,limitOnceATurn,once); } - //Card Damaging + //Card Damaging current controller + if (TargetChooser * tc = parseSimpleTC(s, "damageof", card)) + { + TargetChooser *fromTc = parseSimpleTC(s, "from", card); + return NEW TrDamaged(observer, id, card, tc, fromTc, 0,sourceUntapped,limitOnceATurn,once,true,false); + } + + //Card Damaging current opponent + if (TargetChooser * tc = parseSimpleTC(s, "damagefoeof", card)) + { + TargetChooser *fromTc = parseSimpleTC(s, "from", card); + return NEW TrDamaged(observer, id, card, tc, fromTc, 0,sourceUntapped,limitOnceATurn,once,false,true); + } + + //Card Damaging static if (TargetChooser * tc = parseSimpleTC(s, "damaged", card)) { TargetChooser *fromTc = parseSimpleTC(s, "from", card); return NEW TrDamaged(observer, id, card, tc, fromTc, 0,sourceUntapped,limitOnceATurn,once); } - //Lifed + //Lifed current controller + if (TargetChooser * tc = parseSimpleTC(s, "lifeof", card)) + { + TargetChooser *fromTc = parseSimpleTC(s, "from", card); + return NEW TrLifeGained(observer, id, card, tc, fromTc, 0,sourceUntapped,once,true,false); + } + + //Lifed current opponent + if (TargetChooser * tc = parseSimpleTC(s, "lifefoeof", card)) + { + TargetChooser *fromTc = parseSimpleTC(s, "from", card); + return NEW TrLifeGained(observer, id, card, tc, fromTc, 0,sourceUntapped,once,false,true); + } + + //Lifed static if (TargetChooser * tc = parseSimpleTC(s, "lifed", card)) { TargetChooser *fromTc = parseSimpleTC(s, "from", card); return NEW TrLifeGained(observer, id, card, tc, fromTc, 0,sourceUntapped,once); } - //Life Loss + //Life Loss current player + if (TargetChooser * tc = parseSimpleTC(s, "lifelostof", card)) + { + TargetChooser *fromTc = parseSimpleTC(s, "from", card); + return NEW TrLifeGained(observer, id, card, tc, fromTc,1,sourceUntapped,once,true,false); + } + + //Life Loss current opponent + if (TargetChooser * tc = parseSimpleTC(s, "lifelostfoeof", card)) + { + TargetChooser *fromTc = parseSimpleTC(s, "from", card); + return NEW TrLifeGained(observer, id, card, tc, fromTc,1,sourceUntapped,once,false,true); + } + + //Life Loss static if (TargetChooser * tc = parseSimpleTC(s, "lifeloss", card)) { TargetChooser *fromTc = parseSimpleTC(s, "from", card); @@ -945,12 +1063,12 @@ MTGAbility * AbilityFactory::getCoreAbility(MTGAbility * a) if (MultiAbility * abi = dynamic_cast(a)) return getCoreAbility(abi->abilities[0]); - if (NestedAbility * na = dynamic_cast (a)) - { - if(na->ability) - //only atempt to return a nestedability if it contains a valid ability. example where this causes a bug otherwise. AEquip is considered nested, but contains no ability. - return getCoreAbility(na->ability); - } + if (NestedAbility * na = dynamic_cast (a)) + { + if(na->ability) + //only atempt to return a nestedability if it contains a valid ability. example where this causes a bug otherwise. AEquip is considered nested, but contains no ability. + return getCoreAbility(na->ability); + } if (MenuAbility * ma = dynamic_cast(a)) return getCoreAbility(ma->abilities[0]); @@ -965,6 +1083,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG MTGGameZone * dest) { size_t found; + bool asAlternate = false; trim(s); //TODO This block redundant with calling function if (!card && spell) @@ -974,7 +1093,9 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG MTGCardInstance * target = card->target; if (!target) target = card; - + //pay and castcard? + if(s.find("castcard(restricted") != string::npos && (s.find("pay(") != string::npos || s.find("pay[[") != string::npos)) + asAlternate = true; //MTG Specific rules //adds the bonus credit system found = s.find("bonusrule"); @@ -1039,10 +1160,16 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG observer->addObserver(NEW MTGMorphCostRule(observer, -1)); return NULL; } - found = s.find("playfromgraveyardrule"); + found = s.find("payzerorule"); if(found != string::npos) { - observer->addObserver(NEW MTGPlayFromGraveyardRule(observer, -1)); + observer->addObserver(NEW MTGPayZeroRule(observer, -1)); + return NULL; + } + found = s.find("overloadrule"); + if(found != string::npos) + { + observer->addObserver(NEW MTGOverloadRule(observer, -1)); return NULL; } //this rule handles attacking ability during attacker phase @@ -1324,7 +1451,12 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG tcString = splitTarget[1]; if (!isTarget) + { + tc->targetter->bypassTC = true; tc->targetter = NULL; + } + else + tc->targetter->bypassTC = false; sWithoutTc = splitTarget[0]; sWithoutTc.append(splitTarget[2]); } @@ -1467,7 +1599,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG vector splitMayPay = parseBetween(s, "pay(", ")", true); if(splitMayPay.size()) { - GenericPaidAbility * a = NEW GenericPaidAbility(observer, id, card, target,newName,castRestriction,splitMayPay[1],storedPayString); + GenericPaidAbility * a = NEW GenericPaidAbility(observer, id, card, target,newName,castRestriction,splitMayPay[1],storedPayString,asAlternate); a->oneShot = 1; a->canBeInterrupted = false; return a; @@ -1694,7 +1826,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG found = string::npos; i = -1; - for (size_t j = 0; j < kLordKeywordsCount; ++j) + for (size_t j = 0; j < kLordKeywordsCount; ++j) { size_t found2 = s.find(kLordKeywords[j]); if (found2 != string::npos && ((found == string::npos) || found2 < found)) @@ -1972,7 +2104,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG vector splitMayPaysub = parseBetween(s, "pay[[","]]", true); if (splitMayPaysub.size()) { - GenericPaidAbility * a = NEW GenericPaidAbility(observer, id, card, target,newName,castRestriction,splitMayPaysub[1],storedPayString); + GenericPaidAbility * a = NEW GenericPaidAbility(observer, id, card, target,newName,castRestriction,splitMayPaysub[1],storedPayString,asAlternate); a->oneShot = 1; a->canBeInterrupted = false; return a; @@ -2320,6 +2452,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG bool asCopy = splitCastCard[1].find("copied") != string::npos; bool asNormal = splitCastCard[1].find("normal") != string::npos; bool sendNoEvent = splitCastCard[1].find("noevent") != string::npos; + bool putinplay = splitCastCard[1].find("putinplay") != string::npos; string nameCard = ""; if(splitCastCard[1].find("named!:") != string::npos) { @@ -2329,7 +2462,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG nameCard = splitCastName[1]; } } - MTGAbility *a = NEW AACastCard(observer, id, card, target,withRestrictions,asCopy,asNormal,nameCard,newName,sendNoEvent); + MTGAbility *a = NEW AACastCard(observer, id, card, target,withRestrictions,asCopy,asNormal,nameCard,newName,sendNoEvent,putinplay); a->oneShot = false; if(splitCastCard[1].find("trigger[to]") != string::npos) { @@ -2408,7 +2541,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG return a; } - //Reset damages on cards + //Do nothing found = s.find("donothing"); if (found != string::npos) { @@ -2418,6 +2551,16 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG return a; } + //Epic + found = s.find("epic"); + if (found != string::npos) + { + + MTGAbility * a = NEW AAEPIC(observer, id, card, target,newName); + a->oneShot = 1; + return a; + } + //Damage vector splitDamage = parseBetween(s, "damage:", " ", false); if (splitDamage.size()) @@ -2450,16 +2593,25 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG return a; } - //set hand size - vector splitSetHand = parseBetween(s, "sethand:", " ", false); - if (splitSetHand.size()) - { - int hand = atoi(splitSetHand[1].c_str()); - Damageable * t = spell ? spell->getNextDamageableTarget() : NULL; + //modify hand size - reduce maximum or increase + vector splitHandMod = parseBetween(s, "hmodifer:", " ", false); + if (splitHandMod.size()) + { + Damageable * t = spell ? spell->getNextDamageableTarget() : NULL; + MTGAbility * a = NEW AModifyHand(observer, id, card, t, splitHandMod[1], who); + return a; + } + + //set hand size + vector splitSetHand = parseBetween(s, "sethand:", " ", false); + if (splitSetHand.size()) + { + int hand = atoi(splitSetHand[1].c_str()); + Damageable * t = spell ? spell->getNextDamageableTarget() : NULL; MTGAbility * a = NEW AASetHand(observer, id, card, t, hand, NULL, who); - a->oneShot = 1; - return a; - } + a->oneShot = 1; + return a; + } //set life total vector splitLifeset = parseBetween(s, "lifeset:", " ", false); @@ -2507,7 +2659,17 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG if (splitDeplete.size()) { Targetable * t = spell ? spell->getNextTarget() : NULL; - MTGAbility * a = NEW AADepleter(observer, id, card, t , splitDeplete[1], NULL, who); + MTGAbility * a = NEW AADepleter(observer, id, card, t , splitDeplete[1], NULL, who, false); + a->oneShot = 1; + return a; + } + + //Ingest + vector splitIngest = parseBetween(s, "ingest:", " ", false); + if (splitIngest.size()) + { + Targetable * t = spell ? spell->getNextTarget() : NULL; + MTGAbility * a = NEW AADepleter(observer, id, card, t , splitIngest[1], NULL, who, true); a->oneShot = 1; return a; } @@ -2532,6 +2694,16 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG return a; } + //Serum Powder + found = s.find("serumpowder"); + if (found != string::npos) + { + Targetable * t = spell? spell->getNextTarget() : NULL; + MTGAbility * a = NEW AAMulligan(observer, id, card, t, NULL, who); + a->oneShot = 1; + return a; + } + //Remove Mana from ManaPool vector splitRemove = parseBetween(s, "removemana(", ")"); if (splitRemove.size()) @@ -2551,7 +2723,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG } //Cast/Play Restrictions - for (size_t i = 0; i < kMaxCastKeywordsCount; ++i) + for (size_t i = 0; i < kMaxCastKeywordsCount; ++i) { vector splitCast = parseBetween(s, kMaxCastKeywords[i], ")"); if (splitCast.size()) @@ -2603,13 +2775,31 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG int MaxOpponent = atoi(rampageParameters[1].c_str()); return NEW ARampageAbility(observer, id, card, power, toughness, MaxOpponent); } - + //evole if (s.find("evolve") != string::npos) { return NEW AEvolveAbility(observer, id, card); } + //produce additional mana when tapped for mana + if (s.find("produceextra:") != string::npos) + { + return NEW AProduceMana(observer, id, card,s.substr(13)); + } + + //produce additional mana when a mana is engaged + if (s.find("producecolor:") != string::npos) + { + return NEW AEngagedManaAbility(observer, id, card,s.substr(13)); + } + + //reducelife to specific value + if (s.find("reduceto:") != string::npos) + { + return NEW AReduceToAbility(observer, id, card,s.substr(9)); + } + //flanking if (s.find("flanker") != string::npos) { @@ -2749,9 +2939,9 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG { vector becomesParameters = split(splitBecomes[1], ','); string stypes = becomesParameters[0]; - string newPower = ""; + string newPower = ""; string newToughness = ""; - bool ptFound = false; + bool ptFound = false; if(becomesParameters.size() >1) { vector pt = split(becomesParameters[1], '/'); @@ -2762,17 +2952,17 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG ptFound = true; } } - string sabilities = ""; + string sabilities = ""; unsigned int becomesSize = ptFound?2:1; - if(becomesParameters.size() > becomesSize) - { - for(unsigned int i = becomesSize;i < becomesParameters.size();i++) - { - sabilities.append(becomesParameters[i].c_str()); - if(i+1 < becomesParameters.size()) - sabilities.append(","); - } - } + if(becomesParameters.size() > becomesSize) + { + for(unsigned int i = becomesSize;i < becomesParameters.size();i++) + { + sabilities.append(becomesParameters[i].c_str()); + if(i+1 < becomesParameters.size()) + sabilities.append(","); + } + } if (oneShot || forceUEOT || forceForever) return NEW ATransformerInstant(observer, id, card, target, stypes, sabilities,newPower,ptFound,newToughness,ptFound,vector(),false,forceForever,untilYourNextTurn); @@ -2854,14 +3044,14 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG newtoughnessfound = true; newtoughness = splitToughness[1]; } - if(abilities[j].find("newability[") != string::npos) - { - size_t NewSkill = abilities[j].find("newability["); - size_t NewSkillEnd = abilities[j].find_last_of("]"); - string newAbilities = abilities[j].substr(NewSkill + 11,NewSkillEnd - NewSkill - 11); - newAbilitiesList.push_back(newAbilities); - newAbilityFound = true; - } + if(abilities[j].find("newability[") != string::npos) + { + size_t NewSkill = abilities[j].find("newability["); + size_t NewSkillEnd = abilities[j].find_last_of("]"); + string newAbilities = abilities[j].substr(NewSkill + 11,NewSkillEnd - NewSkill - 11); + newAbilitiesList.push_back(newAbilities); + newAbilityFound = true; + } } if (oneShot || forceUEOT || forceForever) @@ -2898,7 +3088,16 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG { return NEW PTInstant(observer, id, card, target, wppt,s,nonstatic); } - return NEW APowerToughnessModifier(observer, id, card, target, wppt,s,nonstatic); + else if(s.find("cdaactive") != string::npos) + { + MTGAbility * a = NEW APowerToughnessModifier(observer, id, card, target, wppt,s,true); + a->forcedAlive = 1; + //a->forceDestroy = -1; + return a; + //return NEW APowerToughnessModifier(observer, id, card, target, wppt,s,true); + } + else + return NEW APowerToughnessModifier(observer, id, card, target, wppt,s,nonstatic); } return NEW PTInstant(observer, id, card, target, wppt,s,nonstatic); } @@ -3036,7 +3235,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG return a; } - //get a new target + //get a new target - retarget and newtarget makes the card refreshed - from exile to play... if ((s.find("retarget") != string::npos) || s.find("newtarget") != string::npos) { MTGAbility * a = NEW AANewTarget(observer, id, card,target, (s.find("retarget") != string::npos)); @@ -3044,6 +3243,14 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG return a; } + //get a new target for puresteel paladin...etc for equipments inplay only.. newhook & rehook supports stone hewer basic... the card is reequipped + if ((s.find("rehook") != string::npos) || s.find("newhook") != string::npos) + { + MTGAbility * a = NEW AANewTarget(observer, id, card,target, false,NULL,true,(s.find("newhook") != string::npos)); + a->oneShot = 1; + return a; + } + //morph found = s.find("morph"); if (found != string::npos) @@ -3246,6 +3453,7 @@ MTGAbility * AbilityFactory::parsePhaseActionAbility(string s,MTGCardInstance * bool opponentturn = (s1.find("my") == string::npos); bool myturn = (s1.find("opponent") == string::npos); bool sourceinPlay = (s1.find("sourceinplay") != string::npos); + bool checkexile = (s1.find("checkex") != string::npos); bool next = (s1.find("next") == string::npos); //Why is this one the opposite of the two others? That's completely inconsistent bool once = (s1.find("once") != string::npos); @@ -3254,7 +3462,7 @@ MTGAbility * AbilityFactory::parsePhaseActionAbility(string s,MTGCardInstance * _target = spell->getNextCardTarget(); if(!_target) _target = target; - return NEW APhaseActionGeneric(observer, id, card,_target, trim(splitActions[2]), restrictions, phase,sourceinPlay,next,myturn,opponentturn,once); + return NEW APhaseActionGeneric(observer, id, card,_target, trim(splitActions[2]), restrictions, phase,sourceinPlay,next,myturn,opponentturn,once,checkexile); } MTGAbility * AbilityFactory::parseChooseActionAbility(string s,MTGCardInstance * card,Spell *,MTGCardInstance * target, int, int id) @@ -3493,6 +3701,8 @@ int AbilityFactory::abilityEfficiency(MTGAbility * a, Player * p, int mode, Targ badAbilities[(int)Constants::ONLYMANA] = true; badAbilities[(int)Constants::EXILEDEATH] = true; badAbilities[(int)Constants::WEAK] = true; + badAbilities[(int)Constants::NOLIFEGAIN] = true; + badAbilities[(int)Constants::NOLIFEGAINOPPONENT] = true; if (AInstantBasicAbilityModifierUntilEOT * abi = dynamic_cast(a)) { @@ -3555,7 +3765,7 @@ int AbilityFactory::getAbilities(vector * v, Spell * spell, MTGCar if (dest == zones->exile) { magicText = card->magicTexts["exile"]; - card->exileEffects = true; + card->exileEffects = true; break; } if (dest == zones->library) @@ -4200,7 +4410,7 @@ void AbilityFactory::addAbilities(int _id, Spell * spell) if (current->hasType(Subtypes::TYPE_CREATURE)) { card->controller()->game->putInGraveyard(current); - damage += current->power; + damage += current->getCurrentPower(); } } observer->mLayers->stackLayer()->addDamage(card, target, damage); @@ -4529,6 +4739,8 @@ int ActivatedAbility::isReactingToClick(MTGCardInstance * card, ManaCost * mana) return 0; if (cPhase != MTG_PHASE_FIRSTMAIN && cPhase != MTG_PHASE_SECONDMAIN) return 0; + if (player->opponent()->getObserver()->mLayers->stackLayer()->count(0, NOT_RESOLVED) != 0||game->mLayers->stackLayer()->count(0, NOT_RESOLVED) != 0||player->getObserver()->mLayers->stackLayer()->count(0, NOT_RESOLVED) != 0) + return 0; break; } if (restrictions >= MY_BEFORE_BEGIN && restrictions <= MY_AFTER_EOT) @@ -4942,6 +5154,15 @@ int TriggeredAbility::receiveEvent(WEvent * e) resolve(); return 1; } + if(dynamic_cast(e)) + { + //sacrificed event + //thraximundar vs bloodfore collosus, thraximundar + //must be able to survive a sacrificed bloodfire collosus, + //same with mortician beetle vs phyrexian denouncer test + resolve(); + return 1; + } WEventZoneChange * stackCheck = dynamic_cast(e); if(stackCheck && (stackCheck->to == game->currentPlayer->game->stack||stackCheck->to == game->currentPlayer->opponent()->game->stack)) { @@ -5075,8 +5296,8 @@ void ListMaintainerAbility::updateTargets() for (int i = 0; i < 2; i++) { Player * p = game->players[i]; - MTGGameZone * zones[] = { p->game->inPlay, p->game->graveyard, p->game->hand, p->game->library, p->game->stack }; - for (int k = 0; k < 5; k++) + MTGGameZone * zones[] = { p->game->inPlay, p->game->graveyard, p->game->hand, p->game->library, p->game->stack, p->game->exile }; + for (int k = 0; k < 6; k++) { MTGGameZone * zone = zones[k]; if (canTarget(zone)) @@ -5147,8 +5368,8 @@ void ListMaintainerAbility::checkTargets() for (int i = 0; i < 2; i++) { Player * p = game->players[i]; - MTGGameZone * zones[] = { p->game->inPlay, p->game->graveyard, p->game->hand, p->game->library, p->game->stack }; - for (int k = 0; k < 5; k++) + MTGGameZone * zones[] = { p->game->inPlay, p->game->graveyard, p->game->hand, p->game->library, p->game->stack, p->game->exile }; + for (int k = 0; k < 6; k++) { MTGGameZone * zone = zones[k]; if (canTarget(zone)) diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index b957afa0c..6dfdb9add 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -36,7 +36,11 @@ MTGCardInstance::MTGCardInstance(MTGCard * card, MTGPlayerCards * arg_belongs_to attacker = 0; lifeOrig = life; origpower = power; + basepower = origpower; + pbonus = 0; origtoughness = toughness; + basetoughness = origtoughness; + tbonus = 0; belongs_to = arg_belongs_to; owner = NULL; if (arg_belongs_to) @@ -49,6 +53,19 @@ MTGCardInstance::MTGCardInstance(MTGCard * card, MTGPlayerCards * arg_belongs_to thatmuch = 0; flanked = 0; castMethod = Constants::NOT_CAST; + isSettingBase = 0; + isCDA = false; + isSwitchedPT = false; + isACopier = false; + bypassTC = false; + discarded = false; + copiedID = getId(); + modifiedbAbi = 0; + LKIpower = power; + LKItoughness = toughness; + cardistargetted = 0; + cardistargetter = 0; + myconvertedcost = getManaCost()->getConvertedCost(); } MTGCardInstance * MTGCardInstance::createSnapShot() @@ -66,6 +83,8 @@ void MTGCardInstance::copy(MTGCardInstance * card) CardPrimitive * data = source->data; basicAbilities = card->basicAbilities; + origbasicAbilities = card->origbasicAbilities; + modifiedbAbi = card->modifiedbAbi; for (size_t i = 0; i < data->types.size(); i++) { types.push_back(data->types[i]); @@ -565,11 +584,13 @@ Player * MTGCardInstance::controller() int MTGCardInstance::canAttack() { + if (basicAbilities[(int)Constants::CANTATTACK]) + return 0; if (tapped) return 0; if (hasSummoningSickness()) return 0; - if ((basicAbilities[(int)Constants::DEFENSER] || basicAbilities[(int)Constants::CANTATTACK]) && !basicAbilities[(int)Constants::CANATTACK]) + if (basicAbilities[(int)Constants::DEFENSER] && !basicAbilities[(int)Constants::CANATTACK]) return 0; if (!isCreature()) return 0; @@ -594,6 +615,199 @@ int MTGCardInstance::setToughness(int value) return 1; } +void MTGCardInstance::stripPTbonus() +{ + power -= pbonus; + addToToughness(-tbonus); +} + +void MTGCardInstance::plusPTbonus(int p, int t) +{ + pbonus += p; + tbonus += t; +} + +void MTGCardInstance::minusPTbonus(int p, int t) +{ + pbonus -= p; + tbonus -= t; +} + +void MTGCardInstance::applyPTbonus() +{ + power += pbonus; + addToToughness(tbonus); +} + +void MTGCardInstance::addcounter(int p, int t) +{ + stripPTbonus(); + plusPTbonus(p,t); + applyPTbonus(); +} + +void MTGCardInstance::addptbonus(int p, int t) +{ + stripPTbonus(); + plusPTbonus(p,t); + applyPTbonus(); +} + +void MTGCardInstance::removecounter(int p, int t) +{ + stripPTbonus(); + minusPTbonus(p,t); + applyPTbonus(); +} + +void MTGCardInstance::removeptbonus(int p, int t) +{ + stripPTbonus(); + minusPTbonus(p,t); + applyPTbonus(); +} + +void MTGCardInstance::addbaseP(int p) +{ + basepower = p; + power -= pbonus; + power = p; + power += pbonus; +} + +void MTGCardInstance::addbaseT(int t) +{ + basetoughness = t; + addToToughness(-tbonus); + addToToughness(t - toughness); + addToToughness(tbonus); +} + +void MTGCardInstance::revertbaseP() +{ + power -= pbonus; + power += origpower; + power -= basepower; + power += pbonus; + basepower = origpower; +} + +void MTGCardInstance::revertbaseT() +{ + addToToughness(-tbonus); + addToToughness(origtoughness); + addToToughness(-basetoughness); + addToToughness(tbonus); + basetoughness = origtoughness; +} + +void MTGCardInstance::cdaPT(int p, int t) +{ + origpower = p; + origtoughness = t; + setPower(p); + setToughness(t); + applyPTbonus(); +} + +void MTGCardInstance::switchPT(bool apply) +{ + stripPTbonus(); + swapP = power; + swapT = toughness; + power += origpower; + power -= swapP; + addToToughness(origtoughness); + addToToughness(-swapT); + applyPTbonus(); + if(apply) + { + swapP = toughness; + swapT = power; + addToToughness(swapT); + addToToughness(-swapP); + setPower(swapP); + } +} + +int MTGCardInstance::getCurrentPower() +{ + if(!isInPlay(observer)) + return LKIpower; + return power; +} + +int MTGCardInstance::getCurrentToughness() +{ + if(!isInPlay(observer)) + return LKItoughness; + return toughness; +} + +//check stack +bool MTGCardInstance::StackIsEmptyandSorcerySpeed() +{ + if((getObserver()->mLayers->stackLayer()->count(0, NOT_RESOLVED) == 0) && + (getObserver()->getCurrentGamePhase() == MTG_PHASE_FIRSTMAIN || + getObserver()->getCurrentGamePhase() == MTG_PHASE_SECONDMAIN) && + controller() == getObserver()->currentPlayer && + !getObserver()->isInterrupting) + { + return true; + } + return false; +} + +//check targetted? +bool MTGCardInstance::isTargetted() +{ + if(getObserver()->mLayers->stackLayer()->count(0, NOT_RESOLVED) != 0) + { + ActionStack * stack = observer->mLayers->stackLayer(); + for (int i = stack->mObjects.size() - 1; i >= 0; i--) + { + Interruptible * current = ((Interruptible *) stack->mObjects[i]); + if ((current->type == ACTION_SPELL || current->type == ACTION_ABILITY) && current->state == NOT_RESOLVED) + { + if(current->type == ACTION_SPELL) + { + Spell * spell = (Spell *) current; + if(spell->getNextTarget() && spell->getNextTarget() == (Targetable*)this) + return true; + } + } + } + } + if(cardistargetted) + return true; + return false; +} + +//check targetter? +bool MTGCardInstance::isTargetter() +{ + if(getObserver()->mLayers->stackLayer()->count(0, NOT_RESOLVED) != 0) + { + ActionStack * stack = observer->mLayers->stackLayer(); + for (int i = stack->mObjects.size() - 1; i >= 0; i--) + { + Interruptible * current = ((Interruptible *) stack->mObjects[i]); + if ((current->type == ACTION_SPELL || current->type == ACTION_ABILITY) && current->state == NOT_RESOLVED) + { + if(current->type == ACTION_SPELL) + { + Spell * spell = (Spell *) current; + if(spell && spell->source == this) + return true; + } + } + } + } + if(cardistargetter) + return true; + return false; +} + int MTGCardInstance::canBlock() { if (tapped) @@ -628,6 +842,8 @@ int MTGCardInstance::canBlock(MTGCardInstance * opponent) return 0; if (opponent->basicAbilities[(int)Constants::ONEBLOCKER] && opponent->blocked) return 0; + if(opponent->basicAbilities[(int)Constants::EVADEBIGGER] && power > opponent->power) + return 0; if(opponent->basicAbilities[(int)Constants::STRONG] && power < opponent->power) return 0; if(this->basicAbilities[(int)Constants::WEAK] && power < opponent->power) @@ -702,6 +918,25 @@ JQuadPtr MTGCardInstance::getIcon() return WResourceManager::Instance()->RetrieveCard(this, CACHE_THUMB); } +ManaCost * MTGCardInstance::computeNewCost(MTGCardInstance * card,ManaCost * oldCost) +{ + if(card->isLand()) + return oldCost; + + if(!card) + return oldCost; + //use forcedalive// + //pay zero costs// + //kicker???...// + //morph cost todo// + //trinisphere must be here below// + if(card->has(Constants::TRINISPHERE)) + for(int jj = oldCost->getConvertedCost(); jj < 3; jj++) + oldCost->add(Constants::MTG_COLOR_ARTIFACT, 1); + + return oldCost; +} + MTGCardInstance * MTGCardInstance::getNextPartner() { MTGInPlay * inplay = controller()->game->inPlay; diff --git a/projects/mtg/src/MTGDeck.cpp b/projects/mtg/src/MTGDeck.cpp index 058c1d4c3..0189b2208 100644 --- a/projects/mtg/src/MTGDeck.cpp +++ b/projects/mtg/src/MTGDeck.cpp @@ -93,6 +93,16 @@ int MTGAllCards::processConfLine(string &s, MTGCard *card, CardPrimitive * primi } } } + if (key == "anyzone") + { + if (!primitive) primitive = NEW CardPrimitive(); + primitive->addMagicText(val,"hand"); + primitive->addMagicText(val,"library"); + primitive->addMagicText(val,"graveyard"); + primitive->addMagicText(val,"stack"); + primitive->addMagicText(val,"exile"); + primitive->addMagicText(val); + } break; case 'b': //buyback @@ -271,7 +281,7 @@ int MTGAllCards::processConfLine(string &s, MTGCard *card, CardPrimitive * primi { string value = val; std::transform(value.begin(), value.end(), value.begin(), ::tolower); - cost->setSuspend(ManaCost::parseManaCost(value)); + cost->setSuspend(ManaCost::parseManaCost(value)); primitive->suspendedTime = suspendTime; } diff --git a/projects/mtg/src/MTGDefinitions.cpp b/projects/mtg/src/MTGDefinitions.cpp index 3161c3749..f01fbbd14 100644 --- a/projects/mtg/src/MTGDefinitions.cpp +++ b/projects/mtg/src/MTGDefinitions.cpp @@ -14,9 +14,9 @@ const string Constants::kManaRed = "red"; const string Constants::kManaBlack = "black"; const string Constants::kManaWhite = "white"; -int Constants::_r[7] = {75, 20, 20, 200,50,255,128}; -int Constants::_g[7] = {30, 140, 30, 15, 50,255,128}; -int Constants::_b[7] = {20, 0, 140,15, 50,255,128}; +int Constants::_r[7] = {75,20,20,200,50,255,128}; +int Constants::_g[7] = {30,140,30,15,50,255,128}; +int Constants::_b[7] = {20,0,140,15,50,255,128}; const string Constants::kAlternativeKeyword = "alternative"; @@ -132,7 +132,26 @@ const char* Constants::MTGBasicAbilities[] = { "soulbond", "lure", "nolegend", - "canplayfromgraveyard" + "canplayfromgraveyard", + "tokenizer",//parallel lives, + "mygraveexiler", + "oppgraveexiler", + "librarydeath", + "shufflelibrarydeath", + "offering", + "evadebigger", + "spellmastery", + "nolifegain", + "nolifegainopponent", + "auraward", + "madness", + "protectionfromcoloredspells", + "mygcreatureexiler", + "oppgcreatureexiler", + "zerocast", + "trinisphere", + "canplayfromexile", + "libraryeater" }; map Constants::MTGBasicAbilitiesMap; @@ -165,36 +184,36 @@ int Constants::GetColorStringIndex(string mtgColor) const string Constants::MTGPhaseNames[] = { - "---", - "Untap", - "Upkeep", - "Draw", - "Main phase 1", - "Combat begins", - "Attackers", - "Blockers", - "Combat damage", - "Combat ends", - "Main phase 2", - "End", - "Cleanup", - "---" + "---", + "Untap", + "Upkeep", + "Draw", + "Main phase 1", + "Combat begins", + "Attackers", + "Blockers", + "Combat damage", + "Combat ends", + "Main phase 2", + "End", + "Cleanup", + "---" }; const char* Constants::MTGPhaseCodeNames[] = { - "beginofturn", - "untap", - "upkeep", - "draw", - "firstmain", - "combatbegins", - "attackers", - "blockers", - "combatdamage", - "combatends", - "secondmain", - "end", - "cleanup", - "beforenextturn" + "beginofturn", + "untap", + "upkeep", + "draw", + "firstmain", + "combatbegins", + "attackers", + "blockers", + "combatdamage", + "combatends", + "secondmain", + "end", + "cleanup", + "beforenextturn" }; diff --git a/projects/mtg/src/MTGGameZones.cpp b/projects/mtg/src/MTGGameZones.cpp index 39fcc1afd..736c68e00 100644 --- a/projects/mtg/src/MTGGameZones.cpp +++ b/projects/mtg/src/MTGGameZones.cpp @@ -321,11 +321,52 @@ MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone return card; //Error check int doCopy = 1; + bool shufflelibrary = card->basicAbilities[(int)Constants::SHUFFLELIBRARYDEATH]; + bool inplaytoinplay = false; + bool ripToken = false; + if (g->players[0]->game->battlefield->hasName("Rest in Peace")||g->players[1]->game->battlefield->hasName("Rest in Peace")) + ripToken = true; + //Madness or Put in Play... + for(int i = 0; i < 2; ++i) + { + if (card->discarded && (to == g->players[i]->game->graveyard) && (from == g->players[i]->game->hand)) + { + if(card->basicAbilities[(int)Constants::MADNESS]) + to = g->players[i]->game->exile; + } + } + //Darksteel Colossus, Legacy Weapon ... top priority since we replace destination directly automatically... + for(int i = 0; i < 2; ++i) + { + if ((to == g->players[i]->game->graveyard) && ( + card->basicAbilities[(int)Constants::LIBRARYDEATH]|| + card->basicAbilities[(int)Constants::SHUFFLELIBRARYDEATH])) + { + to = g->players[i]->game->library; + } + } + //Leyline of the Void, Yawgmoth's Agenda... effect... + for(int i = 0; i < 2; ++i) + { + if ((to == g->players[i]->game->graveyard) && ( + (g->players[i]->game->battlefield->hasAbility(Constants::MYGCREATUREEXILER) && card->isCreature()) || + (g->players[i]->opponent()->game->battlefield->hasAbility(Constants::OPPGCREATUREEXILER) && card->isCreature())|| + g->players[i]->game->battlefield->hasAbility(Constants::MYGRAVEEXILER) || + g->players[i]->opponent()->game->battlefield->hasAbility(Constants::OPPGRAVEEXILER))) + { + if ((card->isToken && ripToken)) + to = g->players[i]->game->exile; + if (!card->isToken) + to = g->players[i]->game->exile; + } + } //When a card is moved from inPlay to inPlay (controller change, for example), it is still the same object if ((to == g->players[0]->game->inPlay || to == g->players[1]->game->inPlay) && (from == g->players[0]->game->inPlay || from == g->players[1]->game->inPlay)) { doCopy = 0; + asCopy = true;//don't send zone change event so it will not destroy the GUI when multiple switching of control... + inplaytoinplay = true;//try sending different event... } if (!(copy = from->removeCard(card, doCopy))) @@ -334,6 +375,13 @@ MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone { copy->miracle = true; } + if (card->discarded) + {//set discarded for madness... + if(from == g->players[0]->game->hand || from == g->players[1]->game->hand) + copy->discarded = true; + else//turn off discarded if its previous zone is not in hand... + copy->discarded = false; + } if (options[Options::SFXVOLUME].number > 0) { if (to == g->players[0]->game->graveyard || to == g->players[1]->game->graveyard) @@ -384,9 +432,17 @@ MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone } if(!asCopy) { + if(shufflelibrary) + copy->owner->game->library->shuffle(); + WEvent * e = NEW WEventZoneChange(copy, from, to); g->receiveEvent(e); } + if(inplaytoinplay) + { + WEvent * ep = NEW WEventCardControllerChange(copy); + g->receiveEvent(ep); + } return ret; } @@ -490,7 +546,7 @@ MTGCardInstance * MTGGameZone::removeCard(MTGCardInstance * card, int createCopy copy->kicked = card->kicked; copy->storedCard = card->storedCard; copy->storedSourceCard = card->storedSourceCard; - for (int i = 0; i < ManaCost::MANA_PAID_WITH_SUSPEND +1; i++) + for (int i = 0; i < ManaCost::MANA_PAID_WITH_OVERLOAD +1; i++) copy->alternateCostPaid[i] = card->alternateCostPaid[i]; //stupid bug with tokens... @@ -686,7 +742,7 @@ bool MTGGameZone::hasColor(int value) { for (int i = 0; i < (nb_cards); i++) { - if (cards[i]->getManaCost()->hasColor(value) && cards[i]->getManaCost()->getConvertedCost() > 0) + if (cards[i]->getManaCost()->hasColor(value) && cards[i]->getManaCost()->getConvertedCost() > 0) { return true; } @@ -718,6 +774,18 @@ bool MTGGameZone::hasAbility(int ability) return false; } +bool MTGGameZone::hasAlias(int alias) +{ + for (int i = 0; i < (nb_cards); i++) + { + if (cards[i]->alias == alias) + { + return true; + } + } + return false; +} + int MTGGameZone::seenThisTurn(TargetChooser * tc, int castMethod, bool lastTurn) { //The following 2 lines modify the passed TargetChooser. Call this function with care :/ @@ -1221,6 +1289,10 @@ ostream& operator<<(ostream& out, const MTGPlayerCards& z) out << "hand="; out << *(z.hand) << endl; } + if(z.removedFromGame->cards.size()) { + out << "exile="; + out << *(z.hand) << endl; + } return out; } @@ -1253,6 +1325,11 @@ bool MTGPlayerCards::parseLine(const string& s) battlefield->parseLine(s.substr(limiter+1)); return true; } + else if (areaS.compare("removedfromgame") == 0 || areaS.compare("exile") == 0) + { + removedFromGame->parseLine(s.substr(limiter+1)); + return true; + } } return false; diff --git a/projects/mtg/src/MTGPack.cpp b/projects/mtg/src/MTGPack.cpp index 5e8b53d34..67ed5e4e4 100644 --- a/projects/mtg/src/MTGPack.cpp +++ b/projects/mtg/src/MTGPack.cpp @@ -28,7 +28,7 @@ int MTGPackEntryRandom::addCard(WSrcCards *pool, MTGDeck *to) } int MTGPackEntrySpecific::addCard(WSrcCards *, MTGDeck *to) { - if (!card) + if (!card) return copies; for (int i = 0; i < copies; i++) to->add(card); diff --git a/projects/mtg/src/MTGRules.cpp b/projects/mtg/src/MTGRules.cpp index 0c6e9ec10..5972c999d 100644 --- a/projects/mtg/src/MTGRules.cpp +++ b/projects/mtg/src/MTGRules.cpp @@ -58,8 +58,8 @@ int MTGEventBonus::receiveEvent(WEvent * event) //bonus for chain chain casting without tapping for mana or being interupted; //note gaining mana from other sources is still possible. //only spells going to the stack are counted. - if(game->turn <2)//this shouldnt trigger on first turn, chances are they are cheating. - return 0; + if(game->turn <2)//this shouldnt trigger on first turn, chances are they are cheating. + return 0; if (dynamic_cast(event)) { @@ -284,9 +284,10 @@ int MTGPutInPlayRule::isReactingToClick(MTGCardInstance * card, ManaCost *) { int cardsinhand = game->players[0]->game->hand->nb_cards; Player * player = game->currentlyActing(); - Player * currentPlayer = game->currentPlayer; - if (!player->game->hand->hasCard(card)) - return 0; + if (!player->game->hand->hasCard(card) && !player->game->graveyard->hasCard(card) && !player->game->exile->hasCard(card)) + return 0; + if ((player->game->graveyard->hasCard(card) && !card->has(Constants::CANPLAYFROMGRAVEYARD)) || (player->game->exile->hasCard(card) && !card->has(Constants::CANPLAYFROMEXILE))) + return 0; if ((game->turn < 1) && (cardsinhand != 0) && (card->basicAbilities[(int)Constants::LEYLINE]) && game->getCurrentGamePhase() == MTG_PHASE_FIRSTMAIN && game->players[0]->game->graveyard->nb_cards == 0 @@ -296,7 +297,7 @@ int MTGPutInPlayRule::isReactingToClick(MTGCardInstance * card, ManaCost *) if (card->basicAbilities[(int)Constants::LEYLINE]) { - MTGCardInstance * copy = player->game->putInZone(card, player->game->hand, player->game->temp); + MTGCardInstance * copy = player->game->putInZone(card, card->currentZone, player->game->temp); Spell * spell = NEW Spell(game, copy); spell->resolve(); delete spell; @@ -310,21 +311,17 @@ int MTGPutInPlayRule::isReactingToClick(MTGCardInstance * card, ManaCost *) { if (game->currentActionPlayer->game->playRestrictions->canPutIntoZone(card, game->currentActionPlayer->game->inPlay) == PlayRestriction::CANT_PLAY) return 0; - if (player == currentPlayer - && (game->getCurrentGamePhase() == MTG_PHASE_FIRSTMAIN || game->getCurrentGamePhase() == MTG_PHASE_SECONDMAIN) - ) - { + if (card->StackIsEmptyandSorcerySpeed()) return 1; - } + else + return 0; } - else if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) - || (player == currentPlayer && !game->isInterrupting - && (game->getCurrentGamePhase() == MTG_PHASE_FIRSTMAIN - || game->getCurrentGamePhase() == MTG_PHASE_SECONDMAIN)) - ) + else if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || (card->StackIsEmptyandSorcerySpeed())) { + if(card->controller()->epic) + return 0; - if (game->currentActionPlayer->game->playRestrictions->canPutIntoZone(card, game->currentActionPlayer->game->stack) == PlayRestriction::CANT_PLAY) + if (card->controller()->game->playRestrictions->canPutIntoZone(card, game->currentActionPlayer->game->stack) == PlayRestriction::CANT_PLAY) return 0; ManaCost * playerMana = player->getManaPool(); ManaCost * cost = card->getManaCost(); @@ -417,7 +414,7 @@ int MTGPutInPlayRule::reactToClick(MTGCardInstance * card) delete previousManaPool; if (card->isLand()) { - MTGCardInstance * copy = player->game->putInZone(card, player->game->hand, player->game->temp); + MTGCardInstance * copy = player->game->putInZone(card, card->currentZone, player->game->temp); Spell * spell = NEW Spell(game, 0,copy,NULL,NULL, payResult); spell->resolve(); delete spellCost; @@ -426,7 +423,7 @@ int MTGPutInPlayRule::reactToClick(MTGCardInstance * card) else { Spell * spell = NULL; - MTGCardInstance * copy = player->game->putInZone(card, player->game->hand, player->game->stack); + MTGCardInstance * copy = player->game->putInZone(card, card->currentZone, player->game->stack); if (game->targetChooser) { spell = game->mLayers->stackLayer()->addSpell(copy, game->targetChooser, spellCost, payResult, 0); @@ -480,17 +477,23 @@ int MTGKickerRule::isReactingToClick(MTGCardInstance * card, ManaCost *) if(OptionKicker::KICKER_ALWAYS == options[Options::KICKERPAYMENT].number) return 0; Player * player = game->currentlyActing(); - if(!player->game->hand->hasCard(card)) - return 0; + if (!player->game->hand->hasCard(card) && !player->game->graveyard->hasCard(card) && !player->game->exile->hasCard(card)) + return 0; + if ((player->game->graveyard->hasCard(card) && !card->has(Constants::CANPLAYFROMGRAVEYARD)) || (player->game->exile->hasCard(card) && !card->has(Constants::CANPLAYFROMEXILE))) + return 0; ManaCost * kicker = card->getManaCost()->getKicker(); if(!kicker) { - SAFE_DELETE(kicker); + SAFE_DELETE(kicker); return 0; } ManaCost * playerMana = player->getManaPool(); - ManaCost * withKickerCost= NEW ManaCost(card->getManaCost()); - withKickerCost->add(withKickerCost->getKicker()); + ManaCost * withKickerCost= NEW ManaCost(card->model->data->getManaCost()); + if(card->getIncreasedManaCost()->getConvertedCost()) + withKickerCost->add(card->getIncreasedManaCost()); + if(card->getReducedManaCost()->getConvertedCost()) + withKickerCost->remove(card->getReducedManaCost()); + withKickerCost->add(card->model->data->getManaCost()->getKicker()); if(!playerMana->canAfford(withKickerCost)) { delete withKickerCost; @@ -508,12 +511,16 @@ int MTGKickerRule::reactToClick(MTGCardInstance * card) return 0; Player * player = game->currentlyActing(); - ManaCost * withKickerCost= NEW ManaCost(card->getManaCost());//using pointers here alters the real cost of the card. - if (card->getManaCost()->getKicker()->isMulti) + ManaCost * withKickerCost= NEW ManaCost(card->model->data->getManaCost());//using pointers here alters the real cost of the card. + if(card->getIncreasedManaCost()->getConvertedCost()) + withKickerCost->add(card->getIncreasedManaCost()); + if(card->getReducedManaCost()->getConvertedCost()) + withKickerCost->remove(card->getReducedManaCost()); + if (card->model->data->getManaCost()->getKicker()->isMulti) { while(player->getManaPool()->canAfford(withKickerCost)) { - withKickerCost->add(withKickerCost->getKicker()); + withKickerCost->add(card->model->data->getManaCost()->getKicker()); card->kicked += 1; } card->kicked -= 1; @@ -523,7 +530,7 @@ int MTGKickerRule::reactToClick(MTGCardInstance * card) } else { - withKickerCost->add(withKickerCost->getKicker()); + withKickerCost->add(card->model->data->getManaCost()->getKicker()); card->paymenttype = MTGAbility::PUT_INTO_PLAY_WITH_KICKER; } if (withKickerCost->isExtraPaymentSet()) @@ -550,7 +557,7 @@ int MTGKickerRule::reactToClick(MTGCardInstance * card) delete previousManaPool; if (card->isLand()) { - MTGCardInstance * copy = player->game->putInZone(card, player->game->hand, player->game->temp); + MTGCardInstance * copy = player->game->putInZone(card, card->currentZone, player->game->temp); Spell * spell = NEW Spell(game, 0,copy,NULL,NULL, ManaCost::MANA_PAID_WITH_KICKER); spell->resolve(); delete spellCost; @@ -559,7 +566,7 @@ int MTGKickerRule::reactToClick(MTGCardInstance * card) else { Spell * spell = NULL; - MTGCardInstance * copy = player->game->putInZone(card, player->game->hand, player->game->stack); + MTGCardInstance * copy = player->game->putInZone(card, card->currentZone, player->game->stack); if (game->targetChooser) { spell = game->mLayers->stackLayer()->addSpell(copy, game->targetChooser, spellCost, ManaCost::MANA_PAID_WITH_KICKER, 0); @@ -620,42 +627,47 @@ PermanentAbility(observer, _id) int MTGAlternativeCostRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana) { - ManaCost * alternateCost = card->getManaCost()->getAlternative(); - if (!game->currentlyActing()->game->hand->hasCard(card)) - return 0; + if (card->alias == 11000) + return 0;//overload has its own rule + ManaCost * alternateCost = card->getManaCost()->getAlternative(); + if (!game->currentlyActing()->game->hand->hasCard(card) && !game->currentlyActing()->game->graveyard->hasCard(card) && !game->currentlyActing()->game->exile->hasCard(card)) + return 0; + if ((game->currentlyActing()->game->graveyard->hasCard(card) && !card->has(Constants::CANPLAYFROMGRAVEYARD)) || (game->currentlyActing()->game->exile->hasCard(card) && !card->has(Constants::CANPLAYFROMEXILE))) + return 0; return isReactingToClick( card, mana, alternateCost ); } int MTGAlternativeCostRule::isReactingToClick(MTGCardInstance * card, ManaCost *, ManaCost *alternateManaCost) { Player * player = game->currentlyActing(); - Player * currentPlayer = game->currentPlayer; if (!alternateManaCost) return 0; if(!allowedToAltCast(card,player)) return 0; - if(card->model->data->getManaCost()->getAlternative() && card->model->data->getManaCost()->getAlternative()->alternativeName.size()) + + if(card->has(Constants::CANPLAYFROMGRAVEYARD)) + alternativeName = "Alternate Cast From Graveyard"; + else if(card->has(Constants::CANPLAYFROMEXILE)) + alternativeName = "Alternate Cast From Exile"; + else if(card->model->data->getManaCost()->getAlternative() && card->model->data->getManaCost()->getAlternative()->alternativeName.size()) alternativeName = card->model->data->getManaCost()->getAlternative()->alternativeName; if (card->isLand()) { if (game->currentActionPlayer->game->playRestrictions->canPutIntoZone(card, game->currentActionPlayer->game->inPlay) == PlayRestriction::CANT_PLAY) return 0; - if (player == currentPlayer - && (game->getCurrentGamePhase() == MTG_PHASE_FIRSTMAIN - || game->getCurrentGamePhase() == MTG_PHASE_SECONDMAIN) - ) + if (card->StackIsEmptyandSorcerySpeed()) return 1; + else + return 0; } - else if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) - || (player == currentPlayer && !game->isInterrupting - && (game->getCurrentGamePhase() == MTG_PHASE_FIRSTMAIN - || game->getCurrentGamePhase() == MTG_PHASE_SECONDMAIN)) - ) + else if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || card->has(Constants::SPELLMASTERY) || card->has(Constants::OFFERING) || (card->StackIsEmptyandSorcerySpeed())) { - if (game->currentActionPlayer->game->playRestrictions->canPutIntoZone(card, game->currentActionPlayer->game->stack) == PlayRestriction::CANT_PLAY) + if(card->controller()->epic) + return 0; + if (card->controller()->game->playRestrictions->canPutIntoZone(card, card->controller()->game->stack) == PlayRestriction::CANT_PLAY) return 0; ManaCost * playerMana = player->getManaPool(); @@ -674,27 +686,32 @@ int MTGAlternativeCostRule::isReactingToClick(MTGCardInstance * card, ManaCost * int MTGAlternativeCostRule::reactToClick(MTGCardInstance * card) { - if ( !isReactingToClick(card)) - return 0; + if ( !isReactingToClick(card)) + return 0; - ManaCost *alternateCost = card->getManaCost()->getAlternative(); - card->paymenttype = MTGAbility::ALTERNATIVE_COST; + ManaCost *alternateCost = card->getManaCost()->getAlternative(); + card->paymenttype = MTGAbility::ALTERNATIVE_COST; return reactToClick(card, alternateCost, ManaCost::MANA_PAID_WITH_ALTERNATIVE); } -int MTGAlternativeCostRule::reactToClick(MTGCardInstance * card, ManaCost *alternateCost, int alternateCostType){ +int MTGAlternativeCostRule::reactToClick(MTGCardInstance * card, ManaCost *alternateCost, int alternateCostType, bool overload){ Player * player = game->currentlyActing(); ManaPool * playerMana = player->getManaPool(); //this handles extra cost payments at the moment a card is played. + if(overload) + card->spellTargetType = ""; + else if(card->model->data->spellTargetType.size()) + card->spellTargetType = card->model->data->spellTargetType; + assert(alternateCost); if (alternateCost->isExtraPaymentSet() ) { if (!game->targetListIsSet(card)) - return 0; - } + return 0; + } else { alternateCost->setExtraCostsAction(this, card); @@ -772,8 +789,10 @@ MTGAlternativeCostRule(observer, _id) int MTGBuyBackRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana) { Player * player = game->currentlyActing(); - if (!player->game->hand->hasCard(card)) - return 0; + if (!player->game->hand->hasCard(card) && !player->game->graveyard->hasCard(card) && !player->game->exile->hasCard(card)) + return 0; + if ((player->game->graveyard->hasCard(card) && !card->has(Constants::CANPLAYFROMGRAVEYARD)) || (player->game->exile->hasCard(card) && !card->has(Constants::CANPLAYFROMEXILE))) + return 0; if(!allowedToCast(card,player)) return 0; return MTGAlternativeCostRule::isReactingToClick( card, mana, card->getManaCost()->getBuyback() ); @@ -1028,21 +1047,19 @@ int MTGMorphCostRule::isReactingToClick(MTGCardInstance * card, ManaCost *) { Player * player = game->currentlyActing(); - Player * currentPlayer = game->currentPlayer; + //Player * currentPlayer = game->currentPlayer; if (!player->game->hand->hasCard(card)) return 0; if (!card->getManaCost()->getMorph()) return 0; if(!allowedToAltCast(card,player)) return 0; + 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) || (player == currentPlayer - && !game->isInterrupting - && (game->getCurrentGamePhase() == MTG_PHASE_FIRSTMAIN - || game->getCurrentGamePhase() == MTG_PHASE_SECONDMAIN)) - ) + if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || (card->StackIsEmptyandSorcerySpeed())) { - if (game->currentActionPlayer->game->playRestrictions->canPutIntoZone(card, game->currentActionPlayer->game->stack) == PlayRestriction::CANT_PLAY) + if (card->controller()->game->playRestrictions->canPutIntoZone(card, card->controller()->game->stack) == PlayRestriction::CANT_PLAY) return 0; ManaCost * playerMana = player->getManaPool(); ManaCost * morph = card->getManaCost()->getMorph(); @@ -1140,46 +1157,118 @@ MTGMorphCostRule * MTGMorphCostRule::clone() const //------------------------------------------------------------------------- //------------------------------------------------------------------------- -MTGPlayFromGraveyardRule::MTGPlayFromGraveyardRule(GameObserver* observer, int _id) : +MTGPayZeroRule::MTGPayZeroRule(GameObserver* observer, int _id) : MTGAlternativeCostRule(observer, _id) { - aType = MTGAbility::PUT_INTO_PLAY; + aType = MTGAbility::PAYZERO_COST; } -int MTGPlayFromGraveyardRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana) +int MTGPayZeroRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana) { + if(!card->has(Constants::PAYZERO)) + return 0; Player * player = game->currentlyActing(); - ManaCost * cost = card->getManaCost(); + ManaCost * cost = NEW ManaCost(ManaCost::parseManaCost("{0}",NULL,NULL)); + if(card->getIncreasedManaCost()->getConvertedCost()) + cost->add(card->getIncreasedManaCost()); + if(card->getReducedManaCost()->getConvertedCost()) + cost->remove(card->getReducedManaCost()); - if (!player->game->graveyard->hasCard(card)) + if(card->isLand()) return 0; - if (!card->has(Constants::CANPLAYFROMGRAVEYARD)) + if (!player->game->graveyard->hasCard(card) && !player->game->exile->hasCard(card) && !player->game->hand->hasCard(card)) return 0; - + if ((!card->has(Constants::CANPLAYFROMGRAVEYARD) && player->game->graveyard->hasCard(card))||(!card->has(Constants::CANPLAYFROMEXILE) && player->game->exile->hasCard(card))) + return 0; + if(card->has(Constants::CANPLAYFROMGRAVEYARD)) + CustomName = "Zero Cast From Graveyard"; + else if(card->has(Constants::CANPLAYFROMEXILE)) + CustomName = "Zero Cast From Exile"; + else + CustomName = "Zero Cast From Anywhere"; + return MTGAlternativeCostRule::isReactingToClick(card, mana, cost); } -int MTGPlayFromGraveyardRule::reactToClick(MTGCardInstance * card) +int MTGPayZeroRule::reactToClick(MTGCardInstance * card) { if (!isReactingToClick(card)) return 0; - ManaCost * cost = card->getManaCost(); + ManaCost * cost = NEW ManaCost(ManaCost::parseManaCost("{0}",NULL,NULL)); + if(card->getIncreasedManaCost()->getConvertedCost()) + cost->add(card->getIncreasedManaCost()); + if(card->getReducedManaCost()->getConvertedCost()) + cost->remove(card->getReducedManaCost()); - card->paymenttype = MTGAbility::PUT_INTO_PLAY; + card->paymenttype = MTGAbility::PAYZERO_COST; return MTGAlternativeCostRule::reactToClick(card, cost, ManaCost::MANA_PAID); } -ostream& MTGPlayFromGraveyardRule::toString(ostream& out) const +ostream& MTGPayZeroRule::toString(ostream& out) const { - out << "MTGPlayFromGraveyardRule ::: ("; + out << "MTGPayZeroRule ::: ("; return MTGAbility::toString(out) << ")"; } -MTGPlayFromGraveyardRule * MTGPlayFromGraveyardRule::clone() const +MTGPayZeroRule * MTGPayZeroRule::clone() const { - return NEW MTGPlayFromGraveyardRule(*this); + return NEW MTGPayZeroRule(*this); +} + +MTGOverloadRule::MTGOverloadRule(GameObserver* observer, int _id) : +MTGAlternativeCostRule(observer, _id) +{ + aType = MTGAbility::OVERLOAD_COST; +} + +int MTGOverloadRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana) +{ + if (card->alias != 11000) + return 0; + Player * player = game->currentlyActing(); + ManaCost * cost = NEW ManaCost(card->model->data->getManaCost()->getAlternative()); + if(card->getIncreasedManaCost()->getConvertedCost()) + cost->add(card->getIncreasedManaCost()); + if(card->getReducedManaCost()->getConvertedCost()) + cost->remove(card->getReducedManaCost()); + + if (card->isLand()) + return 0; + if (!player->game->graveyard->hasCard(card) && !player->game->exile->hasCard(card) && !player->game->hand->hasCard(card)) + return 0; + if ((!card->has(Constants::CANPLAYFROMGRAVEYARD) && player->game->graveyard->hasCard(card))||(!card->has(Constants::CANPLAYFROMEXILE) && player->game->exile->hasCard(card))) + return 0; + + return MTGAlternativeCostRule::isReactingToClick(card, mana, cost); +} + +int MTGOverloadRule::reactToClick(MTGCardInstance * card) +{ + if (!isReactingToClick(card)) + return 0; + + ManaCost * cost = NEW ManaCost(card->model->data->getManaCost()->getAlternative()); + if(card->getIncreasedManaCost()->getConvertedCost()) + cost->add(card->getIncreasedManaCost()); + if(card->getReducedManaCost()->getConvertedCost()) + cost->remove(card->getReducedManaCost()); + + card->paymenttype = MTGAbility::OVERLOAD_COST; + + return MTGAlternativeCostRule::reactToClick(card, cost, ManaCost::MANA_PAID_WITH_OVERLOAD, true); +} + +ostream& MTGOverloadRule::toString(ostream& out) const +{ + out << "MTGOverloadRule ::: ("; + return MTGAbility::toString(out) << ")"; +} + +MTGOverloadRule * MTGOverloadRule::clone() const +{ + return NEW MTGOverloadRule(*this); } /////////////////////////////////////////////////////////////////////////////////////////////////// @@ -1409,6 +1498,7 @@ int MTGCombatTriggersRule::receiveEvent(WEvent *e) if (card && card->isAttacker()) { card->eventattacked(); + card->controller()->raidcount += 1; } } } @@ -1728,7 +1818,7 @@ int MTGMomirRule::reactToClick(MTGCardInstance * card_to_discard, int cardId) ManaCost * cost = player->getManaPool(); player->getManaPool()->pay(cost); MTGCardInstance * card = genCreature(cardId); - player->game->putInZone(card_to_discard, player->game->hand, player->game->graveyard); + player->game->putInZone(card_to_discard, card_to_discard->currentZone, player->game->graveyard); player->game->stack->addCard(card); Spell * spell = NEW Spell(game, card); @@ -1822,7 +1912,7 @@ MTGStoneHewerRule::MTGStoneHewerRule(GameObserver* observer, int _id, MTGAllCard for (size_t i = 0; i < collection->ids.size(); i++) { MTGCard * card = collection->collection[collection->ids[i]]; - if (card->data->hasSubtype("equipment") && (card->getRarity() != Constants::RARITY_T) && //remove tokens + if (card->data->hasSubtype("equipment") && (card->getRarity() != Constants::RARITY_T) && //remove tokens card->setId != MTGSets::INTERNAL_SET //remove cards that are defined in primitives. Those are workarounds (usually tokens) and should only be used internally ) { @@ -1838,32 +1928,32 @@ MTGStoneHewerRule::MTGStoneHewerRule(GameObserver* observer, int _id, MTGAllCard int MTGStoneHewerRule::receiveEvent(WEvent * event) { - WEventZoneChange * e = (WEventZoneChange *) event; - if (e->to == game->currentlyActing()->game->inPlay && e->card->isCreature()) - { - int eId = genRandomEquipId(e->card->getManaCost()->getConvertedCost()); - MTGCardInstance * card = genEquip(eId); - if(card) - { - game->currentlyActing()->game->temp->addCard(card); + WEventZoneChange * e = (WEventZoneChange *) event; + if (e->to == game->currentlyActing()->game->inPlay && e->card->isCreature()) + { + int eId = genRandomEquipId(e->card->getManaCost()->getConvertedCost()); + MTGCardInstance * card = genEquip(eId); + if(card) + { + game->currentlyActing()->game->temp->addCard(card); Spell * spell = NEW Spell(game, card); - spell->resolve(); - spell->source->isToken = 1; + spell->resolve(); + spell->source->isToken = 1; for (size_t i = 1; i < game->mLayers->actionLayer()->mObjects.size(); i++) - { + { MTGAbility * a = ((MTGAbility *) game->mLayers->actionLayer()->mObjects[i]); - AEquip * eq = dynamic_cast (a); - if (eq && eq->source == spell->source) - { - ((AEquip*)a)->unequip(); - ((AEquip*)a)->equip(e->card); - } - } - SAFE_DELETE(spell); - } - return 1; - } - return 0; + AEquip * eq = dynamic_cast (a); + if (eq && eq->source == spell->source) + { + ((AEquip*)a)->unequip(); + ((AEquip*)a)->equip(e->card); + } + } + SAFE_DELETE(spell); + } + return 1; + } + return 0; } MTGCardInstance * MTGStoneHewerRule::genEquip(int id) @@ -1877,8 +1967,8 @@ MTGCardInstance * MTGStoneHewerRule::genEquip(int id) int MTGStoneHewerRule::genRandomEquipId(int convertedCost) { - if (convertedCost >= 20) - convertedCost = 19; + if (convertedCost >= 20) + convertedCost = 19; int total_cards = 0; int i = (game->getRandomGenerator()->random() % int(convertedCost+1));//+1 becuase we want to generate a random "<=" the coverted. while (!total_cards && i >= 0) @@ -1914,29 +2004,29 @@ PermanentAbility(observer, _id) int MTGHermitRule::receiveEvent(WEvent * event) { - WEventPhaseChange * e = dynamic_cast(event); + WEventPhaseChange * e = dynamic_cast(event); if (e && e->from->id == MTG_PHASE_UNTAP) - { - MTGCardInstance * lcard = NULL; - vectorlands = vector(); - for(int i = 0; i < game->currentPlayer->game->library->nb_cards-1; i++) - { - MTGCardInstance * temp = game->currentPlayer->game->library->cards[i]; - if(temp && temp->isLand()) - lands.push_back(temp); - } - if(lands.size()) + { + MTGCardInstance * lcard = NULL; + vectorlands = vector(); + for(int i = 0; i < game->currentPlayer->game->library->nb_cards-1; i++) + { + MTGCardInstance * temp = game->currentPlayer->game->library->cards[i]; + if(temp && temp->isLand()) + lands.push_back(temp); + } + if(lands.size()) lcard = lands[game->getRandomGenerator()->random() % lands.size()]; - if(lcard) - { - MTGCardInstance * copy = game->currentPlayer->game->putInZone(lcard,game->currentPlayer->game->library, game->currentPlayer->game->temp); + if(lcard) + { + MTGCardInstance * copy = game->currentPlayer->game->putInZone(lcard,game->currentPlayer->game->library, game->currentPlayer->game->temp); Spell * spell = NEW Spell(game, copy); spell->resolve(); delete spell; - } - return 1; - } - return 0; + } + return 1; + } + return 0; } MTGHermitRule * MTGHermitRule::clone() const @@ -2287,6 +2377,10 @@ int MTGPersistRule::receiveEvent(WEvent * event) if (e->from == p->game->inPlay) ok = 1; } + if (card->owner->game->battlefield->hasAbility(Constants::MYGRAVEEXILER)||card->owner->opponent()->game->battlefield->hasAbility(Constants::OPPGRAVEEXILER)) + ok = 0; + if ((card->owner->game->battlefield->hasAbility(Constants::MYGCREATUREEXILER)||card->owner->opponent()->game->battlefield->hasAbility(Constants::OPPGCREATUREEXILER))&&(card->isCreature())) + ok = 0; if (!ok) return 0; @@ -2295,19 +2389,28 @@ int MTGPersistRule::receiveEvent(WEvent * event) Player * p = game->players[i]; if (e->to == p->game->graveyard) { - MTGCardInstance * copy = p->game->putInZone(e->card, p->game->graveyard, e->card->owner->game->temp); + MTGCardInstance * copy = e->card; if (!copy) { DebugTrace("MTGRULES: couldn't move card for persist/undying"); return 0; } - Spell * spell = NEW Spell(game, copy); - spell->resolve(); + string code = ""; + bool persist = false; + bool undying = false; if(card->basicAbilities[(int)Constants::PERSIST]) - spell->source->counters->addCounter(-1, -1); + { + code = "Persist"; + persist = true; + } else - spell->source->counters->addCounter(1,1); - delete spell; + { + code = "Undying"; + undying = true; + } + AAMover *putinplay = NEW AAMover(game, game->mLayers->actionLayer()->getMaxId(), copy, copy,"ownerbattlefield",code,NULL,undying,persist); + putinplay->oneShot = true; + putinplay->fireAbility(); return 1; } } @@ -2529,20 +2632,18 @@ int MTGLegendRule::added(MTGCardInstance * card) MultiAbility * multi = NEW MultiAbility(game, game->mLayers->actionLayer()->getMaxId(), card, card, NULL); for(unsigned int i = 0;i < oldCards.size();i++) { - AABuryCard *a = NEW AABuryCard(game, game->mLayers->actionLayer()->getMaxId(), card, oldCards[i]); - a->menu = "Keep New"; + AAMover *a = NEW AAMover(game, game->mLayers->actionLayer()->getMaxId(), card, oldCards[i],"ownergraveyard","Keep New"); a->oneShot = true; multi->Add(a); } multi->oneShot = 1; MTGAbility * a1 = multi; selection.push_back(a1); - AABuryCard *b = NEW AABuryCard(game, game->mLayers->actionLayer()->getMaxId(), card, card); - b->menu = "Keep Old"; + AAMover *b = NEW AAMover(game, game->mLayers->actionLayer()->getMaxId(), card, card,"ownergraveyard","Keep Old"); b->oneShot = true; MTGAbility * b1 = b; selection.push_back(b1); - MTGAbility * menuChoice = NEW MenuAbility(game, game->mLayers->actionLayer()->getMaxId(), card, card,true,selection,card->controller(),"Choose Legend"); + MTGAbility * menuChoice = NEW MenuAbility(game, game->mLayers->actionLayer()->getMaxId(), card, card,true,selection,card->controller(),"Legendary Rule"); menuChoice->addToGame(); } return 1; @@ -2606,20 +2707,18 @@ int MTGPlaneWalkerRule::added(MTGCardInstance * card) MultiAbility * multi = NEW MultiAbility(game,game->mLayers->actionLayer()->getMaxId(), card, card, NULL); for(unsigned int i = 0;i < oldCards.size();i++) { - AABuryCard *a = NEW AABuryCard(game, game->mLayers->actionLayer()->getMaxId(), card, oldCards[i]); - a->menu = "Keep New"; + AAMover *a = NEW AAMover(game, game->mLayers->actionLayer()->getMaxId(), card, oldCards[i],"ownergraveyard","Keep New"); a->oneShot = true; multi->Add(a); } multi->oneShot = 1; MTGAbility * a1 = multi; selection.push_back(a1); - AABuryCard *b = NEW AABuryCard(game, game->mLayers->actionLayer()->getMaxId(), card, card); - b->menu = "Keep Old"; + AAMover *b = NEW AAMover(game, game->mLayers->actionLayer()->getMaxId(), card, card,"ownergraveyard","Keep Old"); b->oneShot = true; MTGAbility * b1 = b; selection.push_back(b1); - MTGAbility * menuChoice = NEW MenuAbility(game, game->mLayers->actionLayer()->getMaxId(), card, card,true,selection,card->controller(),"Choose Planeswalker"); + MTGAbility * menuChoice = NEW MenuAbility(game, game->mLayers->actionLayer()->getMaxId(), card, card,true,selection,card->controller(),"Planeswalker Rule"); menuChoice->addToGame(); } return 1; @@ -2701,7 +2800,7 @@ int MTGLifelinkRule::receiveEvent(WEvent * event) WEventDamage * e = (WEventDamage *) event; Damage * d = e->damage; MTGCardInstance * card = d->source; - if (d->damage > 0 && card && card->basicAbilities[(int)Constants::LIFELINK]) + if (d->damage > 0 && card && (card->basicAbilities[(int)Constants::LIFELINK]||card->LKIbasicAbilities[(int)Constants::LIFELINK])) { card->controller()->gainLife(d->damage); return 1; @@ -2745,7 +2844,7 @@ int MTGDeathtouchRule::receiveEvent(WEvent * event) return 0; MTGCardInstance * _target = (MTGCardInstance *) (d->target); - if (card->basicAbilities[(int)Constants::DEATHTOUCH]) + if (card->basicAbilities[(int)Constants::DEATHTOUCH]||card->LKIbasicAbilities[(int)Constants::DEATHTOUCH]) { _target->destroy(); return 1; diff --git a/projects/mtg/src/ManaCost.cpp b/projects/mtg/src/ManaCost.cpp index 4c0b0a2e3..df9446c67 100644 --- a/projects/mtg/src/ManaCost.cpp +++ b/projects/mtg/src/ManaCost.cpp @@ -94,7 +94,7 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan } //switch on the first letter. If two costs share their first letter, add an "if" within the switch - std::transform(value.begin(), value.end(), value.begin(), ::tolower); + std::transform(value.begin(), value.end(), value.begin(), ::tolower); switch (value[0]) { case 'x': @@ -193,6 +193,33 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan manaCost->addExtraCost(NEW Ninja(tc)); break; } + case 'k': //kill offering + { + TargetChooserFactory tcf(g); + if (value == "kgoblin") + { + tc = tcf.createTargetChooser("creature[goblin]|myBattlefield", c); + } + else if (value == "kfox") + { + tc = tcf.createTargetChooser("creature[fox]|myBattlefield", c); + } + else if (value == "kmoonfolk") + { + tc = tcf.createTargetChooser("creature[moonfolk]|myBattlefield", c); + } + else if (value == "krat") + { + tc = tcf.createTargetChooser("creature[rat]|myBattlefield", c); + } + else if (value == "ksnake") + { + tc = tcf.createTargetChooser("creature[snake]|myBattlefield", c); + } + //TODO iterate subtypes of creatures + manaCost->addExtraCost(NEW Offering(tc)); + break; + } case 'p' : { SAFE_DELETE(tc); @@ -668,7 +695,7 @@ ManaCostHybrid * ManaCost::getHybridCost(unsigned int i) ExtraCost * ManaCost::getExtraCost(unsigned int i) { if(extraCosts && extraCosts->costs.size()) - { + { if (extraCosts->costs.size() <= i) return NULL; return extraCosts->costs[i]; @@ -1028,7 +1055,7 @@ ostream& operator<<(ostream& out, ManaCost m) void ManaPool::Empty() { - SAFE_DELETE(extraCosts); + SAFE_DELETE(extraCosts); SAFE_DELETE(kicker); SAFE_DELETE(alternative); SAFE_DELETE(BuyBack); diff --git a/projects/mtg/src/ModRules.cpp b/projects/mtg/src/ModRules.cpp index a39c99bc9..102f35b87 100644 --- a/projects/mtg/src/ModRules.cpp +++ b/projects/mtg/src/ModRules.cpp @@ -301,12 +301,12 @@ ModRulesRenderCardGuiItem::ModRulesRenderCardGuiItem(string name, int posX, int mFormattedData = formattedData; mFilter = filter; mFontSize = fontSize; - mFont = font; + mFont = font; mFontColor = fontColor; mSizeIcon = SizeIcon; - mIconPosX = IconPosX; - mIconPosY = IconPosY; - mFileName = FileName; + mIconPosX = IconPosX; + mIconPosY = IconPosY; + mFileName = FileName; } @@ -318,12 +318,12 @@ void ModRulesCardGui::parse(TiXmlElement* element) string _FormattedText; string _Filter; int _FontSize; - bool _Font; - PIXEL_TYPE _FontColor; - int _SizeIcon; - int _IconPosX; - int _IconPosY; - string _FileName; + bool _Font; + PIXEL_TYPE _FontColor; + int _SizeIcon; + int _IconPosX; + int _IconPosY; + string _FileName; @@ -353,12 +353,12 @@ void ModRulesCardGui::parse(TiXmlElement* element) _FormattedText = ""; _Filter = ""; _FontSize = 0; - _Font = false; + _Font = false; _FontColor = 0; _SizeIcon = 0; - _IconPosX = 0; - _IconPosY = 0 ; - _FileName = ""; + _IconPosX = 0; + _IconPosY = 0 ; + _FileName = ""; TiXmlElement* ItemElement = node->ToElement(); @@ -379,11 +379,11 @@ void ModRulesCardGui::parse(TiXmlElement* element) } ChildNode = ItemElement->FirstChild("font"); - if (ChildNode) { - _Font = true; - _FontSize = atoi(ChildNode->ToElement()->Attribute("size")); - vector argb = split( ChildNode->ToElement()->Attribute("color"), ','); - _FontColor = ARGB( + if (ChildNode) { + _Font = true; + _FontSize = atoi(ChildNode->ToElement()->Attribute("size")); + vector argb = split( ChildNode->ToElement()->Attribute("color"), ','); + _FontColor = ARGB( atoi(argb[0].c_str()), atoi(argb[1].c_str()), atoi(argb[2].c_str()), @@ -392,7 +392,7 @@ void ModRulesCardGui::parse(TiXmlElement* element) } ChildNode = ItemElement->FirstChild("iconposition"); - if (ChildNode) { + if (ChildNode) { _IconPosX = atoi(ChildNode->ToElement()->Attribute("x")); _IconPosY = atoi(ChildNode->ToElement()->Attribute("y")); } @@ -408,7 +408,7 @@ void ModRulesCardGui::parse(TiXmlElement* element) } - + renderbig.push_back(NEW ModRulesRenderCardGuiItem( _Name, _Posx, _Posy, _FormattedText, _Filter,_Font, _FontSize, _FontColor,_SizeIcon,_IconPosX,_IconPosY,_FileName )); } } @@ -423,12 +423,12 @@ void ModRulesCardGui::parse(TiXmlElement* element) _FormattedText = ""; _Filter = ""; _FontSize = 0; - _Font = false; + _Font = false; _FontColor = 0; _SizeIcon = 0; - _IconPosX = 0; - _IconPosY = 0 ; - _FileName = ""; + _IconPosX = 0; + _IconPosY = 0 ; + _FileName = ""; TiXmlElement* ItemElement = node->ToElement(); @@ -449,11 +449,11 @@ void ModRulesCardGui::parse(TiXmlElement* element) } ChildNode = ItemElement->FirstChild("font"); - if (ChildNode) { - _Font = true; - _FontSize = atoi(ChildNode->ToElement()->Attribute("size")); - vector argb = split( ChildNode->ToElement()->Attribute("color"), ','); - _FontColor = ARGB( + if (ChildNode) { + _Font = true; + _FontSize = atoi(ChildNode->ToElement()->Attribute("size")); + vector argb = split( ChildNode->ToElement()->Attribute("color"), ','); + _FontColor = ARGB( atoi(argb[0].c_str()), atoi(argb[1].c_str()), atoi(argb[2].c_str()), @@ -462,7 +462,7 @@ void ModRulesCardGui::parse(TiXmlElement* element) } ChildNode = ItemElement->FirstChild("iconposition"); - if (ChildNode) { + if (ChildNode) { _IconPosX = atoi(ChildNode->ToElement()->Attribute("x")); _IconPosY = atoi(ChildNode->ToElement()->Attribute("y")); } @@ -478,7 +478,7 @@ void ModRulesCardGui::parse(TiXmlElement* element) } - + rendertinycrop.push_back(NEW ModRulesRenderCardGuiItem( _Name, _Posx, _Posy, _FormattedText, _Filter,_Font, _FontSize, _FontColor,_SizeIcon,_IconPosX,_IconPosY,_FileName )); } } diff --git a/projects/mtg/src/Player.cpp b/projects/mtg/src/Player.cpp index 2792c5a11..8c4b7ca30 100644 --- a/projects/mtg/src/Player.cpp +++ b/projects/mtg/src/Player.cpp @@ -33,6 +33,9 @@ Player::Player(GameObserver *observer, string file, string fileSmall, MTGDeck * skippingTurn = 0; extraTurn = 0; drawCounter = 0; + epic = 0; + raidcount = 0; + handmodifier = 0; prowledTypes.clear(); doesntEmpty = NEW ManaCost(); poolDoesntEmpty = NEW ManaCost(); @@ -88,7 +91,7 @@ bool Player::loadAvatar(string file, string resName) } mAvatarTex = rm->RetrieveTexture(file, RETRIEVE_LOCK, TEXTURE_SUB_AVATAR); if (mAvatarTex) { - mAvatar = rm->RetrieveQuad(file, 0, 0, 35, 50, resName, RETRIEVE_NORMAL, TEXTURE_SUB_AVATAR); + mAvatar = rm->RetrieveQuad(file, 0, 0, 0, 0, resName, RETRIEVE_NORMAL, TEXTURE_SUB_AVATAR); return true; } @@ -146,6 +149,8 @@ int Player::gainOrLoseLife(int value) { if (!value) return 0; //Don't do anything if there's no actual life change + if (value>0 && (opponent()->game->battlefield->hasAbility(Constants::NOLIFEGAINOPPONENT)||game->battlefield->hasAbility(Constants::NOLIFEGAIN)))//nolifegain + return 0; thatmuch = abs(value); //the value that much is a variable to be used with triggered abilities. //ie:when ever you gain life, draw that many cards. when used in a trigger draw:thatmuch, will return the value @@ -217,6 +222,70 @@ void Player::takeMulligan() //Draw hand with 1 less card penalty //almhum } +void Player::serumMulligan() +{ + MTGPlayerCards * currentPlayerZones = game; + int cardsinhand = currentPlayerZones->hand->nb_cards; + for (int i = 0; i < cardsinhand; i++) //Exile + currentPlayerZones->putInZone(currentPlayerZones->hand->cards[0], + currentPlayerZones->hand, + currentPlayerZones->exile); + + currentPlayerZones->library->shuffle(); //Shuffle + + for (int i = 0; i < (cardsinhand); i++) + game->drawFromLibrary(); + //Draw hand no penalty +} + +bool Player::DeadLifeState(bool check) +{ + if ((life <= 0)||(poisonCount >= 10)) + { + int cantlosers = 0; + MTGGameZone * z = game->inPlay; + int nbcards = z->nb_cards; + for (int j = 0; j < nbcards; ++j) + { + MTGCardInstance * c = z->cards[j]; + if (c->has(Constants::CANTLOSE) || (c->has(Constants::CANTLIFELOSE) && poisonCount < 10)) + { + cantlosers++; + } + } + MTGGameZone * k = opponent()->game->inPlay; + int onbcards = k->nb_cards; + for (int m = 0; m < onbcards; ++m) + { + MTGCardInstance * e = k->cards[m]; + if (e->has(Constants::CANTWIN)) + { + cantlosers++; + } + } + if (cantlosers < 1) + { + if(!check) + { + ActionStack * stack = getObserver()->mLayers->stackLayer(); + for (int i = stack->mObjects.size() - 1; i >= 0; i--) + { + Interruptible * current = ((Interruptible *) stack->mObjects[i]); + Spell * spell = (Spell *) current; + if (current->type == ACTION_SPELL) + spell->source->controller()->game->putInGraveyard(spell->source); + + current->state = RESOLVED_NOK; + } + } + if(check) + game->owner->getObserver()->setLoser(this); + return true; + } + } + return false; +} + //Cleanup phase at the end of a turn void Player::cleanupPhase() { @@ -251,7 +320,7 @@ bool Player::parseLine(const string& s) } else if (areaS.compare("mode") == 0) { - this->playMode = (Player::Mode)atoi(s.substr(limiter + 1).c_str()); + this->playMode = (Player::Mode)atoi(s.substr(limiter + 1).c_str()); return true; } else if (areaS.compare("avatar") == 0) @@ -337,12 +406,12 @@ ostream& operator<<(ostream& out, const Player& p) { out << "mode=" << p.playMode << endl; out << *(Damageable*)&p; - if(p.manaPool) - { - string manapoolstring = p.manaPool->toString(); - if(manapoolstring != "") - out << "manapool=" << manapoolstring << endl; - } + if(p.manaPool) + { + string manapoolstring = p.manaPool->toString(); + if(manapoolstring != "") + out << "manapool=" << manapoolstring << endl; + } if(p.mAvatarName != "") out << "avatar=" << p.mAvatarName << endl; if(p.phaseRing != "") diff --git a/projects/mtg/src/Rules.cpp b/projects/mtg/src/Rules.cpp index b6e5e4d56..80bf52ab2 100644 --- a/projects/mtg/src/Rules.cpp +++ b/projects/mtg/src/Rules.cpp @@ -18,9 +18,9 @@ vector Rules::RulesList = vector(); //Sorting by displayName struct RulesMenuCmp{ - bool operator()(const Rules * a,const Rules * b) const{ + bool operator()(const Rules * a,const Rules * b) const{ return a->displayName < b->displayName; - } + } } RulesMenuCmp_; Rules * Rules::getRulesByFilename(string _filename) @@ -79,8 +79,8 @@ MTGCardInstance * Rules::getCardByMTGId(GameObserver* g, int mtgid) for (int i = 0; i < 2; i++) { Player * p = g->players[i]; - MTGGameZone * zones[] = { p->game->library, p->game->hand, p->game->inPlay, p->game->graveyard }; - for (int j = 0; j < 4; j++) + MTGGameZone * zones[] = { p->game->library, p->game->hand, p->game->inPlay, p->game->graveyard, p->game->exile }; + for (int j = 0; j < 5; j++) { MTGGameZone * zone = zones[j]; for (int k = 0; k < zone->nb_cards; k++) @@ -340,9 +340,10 @@ MTGDeck * Rules::buildDeck(int playerId) MTGGameZone * loadedPlayerZones[] = { initState.playerData[playerId].player->game->graveyard, initState.playerData[playerId].player->game->library, initState.playerData[playerId].player->game->hand, - initState.playerData[playerId].player->game->inPlay }; + initState.playerData[playerId].player->game->inPlay, + initState.playerData[playerId].player->game->exile }; - for (int j = 0; j < 4; j++) + for (int j = 0; j < 5; j++) { for (size_t k = 0; k < loadedPlayerZones[j]->cards.size(); k++) { @@ -390,12 +391,12 @@ void Rules::initGame(GameObserver *g, bool currentPlayerSet) if(OptionWhosFirst::WHO_O == options[Options::FIRSTPLAYER].number) initState.player = 1; } - if(!currentPlayerSet) - { - g->currentPlayerId = initState.player; - } - g->currentPlayer = g->players[g->currentPlayerId]; - g->currentActionPlayer = g->currentPlayer; + if(!currentPlayerSet) + { + g->currentPlayerId = initState.player; + } + g->currentPlayer = g->players[g->currentPlayerId]; + g->currentActionPlayer = g->currentPlayer; g->phaseRing->goToPhase(0, g->currentPlayer, false); g->phaseRing->goToPhase(initState.phase, g->currentPlayer); g->setCurrentGamePhase(initState.phase); @@ -404,6 +405,7 @@ void Rules::initGame(GameObserver *g, bool currentPlayerSet) { Player * p = g->players[i]; p->life = initState.playerData[i].player->life; + p->initLife = initState.playerData[i].player->life; p->poisonCount = initState.playerData[i].player->poisonCount; p->damageCount = initState.playerData[i].player->damageCount; p->preventable = initState.playerData[i].player->preventable; @@ -411,12 +413,13 @@ void Rules::initGame(GameObserver *g, bool currentPlayerSet) { p->mAvatarName = initState.playerData[i].player->mAvatarName; } - MTGGameZone * playerZones[] = { p->game->graveyard, p->game->library, p->game->hand, p->game->inPlay }; + MTGGameZone * playerZones[] = { p->game->graveyard, p->game->library, p->game->hand, p->game->inPlay, p->game->exile }; MTGGameZone * loadedPlayerZones[] = { initState.playerData[i].player->game->graveyard, initState.playerData[i].player->game->library, initState.playerData[i].player->game->hand, - initState.playerData[i].player->game->inPlay }; - for (int j = 0; j < 4; j++) + initState.playerData[i].player->game->inPlay, + initState.playerData[i].player->game->exile }; + for (int j = 0; j < 5; j++) { MTGGameZone * zone = playerZones[j]; for (size_t k = 0; k < loadedPlayerZones[j]->cards.size(); k++) @@ -620,7 +623,7 @@ GameType Rules::strToGameMode(string s) if (s.compare("random1") == 0) return GAME_TYPE_RANDOM1; if (s.compare("random2") == 0) return GAME_TYPE_RANDOM2; if (s.compare("story") == 0) return GAME_TYPE_STORY; - if (s.compare("stonehewer") == 0) return GAME_TYPE_STONEHEWER; - if (s.compare("hermit") == 0) return GAME_TYPE_HERMIT; + if (s.compare("stonehewer") == 0) return GAME_TYPE_STONEHEWER; + if (s.compare("hermit") == 0) return GAME_TYPE_HERMIT; return GAME_TYPE_CLASSIC; } diff --git a/projects/mtg/src/SimpleButton.cpp b/projects/mtg/src/SimpleButton.cpp index 9fabd7eac..3e4bdd026 100644 --- a/projects/mtg/src/SimpleButton.cpp +++ b/projects/mtg/src/SimpleButton.cpp @@ -42,7 +42,7 @@ JGuiObject(id), mX(x), mY(y), parent(_parent), mFontId(fontId) mXOffset = mX; - if (hasFocus) + if (hasFocus) { setIsSelectionValid(true); Entering(); diff --git a/projects/mtg/src/SimpleMenu.cpp b/projects/mtg/src/SimpleMenu.cpp index 8fb514185..eef34a2f1 100644 --- a/projects/mtg/src/SimpleMenu.cpp +++ b/projects/mtg/src/SimpleMenu.cpp @@ -144,7 +144,7 @@ void SimpleMenu::Render() float scaleFactor = titleFont->GetScale(); titleFont->SetScale(SCALE_NORMAL); if ((!title.empty()) && (mWidth < titleFont->GetStringWidth(title.c_str()))) - mWidth = titleFont->GetStringWidth(title.c_str()); + mWidth = titleFont->GetStringWidth(title.c_str()); titleFont->SetScale(scaleFactor); mWidth += 2 * SimpleMenuConst::kHorizontalMargin; diff --git a/projects/mtg/src/SimplePad.cpp b/projects/mtg/src/SimplePad.cpp index f9d492c61..3f472657f 100644 --- a/projects/mtg/src/SimplePad.cpp +++ b/projects/mtg/src/SimplePad.cpp @@ -355,10 +355,9 @@ void SimplePad::Render() //This could use some cleaning up to make margins more explicit WFont * mFont = WResourceManager::Instance()->GetWFont(Fonts::MENU_FONT); - float offX = 0, offY = 0; + float offY = 0; float kH = mFont->GetHeight(); float hSpacing = mFont->GetStringWidth("W"); - float rowLen = mFont->GetStringWidth("JKLMNOPQR") + 14 * 7; float vSpacing = 0; float kW = hSpacing; @@ -401,7 +400,9 @@ void SimplePad::Render() if (!bShowNumpad) vSpacing -= kH + 12; #ifndef IOS - + float offX = 0; + float rowLen = mFont->GetStringWidth("JKLMNOPQR") + 14 * 7; + for (int x = 0; x < nbitems; x++) if (keys[x]) { diff --git a/projects/mtg/src/SimplePopup.cpp b/projects/mtg/src/SimplePopup.cpp index e8cccf5e4..0640dce45 100644 --- a/projects/mtg/src/SimplePopup.cpp +++ b/projects/mtg/src/SimplePopup.cpp @@ -19,7 +19,7 @@ SimplePopup::SimplePopup(int id, JGuiListener* listener, const int fontId, const { mX = 19; mY = 66; - mWidth = 180.0f; + mWidth = 180.0f; mTitle = _title; mMaxLines = 12; @@ -41,11 +41,11 @@ void SimplePopup::Render() const float textHeight = mTextFont->GetHeight() * mMaxLines; r->FillRoundRect(mX, mY + 2, mWidth + 11, textHeight - 12, 2.0f, ARGB( 255, 0, 0, 0 ) ); - // currently causes a crash on the PSP when drawing the corners. - // TODO: clean up the image ot make it loook cleaner. Find solution to load gfx to not crash PSP + // currently causes a crash on the PSP when drawing the corners. + // TODO: clean up the image ot make it loook cleaner. Find solution to load gfx to not crash PSP #if 0 r->DrawRoundRect(mX, mY + 2, mWidth + 11, textHeight - 12, 2.0f, ARGB( 255, 125, 255, 0) ); - drawBoundingBox( mX-3, mY, mWidth + 3, textHeight ); + drawBoundingBox( mX-3, mY, mWidth + 3, textHeight ); #endif mTextFont->DrawString(detailedInformation.c_str(), mX + 9 , mY + 10); @@ -58,22 +58,22 @@ void SimplePopup::drawBoundingBox( float x, float y, float width, float height ) //draw the corners string topCornerImageName = "top_corner.png"; string bottomCornerImageName = "bottom_corner.png"; - string verticalBarImageName = "vert_bar.png"; + string verticalBarImageName = "vert_bar.png"; string horizontalBarImageName = "top_bar.png"; - const float boxWidth = ( width + 15 ) / 3.0f; - const float boxHeight = ( height + 15 ) / 3.0f; + const float boxWidth = ( width + 15 ) / 3.0f; + const float boxHeight = ( height + 15 ) / 3.0f; - drawHorzPole( horizontalBarImageName, false, false, x, y, boxWidth ); - drawHorzPole( horizontalBarImageName, false, true, x, y + height, boxWidth ); - - drawVertPole( verticalBarImageName, false, false, x, y, boxHeight ); - drawVertPole( verticalBarImageName, true, false, x + width, y, boxHeight ); + drawHorzPole( horizontalBarImageName, false, false, x, y, boxWidth ); + drawHorzPole( horizontalBarImageName, false, true, x, y + height, boxWidth ); + + drawVertPole( verticalBarImageName, false, false, x, y, boxHeight ); + drawVertPole( verticalBarImageName, true, false, x + width, y, boxHeight ); - drawCorner( topCornerImageName, false, false, x, y ); - drawCorner( topCornerImageName, true, false, x + width, y ); - drawCorner( bottomCornerImageName, false, false, x, y + height ); - drawCorner( bottomCornerImageName, true, false, x + width, y + height ); + drawCorner( topCornerImageName, false, false, x, y ); + drawCorner( topCornerImageName, true, false, x + width, y ); + drawCorner( bottomCornerImageName, false, false, x, y + height ); + drawCorner( bottomCornerImageName, true, false, x + width, y + height ); } void SimplePopup::Update(DeckMetaData* selectedDeck) @@ -130,52 +130,52 @@ void SimplePopup::Update(float) // drawing routines void SimplePopup::drawCorner(string imageName, bool flipX, bool flipY, float x, float y) { - LOG(" Drawing a Corner! "); + LOG(" Drawing a Corner! "); JRenderer* r = JRenderer::GetInstance(); JQuadPtr horizontalBarImage = WResourceManager::Instance()->RetrieveTempQuad( imageName, TEXTURE_SUB_5551); - horizontalBarImage->SetHFlip(flipX); - horizontalBarImage->SetVFlip(flipY); + horizontalBarImage->SetHFlip(flipX); + horizontalBarImage->SetVFlip(flipY); - r->RenderQuad(horizontalBarImage.get(), x, y); - LOG(" Done Drawing a Corner! "); + r->RenderQuad(horizontalBarImage.get(), x, y); + LOG(" Done Drawing a Corner! "); } void SimplePopup::drawHorzPole(string imageName, bool flipX = false, bool flipY = false, float x = 0, float y = 0, float width = SCREEN_WIDTH_F) { - LOG(" Drawing a horizontal border! "); + LOG(" Drawing a horizontal border! "); JRenderer* r = JRenderer::GetInstance(); JQuadPtr horizontalBarImage = WResourceManager::Instance()->RetrieveTempQuad( imageName, TEXTURE_SUB_5551); - if ( horizontalBarImage != NULL ) - { - horizontalBarImage->SetHFlip(flipX); - horizontalBarImage->SetVFlip(flipY); + if ( horizontalBarImage != NULL ) + { + horizontalBarImage->SetHFlip(flipX); + horizontalBarImage->SetVFlip(flipY); - r->RenderQuad(horizontalBarImage.get(), x, y, 0, width); - } - else - { - LOG ( "ERROR: Error trying to render horizontal edge! "); - } - LOG(" Done Drawing a horizontal border! "); + r->RenderQuad(horizontalBarImage.get(), x, y, 0, width); + } + else + { + LOG ( "ERROR: Error trying to render horizontal edge! "); + } + LOG(" Done Drawing a horizontal border! "); } void SimplePopup::drawVertPole(string imageName, bool flipX = false, bool flipY = false, float x = 0, float y = 0, float height = SCREEN_HEIGHT_F) { - LOG(" Drawing a Vertical border! "); + LOG(" Drawing a Vertical border! "); JRenderer* r = JRenderer::GetInstance(); JQuadPtr verticalBarImage = WResourceManager::Instance()->RetrieveTempQuad( imageName, TEXTURE_SUB_5551); - if ( verticalBarImage != NULL ) - { - verticalBarImage->SetHFlip(flipX); - verticalBarImage->SetVFlip(flipY); + if ( verticalBarImage != NULL ) + { + verticalBarImage->SetHFlip(flipX); + verticalBarImage->SetVFlip(flipY); - r->RenderQuad(verticalBarImage.get(), x, y, 0, 1.0f, height); - } - else - { - LOG ( "ERROR: Error trying to render vertical edge! "); - } - LOG(" DONE Drawing a horizontal border! "); + r->RenderQuad(verticalBarImage.get(), x, y, 0, 1.0f, height); + } + else + { + LOG ( "ERROR: Error trying to render vertical edge! "); + } + LOG(" DONE Drawing a horizontal border! "); } diff --git a/projects/mtg/src/TargetChooser.cpp b/projects/mtg/src/TargetChooser.cpp index e69f29702..687834fdf 100644 --- a/projects/mtg/src/TargetChooser.cpp +++ b/projects/mtg/src/TargetChooser.cpp @@ -503,6 +503,9 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta if (minus) { cd->setisMultiColored(-1); + cd->SetExclusionColor(0);//not multicolored is monocolored not colorless, use iscolorless attribute + cd->SetExclusionColor(6);//restriction... green, red, blue, black or white colored only + cd->mode = CardDescriptor::CD_OR; } else { @@ -736,6 +739,10 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta { return NEW CardTargetChooser(observer, card->storedSourceCard, card, zones, nbzones); } + else if (typeName.compare("abilitycontroller") == 0) + { + return NEW PlayerTargetChooser(observer, card, 1, card->storedSourceCard->controller()); + } else { tc = NEW TypeTargetChooser(observer, typeName.c_str(), zones, nbzones, card, maxtargets, other, targetMin); @@ -852,10 +859,15 @@ bool TargetChooser::canTarget(Targetable * target, bool withoutProtections) if (source && targetter && card->isInPlay(observer) && !withoutProtections) { - if (card->has(Constants::SHROUD)) return false; - if (card->protectedAgainst(targetter)) return false; - if (card->CantBeTargetby(targetter)) return false; - if ((targetter->controller() != card->controller()) && card->has(Constants::OPPONENTSHROUD)) return false; + if (card->has(Constants::SHROUD)) return targetter->bypassTC; + if (card->protectedAgainst(targetter)) return targetter->bypassTC; + if (card->CantBeTargetby(targetter)) return targetter->bypassTC; + if ((targetter->controller() != card->controller()) && card->has(Constants::OPPONENTSHROUD)) return targetter->bypassTC; + if (card->has(Constants::PROTECTIONFROMCOLOREDSPELLS)) + {//a spell that has no target=criteria means it's not targetted unless its a workaround card... + if((targetter->spellTargetType.size()) && (targetter->hasColor(1)||targetter->hasColor(2)||targetter->hasColor(3)||targetter->hasColor(4)||targetter->hasColor(5))) + return targetter->bypassTC; + } } return true; } @@ -1075,14 +1087,20 @@ bool TypeTargetChooser::canTarget(Targetable * target,bool withoutProtections) { if (card->hasSubtype(types[i])) return true; - if (card->data->basicAbilities[(int)Constants::CHANGELING]) return true;//changelings can be targeted as any subtype. - if(card->getLCName().size()) - { + if (card->data->basicAbilities[(int)Constants::CHANGELING]) + { + if (!MTGAllCards::isSubtypeOfType(i,Subtypes::TYPE_CREATURE)) + return false; + + return true; + } + if(card->getLCName().size()) + { if (MTGAllCards::findType(card->getLCName()) == types[i]) return true; if (MTGAllCards::findType(card->getName()) == types[i]) return true; - } + } } return false; } @@ -1328,13 +1346,13 @@ bool PlayerTargetChooser::canTarget(Targetable * target, bool) if ((targetter->controller() != targetter->controller()->opponent()) && (targetter->controller()->opponent()->game->inPlay->hasAbility(Constants::CONTROLLERSHROUD)) && targetter->controller() != target) - return false; + return targetter->bypassTC; if ((targetter->controller()->opponent()->game->inPlay->hasAbility(Constants::PLAYERSHROUD)) && targetter->controller()->opponent() == target) - return false; + return targetter->bypassTC; if ((targetter->controller()->game->inPlay->hasAbility(Constants::PLAYERSHROUD)) && targetter->controller() == target) - return false; + return targetter->bypassTC; } Player * pTarget = dynamic_cast(target); diff --git a/projects/mtg/src/TestSuiteAI.cpp b/projects/mtg/src/TestSuiteAI.cpp index bb7e236ce..0a3df4796 100644 --- a/projects/mtg/src/TestSuiteAI.cpp +++ b/projects/mtg/src/TestSuiteAI.cpp @@ -46,8 +46,8 @@ MTGCardInstance * TestSuiteAI::getCard(string action) for (int i = 0; i < 2; i++) { Player * p = observer->players[i]; - MTGGameZone * zones[] = { p->game->library, p->game->hand, p->game->inPlay, p->game->graveyard }; - for (int j = 0; j < 4; j++) + MTGGameZone * zones[] = { p->game->library, p->game->hand, p->game->inPlay, p->game->graveyard, p->game->removedFromGame }; + for (int j = 0; j < 5; j++) { MTGGameZone * zone = zones[j]; for (int k = 0; k < zone->nb_cards; k++) @@ -347,7 +347,7 @@ void TestSuiteGame::assertGame() int error = 0; bool wasAI = false; - if (observer->getCurrentGamePhase() != endState.phase) + if (observer->getCurrentGamePhase() != endState.phase) { sprintf(result, "==phase problem. Expected [ %s ](%i), got [ %s ](%i)==
", Constants::MTGPhaseNames[endState.phase].c_str(),endState.phase, @@ -394,12 +394,13 @@ void TestSuiteGame::assertGame() error++; } - MTGGameZone * playerZones[] = { p->game->graveyard, p->game->library, p->game->hand, p->game->inPlay }; + MTGGameZone * playerZones[] = { p->game->graveyard, p->game->library, p->game->hand, p->game->inPlay, p->game->removedFromGame }; MTGGameZone * endstateZones[] = { endState.players[i]->game->graveyard, endState.players[i]->game->library, endState.players[i]->game->hand, - endState.players[i]->game->inPlay }; - for (int j = 0; j < 4; j++) + endState.players[i]->game->inPlay, + endState.players[i]->game->removedFromGame }; + for (int j = 0; j < 5; j++) { MTGGameZone * zone = playerZones[j]; if (zone->nb_cards != endstateZones[j]->nb_cards) @@ -576,7 +577,7 @@ int TestSuite::loadNext() #elif defined(IOS) thread_count = 6; #else - thread_count = 4; + thread_count = 4; #endif for(size_t i = 0; i < (thread_count-1); i++) mWorkerThread.push_back(new boost::thread(ThreadProc, this)); @@ -853,12 +854,13 @@ void TestSuiteGame::initGame() stringstream stream; stream << initState.players[i]->getRandomGenerator()->saveLoadedRandValues(stream); p->getRandomGenerator()->loadRandValues(stream.str()); - MTGGameZone * playerZones[] = { p->game->graveyard, p->game->library, p->game->hand, p->game->inPlay }; + MTGGameZone * playerZones[] = { p->game->graveyard, p->game->library, p->game->hand, p->game->inPlay, p->game->removedFromGame }; MTGGameZone * loadedPlayerZones[] = { initState.players[i]->game->graveyard, initState.players[i]->game->library, initState.players[i]->game->hand, - initState.players[i]->game->inPlay }; - for (int j = 0; j < 4; j++) + initState.players[i]->game->inPlay, + initState.players[i]->game->removedFromGame }; + for (int j = 0; j < 5; j++) { MTGGameZone * zone = playerZones[j]; for (size_t k = 0; k < loadedPlayerZones[j]->cards.size(); k++) @@ -910,9 +912,10 @@ MTGPlayerCards * TestSuiteGame::buildDeck(Player* player, int playerId) MTGGameZone * loadedPlayerZones[] = { initState.players[playerId]->game->graveyard, initState.players[playerId]->game->library, initState.players[playerId]->game->hand, + initState.players[playerId]->game->removedFromGame, initState.players[playerId]->game->inPlay }; - for (int j = 0; j < 4; j++) + for (int j = 0; j < 5; j++) { for (size_t k = 0; k < loadedPlayerZones[j]->cards.size(); k++) { diff --git a/projects/mtg/src/TextScroller.cpp b/projects/mtg/src/TextScroller.cpp index 17a984b27..1283f10a3 100644 --- a/projects/mtg/src/TextScroller.cpp +++ b/projects/mtg/src/TextScroller.cpp @@ -32,7 +32,7 @@ void TextScroller::setRandom(int mode) void TextScroller::Add(string text) { if (!strings.size()) - mText = text; + mText = text; strings.push_back(text); } @@ -67,21 +67,21 @@ void TextScroller::Update(float dt) void TextScroller::Render() { WFont * mFont = WResourceManager::Instance()->GetWFont(fontId); - mFont->DrawString(mText.c_str(), mX, mY, JGETEXT_LEFT, start, mWidth); + mFont->DrawString(mText.c_str(), mX, mY, JGETEXT_LEFT, start, mWidth); } ostream& TextScroller::toString(ostream& out) const { return out << "TextScroller ::: mText : " << mText - << " ; tempText : " << tempText - << " ; mWidth : " << mWidth + << " ; tempText : " << tempText + << " ; mWidth : " << mWidth << " ; mSpeed : " << mScrollSpeed - << " ; mX,mY : " << mX << "," << mY - << " ; start : " << start - << " ; timer : " << timer - << " ; strings : ?" - << " ; currentId : " << currentId - << " ; mRandom : " << mRandom; + << " ; mX,mY : " << mX << "," << mY + << " ; start : " << start + << " ; timer : " << timer + << " ; strings : ?" + << " ; currentId : " << currentId + << " ; mRandom : " << mRandom; } @@ -93,28 +93,28 @@ ostream& TextScroller::toString(ostream& out) const VerticalTextScroller::VerticalTextScroller(int fontId, float x, float y, float width, float height, float scrollSpeed, size_t numItemsShown) : TextScroller( fontId, x, y, width, scrollSpeed) { - mHeight = height; - mNbItemsShown = numItemsShown; - mMarginX = 0; - timer=0; - WFont *mFont = WResourceManager::Instance()->GetWFont(fontId); - mOriginalY = mY; - mMarginY = mY - mFont->GetHeight(); - Add("\n"); // initialize the scroller with a blank line + mHeight = height; + mNbItemsShown = numItemsShown; + mMarginX = 0; + timer=0; + WFont *mFont = WResourceManager::Instance()->GetWFont(fontId); + mOriginalY = mY; + mMarginY = mY - mFont->GetHeight(); + Add("\n"); // initialize the scroller with a blank line } void VerticalTextScroller::Add( string text ) { - strings.push_back( text ); - string wrappedText = wordWrap(text, mWidth, fontId); - mText.append(wrappedText); + strings.push_back( text ); + string wrappedText = wordWrap(text, mWidth, fontId); + mText.append(wrappedText); } /* - Updates happen everytime the top line disappears from view. - The top line is then moved to the end of the file and the scrolling resumes where it left off + Updates happen everytime the top line disappears from view. + The top line is then moved to the end of the file and the scrolling resumes where it left off */ void VerticalTextScroller::Update(float dt) @@ -145,5 +145,5 @@ void VerticalTextScroller::Update(float dt) void VerticalTextScroller::Render() { WFont * mFont = WResourceManager::Instance()->GetWFont(fontId); - mFont->DrawString(mText.c_str(), mX, mY); + mFont->DrawString(mText.c_str(), mX, mY); } diff --git a/projects/mtg/src/Token.cpp b/projects/mtg/src/Token.cpp index 1e9eeae50..bb303558f 100644 --- a/projects/mtg/src/Token.cpp +++ b/projects/mtg/src/Token.cpp @@ -13,6 +13,8 @@ Token::Token(string _name, MTGCardInstance * source, int _power, int _toughness) lifeOrig = life; origpower = _power; origtoughness = _toughness; + basepower = power; + basetoughness = toughness; rarity = Constants::RARITY_T; name = _name; if (name.size() && name[0] >= 97 && name[0] <= 122) name[0] -= 32; //Poor man's camelcase. We assume strings we get are either Camelcased or lowercase @@ -25,6 +27,9 @@ Token::Token(string _name, MTGCardInstance * source, int _power, int _toughness) attacker = 0; defenser = NULL; banding = NULL; + pbonus = 0; + tbonus = 0; + isSettingBase = 0; } Token::Token(int id) : @@ -45,7 +50,11 @@ Token::Token(const Token& source) : life = source.life; lifeOrig = source.life; origpower = source.origpower; - origtoughness = source.origpower; + origtoughness = source.origtoughness; + basepower = source.origpower; + basetoughness = source.origtoughness; + pbonus = source.pbonus; + tbonus = source.tbonus; rarity = source.rarity; name = source.name; setId = source.setId; @@ -56,6 +65,7 @@ Token::Token(const Token& source) : attacker = source.attacker; defenser = source.defenser; banding = source.banding; + isSettingBase = source.isSettingBase; } diff --git a/projects/mtg/src/WCachedResource.cpp b/projects/mtg/src/WCachedResource.cpp index 849d5a119..45723f8d7 100644 --- a/projects/mtg/src/WCachedResource.cpp +++ b/projects/mtg/src/WCachedResource.cpp @@ -82,7 +82,7 @@ WCachedTexture::WCachedTexture() WCachedTexture::~WCachedTexture() { if (texture) - SAFE_DELETE(texture); + SAFE_DELETE(texture); } JTexture * WCachedTexture::Actual() @@ -113,27 +113,27 @@ JQuadPtr WCachedTexture::GetQuad(float offX, float offY, float width, float heig resource = kPlaceholderID; } - std::map::iterator iter = mTrackedQuads.find(resource); - if (iter != mTrackedQuads.end()) - return iter->second; + std::map::iterator iter = mTrackedQuads.find(resource); + if (iter != mTrackedQuads.end()) + return iter->second; - JQuadPtr quad(NEW JQuad(texture, offX, offY, width, height)); + JQuadPtr quad(NEW JQuad(texture, offX, offY, width, height)); //Update JQ's values to what we called this with. quad->SetTextureRect(offX, offY, width, height); - mTrackedQuads.insert(std::pair(resource, quad)); + mTrackedQuads.insert(std::pair(resource, quad)); return quad; } JQuadPtr WCachedTexture::GetQuad(const string& resname) { - JQuadPtr result; - std::map::iterator iter = mTrackedQuads.find(resname); - if (iter != mTrackedQuads.end()) - result = iter->second; + JQuadPtr result; + std::map::iterator iter = mTrackedQuads.find(resname); + if (iter != mTrackedQuads.end()) + result = iter->second; - return result; + return result; } JQuadPtr WCachedTexture::GetCard(float offX, float offY, float width, float height, const string& resname) @@ -192,7 +192,7 @@ bool WCachedTexture::Attempt(const string& filename, int submode, int & error) string realname = filename; //Form correct filename. - if (submode & TEXTURE_SUB_CARD) + if (submode & TEXTURE_SUB_CARD) { if (submode & TEXTURE_SUB_THUMB) { diff --git a/projects/mtg/src/WDataSrc.cpp b/projects/mtg/src/WDataSrc.cpp index 7b11e6d49..a29e13f34 100644 --- a/projects/mtg/src/WDataSrc.cpp +++ b/projects/mtg/src/WDataSrc.cpp @@ -56,13 +56,13 @@ WSrcCards::WSrcCards(float delay) JQuadPtr WSrcCards::getImage(int offset) { - if (!WResourceManager::Instance()->IsThreaded()) - { + if (!WResourceManager::Instance()->IsThreaded()) + { if (mDelay && mLastInput < mDelay) { return WResourceManager::Instance()->RetrieveCard(getCard(offset), RETRIEVE_EXISTING); } - } + } return WResourceManager::Instance()->RetrieveCard(getCard(offset)); } diff --git a/projects/mtg/src/WEvent.cpp b/projects/mtg/src/WEvent.cpp index b125dc1ee..09f4b4214 100644 --- a/projects/mtg/src/WEvent.cpp +++ b/projects/mtg/src/WEvent.cpp @@ -106,6 +106,7 @@ WEventCardSacrifice::WEventCardSacrifice(MTGCardInstance * card, MTGCardInstance WEventCardDiscard::WEventCardDiscard(MTGCardInstance * card) : WEventCardUpdate(card) { + card->discarded = true; } WEventCardCycle::WEventCardCycle(MTGCardInstance * card) : @@ -121,6 +122,8 @@ WEventVampire::WEventVampire(MTGCardInstance * card,MTGCardInstance * source,MTG WEventTarget::WEventTarget(MTGCardInstance * card,MTGCardInstance * source) : WEventCardUpdate(card),card(card),source(source) { + card->cardistargetted = 1; + source->cardistargetter = 1; } WEventCardChangeType::WEventCardChangeType(MTGCardInstance * card, int type, bool before, bool after) : @@ -157,6 +160,21 @@ WEventEmptyManaPool::WEventEmptyManaPool(ManaPool * source) : { } +WEventCardUnattached::WEventCardUnattached(MTGCardInstance * card) : + WEventCardUpdate(card) +{ +} + +WEventCardEquipped::WEventCardEquipped(MTGCardInstance * card) : + WEventCardUpdate(card) +{ +} + +WEventCardControllerChange::WEventCardControllerChange(MTGCardInstance * card) : + WEventCardUpdate(card) +{ +} + WEventCombatStepChange::WEventCombatStepChange(CombatStep step) : WEvent(), step(step) { @@ -305,6 +323,24 @@ Targetable * WEventcardDraw::getTarget(Player * player) return NULL; } +Targetable * WEventCardUnattached::getTarget(int target) +{ + if (target) return card; + return NULL; +} + +Targetable * WEventCardEquipped::getTarget(int target) +{ + if (target) return card; + return NULL; +} + +Targetable * WEventCardControllerChange::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/WFont.cpp b/projects/mtg/src/WFont.cpp index 12ea2cd24..1de0133bd 100644 --- a/projects/mtg/src/WFont.cpp +++ b/projects/mtg/src/WFont.cpp @@ -359,7 +359,7 @@ int WFBFont::PreCacheChar(const u8 *ch) #else x = (int)mSprites[index]->mX; y = (int)mSprites[index]->mY; - mTexture->UpdateBits(x, y, mFontSize, mFontSize, mCharBuffer); + mTexture->UpdateBits(x, y, mFontSize, mFontSize, mCharBuffer); #endif return index; } @@ -758,7 +758,7 @@ int WGBKFont::PreCacheChar(const u8 *ch) #else x = (int)mSprites[index]->mX; y = (int)mSprites[index]->mY; - mTexture->UpdateBits(x, y, mFontSize, mFontSize, mCharBuffer); + mTexture->UpdateBits(x, y, mFontSize, mFontSize, mCharBuffer); #endif return index; } diff --git a/projects/mtg/src/WGui.cpp b/projects/mtg/src/WGui.cpp index 4a1308f1b..f84fe3a1c 100644 --- a/projects/mtg/src/WGui.cpp +++ b/projects/mtg/src/WGui.cpp @@ -2308,8 +2308,10 @@ void WGuiKeyBinder::setData() j->ResetInput(); } +#if (!defined IOS) static const JButton btnToCheck[] = { JGE_BTN_MENU, JGE_BTN_CTRL, JGE_BTN_RIGHT, JGE_BTN_LEFT, JGE_BTN_UP, JGE_BTN_DOWN, JGE_BTN_OK, JGE_BTN_CANCEL, JGE_BTN_PRI, JGE_BTN_SEC, JGE_BTN_PREV, JGE_BTN_NEXT }; +#endif #define C(o) (static_cast(o)) WGuiBase::CONFIRM_TYPE WGuiKeyBinder::needsConfirm() diff --git a/projects/mtg/src/WResourceManager.cpp b/projects/mtg/src/WResourceManager.cpp index 2df9ffb7e..6f24c030b 100644 --- a/projects/mtg/src/WResourceManager.cpp +++ b/projects/mtg/src/WResourceManager.cpp @@ -11,8 +11,12 @@ #endif #include "WFont.h" +#include + +#ifdef FORCE_LOW_CACHE_MEMORY //#define FORCE_LOW_CACHE_MEMORY const unsigned int kConstrainedCacheLimit = 8 * 1024 * 1024; +#endif extern bool neofont; int idCounter = OTHERS_OFFSET; @@ -33,18 +37,18 @@ WResourceManager* WResourceManager::sInstance = NULL; WResourceManager* WResourceManager::Instance() { - if (sInstance == NULL) - { - sInstance = NEW ResourceManagerImpl; - } + if (sInstance == NULL) + { + sInstance = NEW ResourceManagerImpl; + } - return sInstance; + return sInstance; } void WResourceManager::Terminate() { - if (sInstance) - SAFE_DELETE(sInstance); + if (sInstance) + SAFE_DELETE(sInstance); } @@ -1036,12 +1040,12 @@ cacheItem* WCache::AttemptNew(const string& filename, in SAFE_DELETE(item); return NULL; } - else + else { DebugTrace("AttemptNew failed to load (not a 404 error). Deleting cache item " << ToHex(item)); SAFE_DELETE(item); mError = CACHE_ERROR_BAD; - return NULL; + return NULL; } } diff --git a/projects/mtg/src/utils.cpp b/projects/mtg/src/utils.cpp index 2217b6143..544fb35ff 100644 --- a/projects/mtg/src/utils.cpp +++ b/projects/mtg/src/utils.cpp @@ -98,6 +98,17 @@ bool FileExists(const string & filename) return JFileSystem::GetInstance()->FileExists(filename); } +std::string cReplaceString(string subject, const string& search, const string& replace) +{ + size_t pos = 0; + while ((pos = subject.find(search, pos)) != string::npos) + { + subject.replace(pos, search.length(), replace); + pos += replace.length(); + } + return subject; +} + /* #ifdef LINUX @@ -317,13 +328,13 @@ std::string wordWrap(const std::string& sentence, float width, int fontId) string currentSentence = sentence.substr(breakIdx, idx - breakIdx); float stringLength = mFont->GetStringWidth( currentSentence.c_str() ); if (stringLength >= width) - { + { if ( stringLength > width ) { while ( sentence[idx-1] != ' ' ) idx--; } - retVal[idx-1] = '\n'; + retVal[idx-1] = '\n'; breakIdx = idx; numLines++; } @@ -333,12 +344,12 @@ std::string wordWrap(const std::string& sentence, float width, int fontId) string currentSentence = sentence.substr(breakIdx, idx - breakIdx); float stringLength = mFont->GetStringWidth( currentSentence.c_str() ); if (stringLength >= width) - { + { if ( stringLength > width ) { while ( sentence[idx-1] != ' ' ) idx--; - retVal[idx-1] = '\n'; + retVal[idx-1] = '\n'; } numLines++; } diff --git a/projects/mtg/wagic.pri b/projects/mtg/wagic.pri index 7360f681e..62ab32ed9 100644 --- a/projects/mtg/wagic.pri +++ b/projects/mtg/wagic.pri @@ -39,7 +39,6 @@ windows{ macx:INCLUDEPATH += /opt/include INCLUDEPATH += ../../JGE/include INCLUDEPATH += ../../JGE/src/zipFS -INCLUDEPATH += ../../Boost INCLUDEPATH += include unix:!symbian:LIBS += -lz diff --git a/projects/mtg/wagic.xcodeproj/project.pbxproj b/projects/mtg/wagic.xcodeproj/project.pbxproj index d951b708e..d65919aff 100755 --- a/projects/mtg/wagic.xcodeproj/project.pbxproj +++ b/projects/mtg/wagic.xcodeproj/project.pbxproj @@ -19,12 +19,6 @@ 12059D7214980B7200DAC43B /* zfs.vcxproj.filters in Resources */ = {isa = PBXBuildFile; fileRef = 12B8122C1404B9E10092E303 /* zfs.vcxproj.filters */; }; 12059D7314980B7200DAC43B /* modrules.xml in Resources */ = {isa = PBXBuildFile; fileRef = 129654D5148AA2390031100B /* modrules.xml */; }; 12059D7414980B7200DAC43B /* README.txt in Resources */ = {isa = PBXBuildFile; fileRef = 128ED37A148BAE7B00C58E83 /* README.txt */; }; - 12059D7914980B7200DAC43B /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 12211ECA1494811D00641703 /* Default.png */; }; - 12059D7A14980B7200DAC43B /* Default-Landscape~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 12211ECC149481B600641703 /* Default-Landscape~ipad.png */; }; - 12059D7B14980B7200DAC43B /* Default-Portrait~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 12211ECE149481C300641703 /* Default-Portrait~ipad.png */; }; - 12059D7C14980B7200DAC43B /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 12211ED01494823E00641703 /* Default@2x.png */; }; - 12059D7D14980B7200DAC43B /* Default-Landscape.png in Resources */ = {isa = PBXBuildFile; fileRef = 12211ED21494916D00641703 /* Default-Landscape.png */; }; - 12059D7E14980B7200DAC43B /* Default-Portrait.png in Resources */ = {isa = PBXBuildFile; fileRef = 12211ED31494916D00641703 /* Default-Portrait.png */; }; 12059D8014980B7200DAC43B /* Encoding.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CEE232B1128A01F400C34032 /* Encoding.cpp */; }; 12059D8114980B7200DAC43B /* hgecolor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CEE232B4128A01F400C34032 /* hgecolor.cpp */; }; 12059D8214980B7200DAC43B /* hgedistort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CEE232B5128A01F400C34032 /* hgedistort.cpp */; }; @@ -186,10 +180,6 @@ 12059E3F14980B7300DAC43B /* ASIHTTPRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 12211E3314931CBB00641703 /* ASIHTTPRequest.m */; }; 12059E4014980B7300DAC43B /* ASIInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 12211E3714931CBB00641703 /* ASIInputStream.m */; }; 12059E4114980B7300DAC43B /* ASINetworkQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 12211E3914931CBB00641703 /* ASINetworkQueue.m */; }; - 12059E4214980B7300DAC43B /* ioapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 12211EA214933D4A00641703 /* ioapi.c */; }; - 12059E4314980B7300DAC43B /* mztools.c in Sources */ = {isa = PBXBuildFile; fileRef = 12211EA414933D4A00641703 /* mztools.c */; }; - 12059E4414980B7300DAC43B /* unzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 12211EA614933D4A00641703 /* unzip.c */; }; - 12059E4514980B7300DAC43B /* zip.c in Sources */ = {isa = PBXBuildFile; fileRef = 12211EA814933D4A00641703 /* zip.c */; }; 12059E4614980B7300DAC43B /* ZipArchive.mm in Sources */ = {isa = PBXBuildFile; fileRef = 12211EAE14933D6600641703 /* ZipArchive.mm */; }; 12059E4714980B7300DAC43B /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 12211EB61493483C00641703 /* Reachability.m */; }; 12059E4814980B7300DAC43B /* WagicDownloadProgressViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 12211EC81494360C00641703 /* WagicDownloadProgressViewController.m */; }; @@ -222,21 +212,11 @@ 12211E7E14931CBB00641703 /* ASIHTTPRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 12211E3314931CBB00641703 /* ASIHTTPRequest.m */; }; 12211E7F14931CBB00641703 /* ASIInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 12211E3714931CBB00641703 /* ASIInputStream.m */; }; 12211E8014931CBB00641703 /* ASINetworkQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 12211E3914931CBB00641703 /* ASINetworkQueue.m */; }; - 12211EAA14933D4A00641703 /* ioapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 12211EA214933D4A00641703 /* ioapi.c */; }; - 12211EAB14933D4A00641703 /* mztools.c in Sources */ = {isa = PBXBuildFile; fileRef = 12211EA414933D4A00641703 /* mztools.c */; }; - 12211EAC14933D4A00641703 /* unzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 12211EA614933D4A00641703 /* unzip.c */; }; - 12211EAD14933D4A00641703 /* zip.c in Sources */ = {isa = PBXBuildFile; fileRef = 12211EA814933D4A00641703 /* zip.c */; }; 12211EAF14933D6600641703 /* ZipArchive.mm in Sources */ = {isa = PBXBuildFile; fileRef = 12211EAE14933D6600641703 /* ZipArchive.mm */; }; 12211EB71493483C00641703 /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 12211EB61493483C00641703 /* Reachability.m */; }; 12211EB914934A1900641703 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12211EB814934A1800641703 /* MobileCoreServices.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 12211EBB14934A2C00641703 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12211EBA14934A2C00641703 /* CFNetwork.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 12211EC91494360C00641703 /* WagicDownloadProgressViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 12211EC81494360C00641703 /* WagicDownloadProgressViewController.m */; }; - 12211ECB1494811D00641703 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 12211ECA1494811D00641703 /* Default.png */; }; - 12211ECD149481B600641703 /* Default-Landscape~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 12211ECC149481B600641703 /* Default-Landscape~ipad.png */; }; - 12211ECF149481C400641703 /* Default-Portrait~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 12211ECE149481C300641703 /* Default-Portrait~ipad.png */; }; - 12211ED11494823F00641703 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 12211ED01494823E00641703 /* Default@2x.png */; }; - 12211ED41494916D00641703 /* Default-Landscape.png in Resources */ = {isa = PBXBuildFile; fileRef = 12211ED21494916D00641703 /* Default-Landscape.png */; }; - 12211ED51494916D00641703 /* Default-Portrait.png in Resources */ = {isa = PBXBuildFile; fileRef = 12211ED31494916D00641703 /* Default-Portrait.png */; }; 12272FC414CD57CF00192DC7 /* SimpleButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 12272FC314CD57CF00192DC7 /* SimpleButton.cpp */; }; 12272FC514CD57CF00192DC7 /* SimpleButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 12272FC314CD57CF00192DC7 /* SimpleButton.cpp */; }; 12272FC814CD6A3900192DC7 /* InteractiveButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 12272FC714CD6A3900192DC7 /* InteractiveButton.cpp */; }; @@ -277,6 +257,17 @@ 12DCD02E14DBE1F90023B966 /* JSfx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 12DCD02C14DBE1F90023B966 /* JSfx.cpp */; }; 12DCD03414DBECC50023B966 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12DCD03114DBECC50023B966 /* CoreAudio.framework */; }; 12DCD03514DBECC50023B966 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12DCD03214DBECC50023B966 /* OpenAL.framework */; }; + 180633481BA5F82D003FB092 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 180633411BA5F82D003FB092 /* Default-568h@2x.png */; }; + 180633491BA5F82D003FB092 /* Default-Landscape.png in Resources */ = {isa = PBXBuildFile; fileRef = 180633421BA5F82D003FB092 /* Default-Landscape.png */; }; + 1806334A1BA5F82D003FB092 /* Default-Landscape~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 180633431BA5F82D003FB092 /* Default-Landscape~ipad.png */; }; + 1806334B1BA5F82D003FB092 /* Default-Portrait.png in Resources */ = {isa = PBXBuildFile; fileRef = 180633441BA5F82D003FB092 /* Default-Portrait.png */; }; + 1806334C1BA5F82D003FB092 /* Default-Portrait~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 180633451BA5F82D003FB092 /* Default-Portrait~ipad.png */; }; + 1806334D1BA5F82D003FB092 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 180633461BA5F82D003FB092 /* Default.png */; }; + 1806334E1BA5F82D003FB092 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 180633471BA5F82D003FB092 /* Default@2x.png */; }; + 188B71D01B9B9F9400D5522B /* ioapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 188B71C41B9B9F9400D5522B /* ioapi.c */; }; + 188B71D11B9B9F9400D5522B /* unzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 188B71C51B9B9F9400D5522B /* unzip.c */; }; + 188B71D21B9B9F9400D5522B /* zip.c in Sources */ = {isa = PBXBuildFile; fileRef = 188B71C61B9B9F9400D5522B /* zip.c */; }; + 188B71D61B9B9F9400D5522B /* mztools.c in Sources */ = {isa = PBXBuildFile; fileRef = 188B71CC1B9B9F9400D5522B /* mztools.c */; }; 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; }; @@ -284,7 +275,6 @@ 751E1F1518FAE53E001B1E16 /* CarouselDeckView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 751E1F1218FAE53E001B1E16 /* CarouselDeckView.cpp */; }; 751E1F1618FAE53E001B1E16 /* DeckView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 751E1F1318FAE53E001B1E16 /* DeckView.cpp */; }; 751E1F1718FAE53E001B1E16 /* GridDeckView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 751E1F1418FAE53E001B1E16 /* GridDeckView.cpp */; }; - 75D209D3181D54FD009916AC /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 75D209D1181D54FD009916AC /* Default-568h@2x.png */; }; 75D209D4181D54FD009916AC /* wagic-80x80.png in Resources */ = {isa = PBXBuildFile; fileRef = 75D209D2181D54FD009916AC /* wagic-80x80.png */; }; CE97CD1E1295AB4300FDFD3B /* SimplePopup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CE97CD1D1295AB4300FDFD3B /* SimplePopup.cpp */; }; CE9A478512B514BA00C9F38A /* EAGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = CE9A477612B514BA00C9F38A /* EAGLView.m */; }; @@ -474,28 +464,13 @@ 12211E3914931CBB00641703 /* ASINetworkQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASINetworkQueue.m; sourceTree = ""; }; 12211E3A14931CBB00641703 /* ASIProgressDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASIProgressDelegate.h; sourceTree = ""; }; 12211E9F14933D0600641703 /* ZipArchive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZipArchive.h; path = iOS/ZipArchive/ZipArchive.h; sourceTree = ""; }; - 12211EA114933D4A00641703 /* crypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crypt.h; sourceTree = ""; }; - 12211EA214933D4A00641703 /* ioapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ioapi.c; sourceTree = ""; }; - 12211EA314933D4A00641703 /* ioapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ioapi.h; sourceTree = ""; }; - 12211EA414933D4A00641703 /* mztools.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mztools.c; sourceTree = ""; }; - 12211EA514933D4A00641703 /* mztools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mztools.h; sourceTree = ""; }; - 12211EA614933D4A00641703 /* unzip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = unzip.c; sourceTree = ""; }; - 12211EA714933D4A00641703 /* unzip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unzip.h; sourceTree = ""; }; - 12211EA814933D4A00641703 /* zip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zip.c; sourceTree = ""; }; - 12211EA914933D4A00641703 /* zip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = zip.h; sourceTree = ""; }; - 12211EAE14933D6600641703 /* ZipArchive.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ZipArchive.mm; sourceTree = ""; }; - 12211EB51493483C00641703 /* Reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Reachability.h; path = "iOS/Reachability/Reachability 2.0.4ddg/Reachability/Reachability.h"; sourceTree = ""; }; - 12211EB61493483C00641703 /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Reachability.m; path = "iOS/Reachability/Reachability 2.0.4ddg/Reachability/Reachability.m"; sourceTree = ""; }; + 12211EAE14933D6600641703 /* ZipArchive.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ZipArchive.mm; path = iOS/ZipArchive/ZipArchive.mm; sourceTree = ""; }; + 12211EB51493483C00641703 /* Reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Reachability.h; path = iOS/Reachability/Reachability/Reachability.h; sourceTree = ""; }; + 12211EB61493483C00641703 /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Reachability.m; path = iOS/Reachability/Reachability/Reachability.m; sourceTree = ""; }; 12211EB814934A1800641703 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; 12211EBA14934A2C00641703 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; 12211EC71494360C00641703 /* WagicDownloadProgressViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WagicDownloadProgressViewController.h; path = UI/WagicDownloadProgressViewController.h; sourceTree = ""; }; 12211EC81494360C00641703 /* WagicDownloadProgressViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WagicDownloadProgressViewController.m; path = UI/WagicDownloadProgressViewController.m; sourceTree = ""; }; - 12211ECA1494811D00641703 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = ../Default.png; sourceTree = ""; }; - 12211ECC149481B600641703 /* Default-Landscape~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-Landscape~ipad.png"; path = "../Default-Landscape~ipad.png"; sourceTree = ""; }; - 12211ECE149481C300641703 /* Default-Portrait~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-Portrait~ipad.png"; path = "../Default-Portrait~ipad.png"; sourceTree = ""; }; - 12211ED01494823E00641703 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "../Default@2x.png"; sourceTree = ""; }; - 12211ED21494916D00641703 /* Default-Landscape.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-Landscape.png"; path = "../Default-Landscape.png"; sourceTree = ""; }; - 12211ED31494916D00641703 /* Default-Portrait.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-Portrait.png"; path = "../Default-Portrait.png"; sourceTree = ""; }; 12272FC114CD558C00192DC7 /* SimpleButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleButton.h; sourceTree = ""; }; 12272FC314CD57CF00192DC7 /* SimpleButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SimpleButton.cpp; sourceTree = ""; }; 12272FC614CD68FB00192DC7 /* InteractiveButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InteractiveButton.h; sourceTree = ""; }; @@ -570,6 +545,22 @@ 12DCD03014DBECC40023B966 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; }; 12DCD03114DBECC50023B966 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; 12DCD03214DBECC50023B966 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; + 180633411BA5F82D003FB092 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-568h@2x.png"; path = "Resources/Default-568h@2x.png"; sourceTree = ""; }; + 180633421BA5F82D003FB092 /* Default-Landscape.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-Landscape.png"; path = "Resources/Default-Landscape.png"; sourceTree = ""; }; + 180633431BA5F82D003FB092 /* Default-Landscape~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-Landscape~ipad.png"; path = "Resources/Default-Landscape~ipad.png"; sourceTree = ""; }; + 180633441BA5F82D003FB092 /* Default-Portrait.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-Portrait.png"; path = "Resources/Default-Portrait.png"; sourceTree = ""; }; + 180633451BA5F82D003FB092 /* Default-Portrait~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-Portrait~ipad.png"; path = "Resources/Default-Portrait~ipad.png"; sourceTree = ""; }; + 180633461BA5F82D003FB092 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/Default.png; sourceTree = ""; }; + 180633471BA5F82D003FB092 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "Resources/Default@2x.png"; sourceTree = ""; }; + 188B71C31B9B9F9400D5522B /* crypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = crypt.h; path = unzip/crypt.h; sourceTree = ""; }; + 188B71C41B9B9F9400D5522B /* ioapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ioapi.c; path = unzip/ioapi.c; sourceTree = ""; }; + 188B71C51B9B9F9400D5522B /* unzip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = unzip.c; path = unzip/unzip.c; sourceTree = ""; }; + 188B71C61B9B9F9400D5522B /* zip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = zip.c; path = unzip/zip.c; sourceTree = ""; }; + 188B71C71B9B9F9400D5522B /* ioapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ioapi.h; path = unzip/ioapi.h; sourceTree = ""; }; + 188B71CC1B9B9F9400D5522B /* mztools.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mztools.c; path = unzip/mztools.c; sourceTree = ""; }; + 188B71CD1B9B9F9400D5522B /* mztools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mztools.h; path = unzip/mztools.h; sourceTree = ""; }; + 188B71CE1B9B9F9400D5522B /* unzip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = unzip.h; path = unzip/unzip.h; sourceTree = ""; }; + 188B71CF1B9B9F9400D5522B /* zip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = zip.h; path = unzip/zip.h; sourceTree = ""; }; 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 1D6058910D05DD3D006BFB54 /* wagic.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = wagic.app; sourceTree = BUILT_PRODUCTS_DIR; }; 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; @@ -582,7 +573,6 @@ 751E1F1218FAE53E001B1E16 /* CarouselDeckView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CarouselDeckView.cpp; sourceTree = ""; }; 751E1F1318FAE53E001B1E16 /* DeckView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeckView.cpp; sourceTree = ""; }; 751E1F1418FAE53E001B1E16 /* GridDeckView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GridDeckView.cpp; sourceTree = ""; }; - 75D209D1181D54FD009916AC /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = SOURCE_ROOT; }; 75D209D2181D54FD009916AC /* wagic-80x80.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "wagic-80x80.png"; sourceTree = SOURCE_ROOT; }; 8D1107310486CEB800E47090 /* wagic-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "wagic-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; CE8B8A231299C22900A3CDEF /* DebugRoutines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DebugRoutines.h; sourceTree = ""; }; @@ -976,22 +966,6 @@ name = ZipArchive; sourceTree = ""; }; - 12211EA014933D4A00641703 /* minizip */ = { - isa = PBXGroup; - children = ( - 12211EA114933D4A00641703 /* crypt.h */, - 12211EA214933D4A00641703 /* ioapi.c */, - 12211EA314933D4A00641703 /* ioapi.h */, - 12211EA414933D4A00641703 /* mztools.c */, - 12211EA514933D4A00641703 /* mztools.h */, - 12211EA614933D4A00641703 /* unzip.c */, - 12211EA714933D4A00641703 /* unzip.h */, - 12211EA814933D4A00641703 /* zip.c */, - 12211EA914933D4A00641703 /* zip.h */, - ); - path = minizip; - sourceTree = ""; - }; 12211EB01493449A00641703 /* Networking Packages */ = { isa = PBXGroup; children = ( @@ -1053,7 +1027,6 @@ isa = PBXGroup; children = ( 128ED372148BAE7B00C58E83 /* GoogleAdMobAdsSDKiOS-5.0.5 */, - 12211EA014933D4A00641703 /* minizip */, 12211E9E14933CC200641703 /* ZipArchive */, ); name = Tools; @@ -1078,14 +1051,14 @@ 128FB96A149537A600ED4EE6 /* Images */ = { isa = PBXGroup; children = ( - 75D209D1181D54FD009916AC /* Default-568h@2x.png */, + 180633411BA5F82D003FB092 /* Default-568h@2x.png */, + 180633421BA5F82D003FB092 /* Default-Landscape.png */, + 180633431BA5F82D003FB092 /* Default-Landscape~ipad.png */, + 180633441BA5F82D003FB092 /* Default-Portrait.png */, + 180633451BA5F82D003FB092 /* Default-Portrait~ipad.png */, + 180633461BA5F82D003FB092 /* Default.png */, + 180633471BA5F82D003FB092 /* Default@2x.png */, 75D209D2181D54FD009916AC /* wagic-80x80.png */, - 12211ED21494916D00641703 /* Default-Landscape.png */, - 12211ED31494916D00641703 /* Default-Portrait.png */, - 12211ED01494823E00641703 /* Default@2x.png */, - 12211ECE149481C300641703 /* Default-Portrait~ipad.png */, - 12211ECC149481B600641703 /* Default-Landscape~ipad.png */, - 12211ECA1494811D00641703 /* Default.png */, ); name = Images; sourceTree = ""; @@ -1190,6 +1163,22 @@ name = ios; sourceTree = ""; }; + 188B71C21B9B9F0100D5522B /* unzip */ = { + isa = PBXGroup; + children = ( + 188B71C31B9B9F9400D5522B /* crypt.h */, + 188B71C41B9B9F9400D5522B /* ioapi.c */, + 188B71C51B9B9F9400D5522B /* unzip.c */, + 188B71C61B9B9F9400D5522B /* zip.c */, + 188B71C71B9B9F9400D5522B /* ioapi.h */, + 188B71CC1B9B9F9400D5522B /* mztools.c */, + 188B71CD1B9B9F9400D5522B /* mztools.h */, + 188B71CE1B9B9F9400D5522B /* unzip.h */, + 188B71CF1B9B9F9400D5522B /* zip.h */, + ); + name = unzip; + sourceTree = ""; + }; 19C28FACFE9D520D11CA2CBB /* Products */ = { isa = PBXGroup; children = ( @@ -1591,6 +1580,7 @@ CEE232AF128A01F400C34032 /* src */ = { isa = PBXGroup; children = ( + 188B71C21B9B9F0100D5522B /* unzip */, 1235D03F14DEAC6A00B02B42 /* psp */, 1235D03D14DE397200B02B42 /* android */, 12DCD02B14DBE1AF0023B966 /* ios */, @@ -1743,12 +1733,6 @@ 12059D7214980B7200DAC43B /* zfs.vcxproj.filters in Resources */, 12059D7314980B7200DAC43B /* modrules.xml in Resources */, 12059D7414980B7200DAC43B /* README.txt in Resources */, - 12059D7914980B7200DAC43B /* Default.png in Resources */, - 12059D7A14980B7200DAC43B /* Default-Landscape~ipad.png in Resources */, - 12059D7B14980B7200DAC43B /* Default-Portrait~ipad.png in Resources */, - 12059D7C14980B7200DAC43B /* Default@2x.png in Resources */, - 12059D7D14980B7200DAC43B /* Default-Landscape.png in Resources */, - 12059D7E14980B7200DAC43B /* Default-Portrait.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1757,25 +1741,25 @@ buildActionMask = 2147483647; files = ( F233DC3812A111EB008594F2 /* wagic-64x64.png in Resources */, + 1806334B1BA5F82D003FB092 /* Default-Portrait.png in Resources */, F2CDD5E312A6F7A2007B35AF /* EAGLViewController.xib in Resources */, CECB67E112B517C000321D5A /* MainWindow.xib in Resources */, 127D4C6F1376B33200109AB4 /* mtg.txt in Resources */, + 1806334C1BA5F82D003FB092 /* Default-Portrait~ipad.png in Resources */, 12B812341404B9E20092E303 /* !Pak0.cpk in Resources */, + 180633481BA5F82D003FB092 /* Default-568h@2x.png in Resources */, + 1806334A1BA5F82D003FB092 /* Default-Landscape~ipad.png in Resources */, 12B812351404B9E20092E303 /* !Pak1.cpk in Resources */, 12B812391404B9E20092E303 /* zfs.sln in Resources */, + 1806334D1BA5F82D003FB092 /* Default.png in Resources */, + 1806334E1BA5F82D003FB092 /* Default@2x.png in Resources */, + 180633491BA5F82D003FB092 /* Default-Landscape.png in Resources */, 12B8123A1404B9E20092E303 /* zfs.vcproj in Resources */, 12B8123B1404B9E20092E303 /* zfs.vcxproj in Resources */, 12B8123C1404B9E20092E303 /* zfs.vcxproj.filters in Resources */, 129654D6148AA23A0031100B /* modrules.xml in Resources */, 128ED37C148BAE7B00C58E83 /* README.txt in Resources */, - 75D209D3181D54FD009916AC /* Default-568h@2x.png in Resources */, - 12211ECB1494811D00641703 /* Default.png in Resources */, 75D209D4181D54FD009916AC /* wagic-80x80.png in Resources */, - 12211ECD149481B600641703 /* Default-Landscape~ipad.png in Resources */, - 12211ECF149481C400641703 /* Default-Portrait~ipad.png in Resources */, - 12211ED11494823F00641703 /* Default@2x.png in Resources */, - 12211ED41494916D00641703 /* Default-Landscape.png in Resources */, - 12211ED51494916D00641703 /* Default-Portrait.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1947,10 +1931,6 @@ 12059E3F14980B7300DAC43B /* ASIHTTPRequest.m in Sources */, 12059E4014980B7300DAC43B /* ASIInputStream.m in Sources */, 12059E4114980B7300DAC43B /* ASINetworkQueue.m in Sources */, - 12059E4214980B7300DAC43B /* ioapi.c in Sources */, - 12059E4314980B7300DAC43B /* mztools.c in Sources */, - 12059E4414980B7300DAC43B /* unzip.c in Sources */, - 12059E4514980B7300DAC43B /* zip.c in Sources */, 12059E4614980B7300DAC43B /* ZipArchive.mm in Sources */, 12059E4714980B7300DAC43B /* Reachability.m in Sources */, 12059E4814980B7300DAC43B /* WagicDownloadProgressViewController.m in Sources */, @@ -1996,6 +1976,7 @@ CEE23323128A01F400C34032 /* tinystr.cpp in Sources */, CEE23324128A01F400C34032 /* tinyxml.cpp in Sources */, CEE23325128A01F400C34032 /* tinyxmlerror.cpp in Sources */, + 188B71D01B9B9F9400D5522B /* ioapi.c in Sources */, CEE23326128A01F400C34032 /* tinyxmlparser.cpp in Sources */, CEE23330128A01F400C34032 /* Vector2D.cpp in Sources */, CEE23331128A01F400C34032 /* vram.c in Sources */, @@ -2018,6 +1999,7 @@ CEA377691291C60500B9016A /* Damage.cpp in Sources */, CEA3776A1291C60500B9016A /* DamagerDamaged.cpp in Sources */, CEA3776B1291C60500B9016A /* DeckDataWrapper.cpp in Sources */, + 188B71D61B9B9F9400D5522B /* mztools.c in Sources */, CEA3776C1291C60500B9016A /* DeckEditorMenu.cpp in Sources */, CEA3776D1291C60500B9016A /* DeckManager.cpp in Sources */, CEA3776E1291C60500B9016A /* DeckMenu.cpp in Sources */, @@ -2087,6 +2069,7 @@ CEA377B41291C60500B9016A /* TextScroller.cpp in Sources */, CEA377B51291C60500B9016A /* ThisDescriptor.cpp in Sources */, CEA377B61291C60500B9016A /* Token.cpp in Sources */, + 188B71D11B9B9F9400D5522B /* unzip.c in Sources */, CEA377B71291C60500B9016A /* Translate.cpp in Sources */, CEA377B81291C60500B9016A /* TranslateKeys.cpp in Sources */, CEA377B91291C60500B9016A /* Trash.cpp in Sources */, @@ -2123,6 +2106,7 @@ 12769488144127380088F6D3 /* TestSuiteAI.cpp in Sources */, 12CCA030144A05D100E343A0 /* AbilityParser.cpp in Sources */, 12211E7914931CBB00641703 /* ASIAuthenticationDialog.m in Sources */, + 188B71D21B9B9F9400D5522B /* zip.c in Sources */, 12211E7A14931CBB00641703 /* ASIDataCompressor.m in Sources */, 12211E7B14931CBB00641703 /* ASIDataDecompressor.m in Sources */, 12211E7C14931CBB00641703 /* ASIDownloadCache.m in Sources */, @@ -2130,10 +2114,6 @@ 12211E7E14931CBB00641703 /* ASIHTTPRequest.m in Sources */, 12211E7F14931CBB00641703 /* ASIInputStream.m in Sources */, 12211E8014931CBB00641703 /* ASINetworkQueue.m in Sources */, - 12211EAA14933D4A00641703 /* ioapi.c in Sources */, - 12211EAB14933D4A00641703 /* mztools.c in Sources */, - 12211EAC14933D4A00641703 /* unzip.c in Sources */, - 12211EAD14933D4A00641703 /* zip.c in Sources */, 12211EAF14933D6600641703 /* ZipArchive.mm in Sources */, 12211EB71493483C00641703 /* Reachability.m in Sources */, 12211EC91494360C00641703 /* WagicDownloadProgressViewController.m in Sources */, @@ -2273,7 +2253,7 @@ "iOS/Reachability/Reachability\\ 2.0.4ddg/DDG\\ Reachability/Classes/", ); INFOPLIST_FILE = "wagic-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 4.0; + IPHONEOS_DEPLOYMENT_TARGET = 6.0; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/../../admobsdk/iOS/GoogleAdMobAdsSDKiOS-5.0.5\"", @@ -2315,7 +2295,7 @@ "iOS/Reachability/Reachability\\ 2.0.4ddg/DDG\\ Reachability/Classes/", ); INFOPLIST_FILE = "wagic-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 4.0; + IPHONEOS_DEPLOYMENT_TARGET = 6.0; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/../../admobsdk/iOS/GoogleAdMobAdsSDKiOS-5.0.5\"", diff --git a/tools/build-macos-script.sh b/tools/build-macos-script.sh index 41bf6ebd4..09a75aa90 100755 --- a/tools/build-macos-script.sh +++ b/tools/build-macos-script.sh @@ -14,13 +14,17 @@ git config --global user.email $GH_EMAIL git remote set-url origin "https://${GH_TOKEN}@github.com/WagicProject/wagic.git" ## Delete remote Travis-Mac branch (if any) -export REMOTE=$(git branch -r | grep "origin/$TRAVIS_MAC_BRANCH\$") -if test -n "$REMOTE" ; then - # Delete remote branch - git branch -r -D "origin/$TRAVIS_MAC_BRANCH" +echo git branches = `git branch -r` +#export REMOTE=$(git branch -r | grep "origin/$TRAVIS_MAC_BRANCH") +#if [ "$REMOTE" = "origin/$TRAVIS_MAC_BRANCH" ]; then +# echo "Removing old $TRAVIS_MAC_BRANCH branch" +# # Delete remote branch +# git branch -r -D "origin/$TRAVIS_MAC_BRANCH" # Push (delete) remote branch on temote server (e.g. github) - git push origin ":$TRAVIS_MAC_BRANCH" -fi + git push origin --delete "$TRAVIS_MAC_BRANCH" +#else +# echo "$REMOTE : No $TRAVIS_MAC_BRANCH to remove" +#fi ## Create a new branch git checkout -q -b "$TRAVIS_MAC_BRANCH" "$TRAVIS_BRANCH" @@ -28,7 +32,6 @@ git checkout -q -b "$TRAVIS_MAC_BRANCH" "$TRAVIS_BRANCH" ## Write a new Travis-CI configuration file cp tools/macos.travis.yml .travis.yml git add .travis.yml -git rm appveyor.yml git commit -m "Auto-Updated Travis-CI configuration for Mac" ## Push new branch to remote server git push -q origin $TRAVIS_MAC_BRANCH:$TRAVIS_MAC_BRANCH 2> /dev/null > /dev/null diff --git a/tools/macos.travis.yml b/tools/macos.travis.yml index 3858e7193..1ff9154bb 100644 --- a/tools/macos.travis.yml +++ b/tools/macos.travis.yml @@ -1,15 +1,26 @@ language: objective-c + before_install: - brew update - brew install qt5 - sudo pip install pyjavaproperties - sudo pip install github3.py +- brew install dpkg +- curl -s -f -L https://raw.github.com/r-plus/dotfiles/master/install_theos.sh | bash +- pwd +- ls env: global: secure: "EBzr1+qjQsOhn0s+tcFmXR1jP9B0xiOSXuXbRXWZ1OEHNvp8+A5/pS84LYVFlaZqmxr5dApxvPtwhgLIUbQ3EPXm8LpC3KgSD4dS+9/QMbxhe5TK4oczgFRGcDTMJQZsCzhOh7hp3tbcbJg5Gp+VT7aFjFQSHDGwhzSJXsXwh/8=" + script: - /usr/local/opt/qt5/bin/qmake projects/mtg/wagic-qt.pro CONFIG+=graphics - make -j 4 dmg +- cd projects/mtg/iOS +- make -j 4 package +- cd ../../.. + after_success: - python tools/upload-binaries.py -t $GH_TOKEN -s $TRAVIS_COMMIT -l wagic.dmg -r Wagic-macosx.dmg -b $TRAVIS_BRANCH +- python tools/upload-binaries.py -t $GH_TOKEN -s $TRAVIS_COMMIT -l projects/mtg/iOS/net.wagic_0.19.2-1_iphoneos-arm.deb -r Wagic-iOS.deb -b $TRAVIS_BRANCH